Android Google Play 商店应用程序是否有官方 API?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12017291/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:30:10  来源:igfitidea点击:

Is there an official API for the Google Play Store app?

androidapigoogle-play

提问by android developer

The Google Play Store app (aka. Android Market) has updated to have many cool features, even wishlist of apps.

Google Play Store 应用程序(又名 Android Market)已更新为具有许多很酷的功能,甚至是应用程序的愿望清单

I wonder if there is any official API to communicate with it, even intents. I wonder if people just looked at the log to see the intents, or that there is an official API to reach each page of the app.

我想知道是否有任何官方 API 可以与之通信,甚至是意图。我想知道人们是否只是查看日志以查看意图,或者是否有官方 API 可以访问应用程序的每个页面。

Here are some examples of what such API might be able to let you do:

以下是此类 API 可能让您执行的操作的一些示例:

  1. what would you do in order to add an app to the wishlist of the Google Play Store?
  2. what would you do in order to go to the reviews of a specific app, or even go to the part where you write a review of it?
  3. Is there a way to query the apps of a specific company there?
  4. what about a query of apps that were installed in the past?
  1. 您会怎么做才能将应用添加到 Google Play 商店的愿望清单中?
  2. 你会怎么做才能查看特定应用的评论,甚至查看你撰写评论的部分?
  3. 有没有办法在那里查询特定公司的应用程序?
  4. 查询过去安装的应用程序怎么样?

And so on…

等等…

采纳答案by Raghav Sood

1 . what would you do in order to add an app to the wishlist of the google play?

1 . 您会怎么做才能将应用添加到 google play 的愿望清单中?

You can't

你不能

2 . what would you do in order to go to the reviews of a specific app , or even go to the part where you write a review of it ?

2 . 你会怎么做才能查看特定应用的评论,甚至查看你撰写评论的部分?

You can open up the app's page on Google Play using Intent with the URL from the link at the bottom of this answer.

您可以使用 Intent 和本答案底部链接中的 URL 在 Google Play 上打开应用程序页面。

3 . is there a way to query the apps of a specific company there ?

3 . 有没有办法查询特定公司的应用程序?

At best, you can use the Search URL to display a list of a particular developers apps.

充其量,您可以使用搜索 URL 来显示特定开发人员应用程序的列表。

4 . what about a query of apps that were installed in the past ?

4 . 查询过去安装的应用程序怎么样?

You can't.

你不能。

Documentation.

文档

回答by orcaman

another unofficial API that you can try is Also check out: www.playstoreapi.com

您可以尝试的另一个非官方 API 也请查看: www.playstoreapi.com

It's unofficial but easy to use (free for non commercial use) and it has a lot of nice features like search and top charts. from their documentation section:

它是非官方的,但易于使用(非商业用途免费),并且具有许多不错的功能,例如搜索和热门图表。从他们的文档部分:

Node.js:

节点.js:

var request     = require('request');
var apiKey      = 'wij5czxu3mxkzkt9'; // your API key
var packageName = 'com.whatsapp';     // package Name, e.g. com.whatsapp for WhatsApp

var url = 'http://api.playstoreapi.com/v1.1/apps/' + packageName + '?key=' + apiKey;

request({
    url: url,
    json: true
    }, function (error, response, body) {
    if (!error && response.statusCode === 200) {
        console.log(body) // Print the json response
    }
});

HTML/JS:

HTML/JS:

<html>
<head>
<body>
<p></p>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

  <script>

  var apiKey = 'wij5czxu3mxkzkt9'; // your API key
  var app    = 'com.whatsapp';     // package com.whatsapp for WhatsApp

  var url = 'http://api.playstoreapi.com/v1.1/apps/' + app + '?key=' + apiKey;

  $.getJSON(url).done(function(appDetails) {
    $('p:last').html(JSON.stringify(appDetails));
  });

  </script>
</body>
</head>
<html>

Python:

Python:

import urllib2
import json

packageName = 'com.whatsapp'      # package com.whatsapp for WhatsApp
apiKey      = 'wij5czxu3mxkzkt9'  # your API key

url = 'http://api.playstoreapi.com/v1.1/apps/{0}?key={1}'

response = urllib2.urlopen(url.format(packageName, apiKey))

data = json.load(response)   
print data

C# .NET:

C#.NET:

string apiKey = "wij5czxu3mxkzkt9"; // your API key
string app    = "com.whatsapp";     // package com.whatsapp for WhatsApp

string url = "http://api.playstoreapi.com/v1.1/apps/{0}?key={1}";

using (var webClient = new System.Net.WebClient()) {
    string jsonString = webClient.DownloadString(string.Format(url, app, apiKey));
}