获取android google play评论的API(获取设备名称和应用程序版本)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11348025/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
API to get android google play reviews(Getting device name and app version)
提问by Alexis
I want to retrieve all the reviews for a specific app on google play and I need these informations from the reviews : rating, comment, device name and app version the review was wrote for.
我想在 google play 上检索特定应用程序的所有评论,我需要这些评论信息:评分、评论、设备名称和评论所针对的应用程序版本。
I tried to use the android-market-api but sadly I can only get rating, creationtime, authorname, text, authorid.
我尝试使用 android-market-api 但遗憾的是我只能获得评级、创建时间、作者姓名、文本、authorid。
So I was wondering if there is an API or an url I can send a post or get request (like the android-market-api send a post request) to retrieve the information I need.
所以我想知道是否有 API 或 url 我可以发送帖子或获取请求(如 android-market-api 发送帖子请求)来检索我需要的信息。
回答by Jing Li
Finally Google offers it now (announced at Google I/O 2016):
终于谷歌现在提供它(在谷歌 I/O 2016 上宣布):
回答by auselen
An example in Python with new Reviews APIusing Service Accountcredentials.
Python 中的示例,其中包含使用服务帐户凭据的新评论 API。
from httplib2 import Http
from oauth2client.service_account import ServiceAccountCredentials
from apiclient.discovery import build
credentials = ServiceAccountCredentials.from_json_keyfile_name(
'<secret from service account>.json',
scopes=['https://www.googleapis.com/auth/androidpublisher'])
service = build('androidpublisher', 'v2', http=credentials.authorize(Http()))
package_name = "<package name>"
reviews_resource = service.reviews()
reviews_page = reviews_resource.list(packageName=package_name, maxResults=100).execute()
reviews_list = reviews_page["reviews"]
infinite_loop_canary = 100
while "tokenPagination" in reviews_page:
reviews_page = reviews_resource.list(packageName=package_name,
token=reviews_page["tokenPagination"]["nextPageToken"],
maxResults=100).execute()
reviews_list.extend(reviews_page["reviews"])
infinite_loop_canary -= 1
if infinite_loop_canary < 0:
break
Keep in mind - I found out, Reviews API only allow access to last two weeks comments-ratings. If you want to do some retroactive analysis it is better to get comments-ratings as csv files from where they are saved in your account's bucket on google-cloud.
请记住 - 我发现,评论 API 只允许访问最近两周的评论评级。如果您想进行一些追溯分析,最好将评论评级作为 csv 文件从它们保存在 google-cloud 上的帐户存储桶中的位置获取。
回答by amalBit
Some interesting apis released for getting reviews and reply on google play. You can get the all the data you want:
发布了一些有趣的 api,用于在 google play 上获取评论和回复。您可以获得所需的所有数据:
"device": string,
"androidOsVersion": integer,
"appVersionCode": integer,
"appVersionName": string
getGET
Returns a single review based on review id.
list
Returns a list of reviews from playstore.
reply
Reply to a single review, or update an existing reply.
getGET 根据评论 ID 返回单个评论。
list
返回来自 Playstore 的评论列表。
回复
回复单个评论,或更新现有回复。
回答by peekay
So when people start to answer this question they are going to point you to the following API:
因此,当人们开始回答这个问题时,他们会将您指向以下 API:
Title: android-market-api.
link: http://code.google.com/p/android-market-api/
标题:android-market-api。
链接:http: //code.google.com/p/android-market-api/
Unfortunately this API is mediocre and has some problems that I don't think are related to the developers of the API but the interaction with google.
不幸的是,这个 API 是平庸的,并且有一些我认为与 API 的开发人员无关,而是与谷歌的交互有关的问题。
I have used this API and the application I wrote works for finding some app's and their metadata but others it just returns no results. I have been searching for an answer to this for a while and I have yet to figure it out.
我已经使用了这个 API,我编写的应用程序可以用于查找某些应用程序及其元数据,但其他应用程序则不返回任何结果。我一直在寻找这个问题的答案,但我还没有弄清楚。
Good luck
祝你好运
回答by Wahib Ul Haq
I am currently also searching for the same thing. Although its an old thread but just thought to share my research so far in this domain which might be helpful for other visitors.
我目前也在寻找同样的东西。虽然它是一个旧线程,但只是想分享我迄今为止在这个领域的研究,这可能对其他访问者有帮助。
commercial
商业的
open-source
开源
- https://code.google.com/p/android-market-api/Java
- https://github.com/MarcelloLins/GooglePlayAppsCrawlerC#
- https://github.com/chadrem/market_botRuby
- https://github.com/Akdeniz/google-play-crawlerJava
- https://github.com/egirault/googleplay-apiPython
- https://code.google.com/p/android-market-api/Java
- https://github.com/MarcelloLins/GooglePlayAppsCrawlerC#
- https://github.com/chadrem/market_bot红宝石
- https://github.com/Akdeniz/google-play-crawlerJava
- https://github.com/egirault/googleplay-apiPython
Update :
更新 :
http://www.playstoreapi.com/docs#app_info(unavailable now !) but instead you can give a try to https://github.com/thetutlage/Google-Play-Store-API/
http://www.playstoreapi.com/docs#app_info(现在不可用!)但你可以尝试https://github.com/thetutlage/Google-Play-Store-API/
回答by mbonnin
If you don't need the information to be realtime, you can download the Google Play Reports from google cloud storage. The reports are built daily.
如果您不需要这些信息是实时的,您可以从谷歌云存储下载 Google Play 报告。报告每天生成。
See https://support.google.com/googleplay/android-developer/answer/6135870?p=crash_export&rd=1#export
请参阅https://support.google.com/googleplay/android-developer/answer/6135870?p=crash_export&rd=1#export