Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get number of downloads of an application from Google Play?

I am trying to get the number of downloads of an application that I have uploaded to Google Play.

I am searching for an API (or something similar) that retrieves to me the number of downloads with the authentification of the user. I do not want third party applications (like AppAnnie).

It would be great if it could be on PHP and I found that there is a library which I think it is the most closest API I could find to get data from Google applications.

Google APIs Client Library for PHP

but I cannot find any mention to Google Play applications.

Is there some way to get the downloads of an specific application having the authentification keys?

Thanks in advance!

like image 608
Francisco Romero Avatar asked Feb 20 '17 17:02

Francisco Romero


People also ask

Can I see how many downloads my app has?

Unfortunately, the App Store doesn’t show an estimate of downloads like the Google Play Store does. If you’re a developer and want to know how your app is performing, you can use the Google Play console or the App Analytics for Android and iOS, respectively.

Can I see the download count of one app on Google Play?

I cannot see the download counts of one app on Google Play. How can we know that number of one app? Show activity on this post. As an end user, there is no way to know the exact number of downloads. But you can see a range if you scroll down the app page and look at the Installs section within Additional Information.

When will the download number appear on Google Play Store?

Play store starts showing the download number beside the app icon only when download number is more than 50. Even though your app gets more than 50 downloads, it may take upto 2 days for the download number to appear on playstore.

How often does Google Play Store show download and device installations?

Google Play Store show (updated once a day) the number of download and device installations. The number you see on Google Play (in web or in mobile app) is only updated in following steps: Downloads in GP App (Downloads in Web) 1+ (1 - 5) 5+ (6 - 10) 10+ (11 - 50) 50+ (51 - 100) 100+ (101 - 500)


2 Answers

This is about meta data api. You can look at below.

https://developers.google.com/android-publisher/api-ref/reviews

like image 108
Uddhav P. Gautam Avatar answered Oct 19 '22 13:10

Uddhav P. Gautam


Use the google-play-scraper library to get an app information as below:

Example:

$app = $scraper->getApp('com.mojang.minecraftpe');

Result:

array (
  'id' => 'com.mojang.minecraftpe',
  'url' => 'https://play.google.com/store/apps/details?id=com.mojang.minecraftpe',
  'image' => 'https://lh3.googleusercontent.com/30koN0eGl-LHqvUZrCj9HT4qVPQdvN508p2wuhaWUnqKeCp6nrs9QW8v6IVGvGNauA=w300',
  'title' => 'Minecraft: Pocket Edition',
  'author' => 'Mojang',
  'author_link' => 'https://play.google.com/store/apps/developer?id=Mojang',
  'categories' => array (
    'Arcade',
    'Creativity',
  ),
  'price' => '$6.99',
  'screenshots' => array (
    'https://lh3.googleusercontent.com/VkLE0e0EDuRID6jdTE97cC8BomcDReJtZOem9Jlb14jw9O7ytAGvE-2pLqvoSJ7w3IdK=h310',
    'https://lh3.googleusercontent.com/28b1vxJQe916wOaSVB4CmcnDujk8M2SNaCwqtQ4cUS0wYKYn9kCYeqxX0uyI2X-nQv0=h310',
    // [...]
  ),
  'description' => 'Our latest free update includes the Nether and all its inhabitants[...]',
  'description_html' => 'Our latest free update includes the Nether and all its inhabitants[...]',
  'rating' => 4.4726405143737793,
  'votes' => 1136962,
  'last_updated' => 'October 22, 2015',
  'size' => 'Varies with device',
  'downloads' => '10,000,000 - 50,000,000',
  'version' => 'Varies with device',
  'supported_os' => 'Varies with device',
  'content_rating' => 'Everyone 10+',
  'whatsnew' => 'Build, explore and survive on the go with Minecraft: Pocket Edition[...]',
  'video_link' => 'https://www.youtube.com/embed/D2Z9oKTzzrM?ps=play&vq=large&rel=0&autohide=1&showinfo=0&autoplay=1',
  'video_image' => 'https://i.ytimg.com/vi/D2Z9oKTzzrM/hqdefault.jpg',
)

EDIT: Easily get downloads count as below:

echo $app['downloads']; // Outputs: '10,000,000 - 50,000,000'

Or if you want the left value:

$matches = null;
$returnValue = preg_match('/.*(?= -)/', '10,000,000 - 50,000,000', $matches);
echo $matches[0]; // Outputs: '10,000,000'

Or if you want the right value:

$matches = null;
$returnValue = preg_match('/(?<=- ).*/', '10,000,000 - 50,000,000', $matches);
echo $matches[0]; // Outputs: '50,000,000'

Then easily convert it to integer using:

$count = null;
$returnValue = (int)preg_replace('/,/', '', $matches[0], -1, $count);
echo $returnValue; // Outputs: 10000000 or 50000000
like image 43
Empire Avatar answered Oct 19 '22 13:10

Empire