0

I want to know if there is any api that can allow me to get the number of reviews from an url.
I know that google offers the possibility to get this number by using the placeid, but the only information I have is the url of the website of a company.
Any ideas please?

Andrei T
  • 2,985
  • 3
  • 21
  • 28
Nada
  • 11
  • 3

2 Answers2

0

Maybe, but probably not.

Places API Text Search seems to be able to find places by their URL:

https://maps.googleapis.com/maps/api/place/textsearch/json?key=YOURKEY&query=http://www.starbucks.com/store/1014527/us/303-congress-street/303-congress-street-boston-ma-02210

However, this is not a documented feature of the API and I do not think this can be relied upon, so I'd recommend filing a feature request, to make this a supported, reliable feature.

As for the amount of reviews, you may be interested in:

  • Issue 3484: Add # of reviews to the Place Details Results
miguev
  • 4,481
  • 21
  • 41
0

I've written an API like this for Reviewsmaker, but I target specific business names not URLs. See this example (I activated a key for this purpose for now):

http://reviewsmaker.com/api/google/?business=life%20made%20a%20little%20easier&api_key=4a2819f3-2874-4eee-9c46-baa7fa17971c

Or, try yourself with any business name:

http://reviewsmaker.com/api/google/?business=Toys R Us&api_key=4a2819f3-2874-4eee-9c46-baa7fa17971c

The following call would return a JSON object which shows:

{  
   "results":{  
      "business_name":"Life Made A Little Easier",
      "business_address":"1702 Sheepshead Bay Rd, Brooklyn, NY 11235, USA",
      "place_id":"ChIJ_xjIR2REwokRH2qEigdFCvs",
      "review_count":38
   },
   "api":{  
      "author":"Ilan Patao",
      "home":"www.reviewsmaker.com"
   }
}

Pinging this EP using a Chronjob for example once every hour or two and return the review_count can pretty much build your own review monitoring app;

You can probably do what you're looking for if you query the Places API Text Search or the CSE (Custom Search Engine) API to lookup the URL, return back the matching name of the business associated with this URL and calling an endpoint like this one to return back the associated review count.

You can probably code this in py or PHP. Not sure how familiar you are with data parsing, but I was able to build my API based on Google's CSE API. CSE provides metadata in its results which contain the total reviews, so if you create a CSE engine and use the CSE API looking for business schemas, review schemas, etc; you can return back items and within the PageMap node there are objects with data that you need very little tweaking to do (such as string replacing, trimming) which will return back the values you're looking for.

Hope my answer helped, at least to lead you in the right direction :)

Ilan P
  • 1,602
  • 1
  • 8
  • 13