20

is there a way to query the play store for the version of an app without the need for user-credentials. I am aware of this unofficial API:

http://code.google.com/p/android-market-api/

but I don't want to rely on user credentials - I can visit the google play sites in incognito mode via chrome also - so it must be possible somehow. But I found no way and I don't want to fallback on scraping ;-)

ligi
  • 39,001
  • 44
  • 144
  • 244
  • Possible duplicate of [Checking my app version programmatically in Android market](http://stackoverflow.com/questions/12091534/checking-my-app-version-programmatically-in-android-market) – Ciro Santilli OurBigBook.com Apr 23 '16 at 12:18

3 Answers3

13

Found a suitable API via G+: this is the API: https://androidquery.appspot.com

example call: https://androidquery.appspot.com/api/market?app=org.ligi.fast

and this wrapper/code: https://github.com/androidquery/androidquery

ligi
  • 39,001
  • 44
  • 144
  • 244
0

Also check out: www.playstoreapi.com

It's unofficial but easy to use (free for non commercial use). you can get data about apps, search the play store and get top charts data. 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));
}
orcaman
  • 6,263
  • 8
  • 54
  • 69
0

Bear in mind that nowadays a lot of apps have multiple versions running. For those apps with one version you can try 42matters Lookup API, it should give you the correct version.

Ivan Delchev
  • 412
  • 6
  • 10
  • Interesting but really expensive – ligi Apr 01 '16 at 15:46
  • It is a paid api and it is not cheap. I would use jsoup instead: http://stackoverflow.com/questions/25201349/programmatically-check-play-store-for-app-updates – jiahao Jun 30 '16 at 11:55