Is there an official API for the Google Play Store

2019-01-11 13:08发布

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

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.

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

  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?

And so on…

2条回答
仙女界的扛把子
2楼-- · 2019-01-11 13:52

1 . what would you do in order to add an app to the wishlist of the 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 ?

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.

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

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

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

You can't.

Documentation.

查看更多
SAY GOODBYE
3楼-- · 2019-01-11 14:07

another unofficial API that you can try is Also check out: 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:

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>
<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:

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:

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));
}
查看更多
登录 后发表回答