Store Rating in JSON format

We are now providing Store Rating info in JSON format. It can be used to get that data and instead of scraping them from DOM, you can access them directly.
We kept the same URL, but from now you can request JSON format when you send header content-type: application/json which make it pretty easy if you are using this URL now.

JavaScript – try e. g. on Classic:

const request = await fetch('/cache/hodnoceni-obchodu/', {headers: {'Content-Type': 'application/json'}}); request.json().then(response => console.log(response));


curl -H "content-type: application/json"

Do not forget the trailing slash, you wouldn’t get JSON otherwise.
You get an empty array [] when you request an empty page (e. g. /hodnoceni-obchodu/strana-1000).

Post navigation