通过API获得Google for business的所有评论和评分 [英] API to get all the reviews and rating from Google for business

查看:110
本文介绍了通过API获得Google for business的所有评论和评分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Maps API来获取公司的评论和评分.

I am using the Google Maps API to get the reviews and ratings for a company.

第1步:通过HTTP请求获取参考ID.

Step 1: HTTP Request to get the reference Id.

$url = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query='.<CompanyName>.'&sensor=true&key='.<apikey>;

在HTTP请求之后,我得到了业务的referenceId.

After HTTP request I am getting referenceId of business.

第2步:通过HTTP请求获得评论.

Step 2: HTTP request to get the reviews.

$url = 'https://maps.googleapis.com/maps/api/place/details/json?reference='.<referenceId>.'&key='.<apiKey>

基于上述内容,我获得了最有帮助的评论",最多获得了5条评论.

With the above, I am getting the "most helpful reviews" and a maximum of 5 reviews.

所以我想获得所有评论或最新评论.我需要添加参数吗?

So I want to get all the reviews or the latest reviews. Do I need to add a parameter?

推荐答案

如果要获得所有评论,则需要使用Google我的商家API.

You should need to use the Google My Business API if you want to get all the reviews.

这是另一个不同的API,您应该向Google请求该地点的财产.

It's another different API, and you should request from Google the property of the place.

https://developers.google.com/my-business/content/review-data#list_all_reviews

这篇关于通过API获得Google for business的所有评论和评分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆