Git Product home page Git Product logo

googleplaywebserviceapi's Introduction

Google Play Web-Service API

Tiny script to crawl information of a specific application in the Google play/store base on PHP.

PHP GooglePlay Methods

  • parse: mostly used internally – but can be used to parse any URL or text for valid Play Store app links and return their packageNames
  • parseSearch: search for apps by given terms
  • parseSimilar: search for what Google Play considers apps similar to the one specified
  • parseOthers: other apps by the same developer
  • parseTopApps: list top-chart apps
  • parseNewApps: list latest additions
  • parseCategory: list apps from a specified category
  • parseCategories: list available categories
  • parseApplication: get details for a specific app
  • parsePerms: retrieve permissions requested by a specific app
  • parsePrivacy: obtain an app's privacy details (data collected/shared etc)
  • setDebug: turn debug mode on or off
  • getDebug: check whether debug mode is turned on or off
  • dump_raw: dump the raw data (HTML of the page plus JSON of the data sources) for debug/evaluation

Using PHP GooglePlay

<?php
require "google-play.php";
$google = new GooglePlay();

$app=$google->parseApplication("com.bezapps.flowdiademo");
print_r($app);

$app=$google->parseSimilar("com.bezapps.flowdiademo");
print_r($app);

$apps=$google->parseSearch("telegram");
print_r($apps);

$apps=$google->parseCategory("TOOLS");
print_r($apps);
?>

Detailed instructions

Examples of how to use the code and what results to expect can be found in the wiki:

  • the Search page shows how to
    • list available categories as well as obtain a list of apps from a given category
    • search for "similar apps"
    • search for apps by keywords
    • action as a crawler and find more applications?
  • the AppDetails page shows how to
    • obtain details about a given app
    • interprete the result set (aka the "application structure")
    • obtain content in specific languages
  • the Permissions page details
    • how to get the permissions an app requests
    • what the result set looks like and how to interprete it

TODO

  • Unit test

Authors

  • Izzy
  • Max Base

Max Base

My nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. (Max Base)

Asrez Team

A team includes some programmer, developer, designer, researcher(s) especially Max Base.

Asrez Team

googleplaywebserviceapi's People

Contributors

izzysoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

googleplaywebserviceapi's Issues

Unable to get latest version number/name

Hi There,

It seems this project is unable to get the version name/number of some applications. e.g: Instagram

The reason is these applications have different builds for special devices so they have a lot of builds for different devices and for this kind of application we are unable to get the latest version number I think it's really bad because we need to know what is the latest version number of each application since it's an important metrics to see applications updated or not.

Reported by @ATNoosh

Best,
M.

category return wrong id

some time category return wrong id
"com.whatsapp" return kids category !!

array(6) {
  ["packageName"]=>
  string(12) "com.whatsapp"
  ["name"]=>
  string(18) "WhatsApp Messenger"
  ["developer"]=>
  string(12) "WhatsApp LLC"
  ["category"]=>
  string(4) "Kids"
  ["type"]=>
  string(6) "family"
  ["summary"]=>
  string(26) "Simple. Reliable. Private."
}

Adding optional $lang param

Hey,

If anyone is interested in doing this, we welcome it.

$app=$google->parseApplication("com.bezapps.flowdiademo", "en..");
$app=$google->parseApplication("com.bezapps.flowdiademo", "de..");
$app=$google->parseApplication("com.bezapps.flowdiademo", "fa..");
...

Thanks

Playstore redesign

The recent PlayStore redesign broke the parser nearly completely (apart from the app name, no fields had any data). I've fixed up most things with b837c52 (hopefully), but some things seem no longer available (e.g. the versionName of the last release, or the minimum Android version required).

@BaseMax would be great if you could check whether my changes work for you, and if you can find some of the missing details. I've left some comments in the code so you should be able to easily identify them.

Oh, and to make up a bit for lost details, I've added the video URL (what fastlane has as video.txt)…

is the API stopped to work ?

hi i want to thank you very much for this usefull project
but today its stopped suddenly i think google play changed the api or something happen please can you update it ?

Consistency in return values

During my recent implementations and rewrites, I've introduced some "error reporting" to make it easier for the caller to figure if and what might have gone wrong. On error, several methods now return an array like

[success:0, message:"reason"]

But not all of them – for example, most of the search/browse methods supposed to return a simple array of package names don't have this. There would be two options to reach (a sort of) consistency:

  • returning [success:0, message:reason] instead (and if so, include success:1 with a "good result) also for those methods that currently do not, moving the "real results" into a "sub-array" (which then, on error, could be empty or just not present at all)
  • simply returning an empty array, and have a getLastError() method for obtaining the reason for all search/browse methods while keeping the current behavior for the others.

I'd prefer the first approach (so it's completely consistent) with the "empty real result". This combines the best of two worlds, e.g.

$apps = $google->parseWhatever();
if ( empty($apps['data']) ) { // this could simply mean nothing found matching the criteria
  if ( $apps['success'] ) { log('nothing found'); }
  else { log ('ERROR occured: '.$apps['message']); }
} else { // do something with the data

I'd even go as far as to always include the message key, just leaving its value empty on success. That would make things most consistent.

What's your stance? If you agree, I'd go over the entire class another time and make it consistent:

  • success:0 only on errors – not generally on "no results" for a user-specified search (I vaguely remember I accidentally made it such in one case). message then holds the reason (e.g. the HTTP response, or parse error when an expected pattern didn't match, etc)
  • success:1 on success. message then is present but usually empty, but might eg hold a hint on why the result set is empty (like "no hits").

If we want to fix it, we want to do that as early as possible – before there are users whose code would otherwise break on some update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.