{"id":13448182,"url":"https://github.com/egirault/googleplay-api","last_synced_at":"2025-03-22T08:31:46.485Z","repository":{"id":4575666,"uuid":"5717293","full_name":"egirault/googleplay-api","owner":"egirault","description":"Google Play Unofficial Python API - This project was a PoC and is not maintained anymore. Please feel free to fork it and improve it in any way.","archived":true,"fork":false,"pushed_at":"2017-05-24T15:47:15.000Z","size":381,"stargazers_count":879,"open_issues_count":66,"forks_count":372,"subscribers_count":85,"default_branch":"master","last_synced_at":"2024-10-28T14:26:50.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egirault.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-07T13:38:39.000Z","updated_at":"2024-10-15T10:52:46.000Z","dependencies_parsed_at":"2022-09-21T18:12:22.618Z","dependency_job_id":null,"html_url":"https://github.com/egirault/googleplay-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egirault%2Fgoogleplay-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egirault%2Fgoogleplay-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egirault%2Fgoogleplay-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egirault%2Fgoogleplay-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egirault","download_url":"https://codeload.github.com/egirault/googleplay-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931484,"owners_count":20534008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:01:38.008Z","updated_at":"2025-03-22T08:31:46.203Z","avatar_url":"https://github.com/egirault.png","language":"Python","readme":"# Google Play Unofficial Python API\n\nAn unofficial Python API that let you search, browse and download Android apps from Google Play (formerly Android Market).\n\nThis library is inspired by those projects, working with the old version of the API:\n\n* [Android Market Python API](https://github.com/liato/android-market-api-py)\n* [Android Market Java API](http://code.google.com/p/android-market-api/)\n\n## Disclaimer\n**This is not an official API. I am not afiliated with Google in any way, and am not responsible of any damage that could be done with it. Use it at your own risk.**\n\n## Dependencies\n* [Python 2.5+](http://www.python.org)\n* [Protocol Buffers](http://code.google.com/p/protobuf/)\n\n## Requirements\nYou must edit `config.py` before using the provided scripts (`search.py`, `download.py`, `apishell.py`, etc.). First, you need to provide your phone's `androidID`:\n\n    ANDROID_ID      = None # \"xxxxxxxxxxxxxxxx\"\n\nTo get your `androidID`, use `*#*#8255#*#*` on your phone to start *Gtalk Monitor*. The hex string listed after `aid` is your `androidID`.\n\nIn order to authenticate to Google Play, you also need to provide either your Google login and password, or a valid subAuthToken.\n\n## Usage\n\n### Searching\n\n    $ python search.py\n    Usage: search.py request [nb_results] [offset]\n    Search for an app.\n    If request contains a space, don't forget to surround it with \"\"\n\n    $ python search.py earth\n    Title;Package name;Creator;Super Dev;Price;Offer Type;Version Code;Size;Rating;Num Downloads\n    Google Earth;com.google.earth;Google Inc.;1;Gratuit;1;53;8.6MB;4.46;10 000 000+\n    Terre HD Free Edition;ru.gonorovsky.kv.livewall.earthhd;Stanislav Gonorovsky;0;Gratuit;1;33;4.7MB;4.47;1 000 000+\n    Earth Live Wallpaper;com.seb.SLWP;unixseb;0;Gratuit;1;60;687.4KB;4.06;5 000 000+\n    Super Earth Wallpaper Free;com.mx.spacelwpfree;Mariux;0;Gratuit;1;2;1.8MB;4.41;100 000+\n    Earth And Legend;com.dvidearts.earthandlegend;DVide Arts Incorporated;0;5,99 €;1;6;6.8MB;4.82;50 000+\n    [...]\n\nDepending on the number of results you ask, you might get an error. My tests show that 100 search results are the maximum, but it may vary.\n\nBy default, all scripts have CSV output. You can use Linux's `column` to prettify the output:\n\n    $ alias pp=\"column -s ';' -t\"\n    $ python search.py earth | pp\n    Title                           Package name                            Creator                  Super Dev  Price    Offer Type  Version Code  Size     Rating  Num Downloads\n    Google Earth                    com.google.earth                        Google Inc.              1          Gratuit  1           53            8.6MB    4.46    10 000 000+\n    Terre HD Free Edition           ru.gonorovsky.kv.livewall.earthhd       Stanislav Gonorovsky     0          Gratuit  1           33            4.7MB    4.47    1 000 000+\n    Earth Live Wallpaper            com.seb.SLWP                            unixseb                  0          Gratuit  1           60            687.4KB  4.06    5 000 000+\n    Super Earth Wallpaper Free      com.mx.spacelwpfree                     Mariux                   0          Gratuit  1           2             1.8MB    4.41    100 000+\n    Earth And Legend                com.dvidearts.earthandlegend            DVide Arts Incorporated  0          5,99 €   1           6             6.8MB    4.82    50 000+\n    Earth 3D                        com.jmsys.earth3d                       Dokon Jang               0          Gratuit  1           12            3.4MB    4.05    500 000+\n    [...]\n\n### Browse categories\n\nYou can list all app categories this way:\n\n    $ python categories.py | pp\n    ID                   Name\n    GAME                 Jeux\n    NEWS_AND_MAGAZINES   Actualités et magazines\n    COMICS               BD\n    LIBRARIES_AND_DEMO   Bibliothèques et démos\n    COMMUNICATION        Communication\n    ENTERTAINMENT        Divertissement\n    EDUCATION            Enseignement\n    FINANCE              Finance\n\nSorry for non-French speakers!\n\n### List subcategories and apps\n\nAll categories have subcategories. You can list them with:\n\n    $ python list.py\n    Usage: list.py category [subcategory] [nb_results] [offset]\n    List subcategories and apps within them.\n    category: To obtain a list of supported catagories, use categories.py\n    subcategory: You can get a list of all subcategories available, by supplying a valid category\n\n    $ python list.py WEATHER | pp\n    Subcategory ID            Name\n    apps_topselling_paid      Top payant\n    apps_topselling_free      Top gratuit\n    apps_topgrossing          Les plus rentables\n    apps_topselling_new_paid  Top des nouveautés payantes\n    apps_topselling_new_free  Top des nouveautés gratuites\n\nAnd then list apps within them:\n\n    $ python list.py WEATHER apps_topselling_free | pp\n    Title                  Package name                                  Creator          Super Dev  Price    Offer Type  Version Code  Size    Rating  Num Downloads\n    La chaine météo        com.lachainemeteo.androidapp                  METEO CONSULT    0          Gratuit  1           8             4.6MB   4.38    1 000 000+\n    Météo-France           fr.meteo                                      Météo-France     0          Gratuit  1           11            2.4MB   3.63    1 000 000+\n    GO Weather EX          com.gau.go.launcherex.gowidget.weatherwidget  GO Launcher EX   0          Gratuit  1           25            6.5MB   4.40    10 000 000+\n    Thermomètre (Gratuit)  com.xiaad.android.thermometertrial            Mobiquité        0          Gratuit  1           60            3.6MB   3.78    1 000 000+\n\n### Viewing permissions\n\nYou can use `permissions.py` to see what permissions are required by an app without downloading it:\n\n    $ python search.py gmail 1 | pp\n    Titre  Package name           Creator      Super Dev  Price    Offer Type  Version Code  Size   Rating  Num Downloads\n    Gmail  com.google.android.gm  Google Inc.  1          Gratuit  1           403           2.7MB  4.32    100 000 000+\n\n    $ python permissions.py com.google.android.gm\n    android.permission.ACCESS_NETWORK_STATE\n    android.permission.GET_ACCOUNTS\n    android.permission.MANAGE_ACCOUNTS\n    android.permission.INTERNET\n    android.permission.READ_CONTACTS\n    android.permission.WRITE_CONTACTS\n    android.permission.READ_SYNC_SETTINGS\n    android.permission.READ_SYNC_STATS\n    android.permission.RECEIVE_BOOT_COMPLETED\n    [...]\n\nYou can specify multiple apps, using only one request.\n\n### Downloading apps\n\nDownloading an app is really easy, just provide its package name. I only tested with free apps, but I guess it should work as well with non-free as soon as you have enough money on your Google account.\n\n    $ python download.py com.google.android.gm\n    Downloading 2.7MB... Done\n\n    $ file com.google.android.gm.apk\n    com.google.android.gm.apk: Zip archive data, at least v2.0 to extract\n\n### Interactive shell\nAn interactive shell can be started using the `apishell.py` script. It initializes the `api` object and logs you in.\n\n    $ python apishell.py\n\n    Google Play Unofficial API Interactive Shell\n    Successfully logged in using your Google account. The variable 'api' holds the API object.\n    Feel free to use help(api).\n\n    \u003e\u003e\u003e print api.__doc__\n    Google Play Unofficial API Class\n      Usual APIs methods are login(), search(), details(), download(), browse() and list().\n      toStr() can be used to pretty print the result (protobuf object) of the previous methods.\n      toDict() converts the result into a dict, for easier introspection.\n\n    \u003e\u003e\u003e res = api.search(\"angry birds\")\n    \u003e\u003e\u003e for i in res.doc[0].child:\n    ...   print i.title.encode('utf8')\n    ...\n    Angry Birds\n    Angry Birds Seasons\n    Angry Birds Space\n    Angry Birds Rio\n    Angry Birds Space Premium\n    Angry Birds - AngryBirdsBackup\n    Angry Aviary LiteÔÿà Angry Birds\n    [...]\n\nAll results returned by methods such as `search()`, `details()`, ..., are Protobuf objects. You can use `toStr` and `toDict` method from `GooglePlayAPI` to pretty-print them and make introspection easier if you're not familiar with Protobuf.\n\n    \u003e\u003e\u003e s = api.browse()\n    \u003e\u003e\u003e s\n    \u003cgoogleplay_pb2.BrowseResponse object at 0x025DBF48\u003e\n    \u003e\u003e\u003e d = api.toDict(s)\n    \u003e\u003e\u003e d.keys()\n    ['promoUrl', 'category', 'contentsUrl']\n    \u003e\u003e\u003e from pprint import pprint\n    \u003e\u003e\u003e pprint(d['category'])\n    [{'dataUrl': u'browse?c=3\u0026cat=GAME', 'name': u'Jeux'},\n     {'dataUrl': u'browse?c=3\u0026cat=NEWS_AND_MAGAZINES',\n    [...]\n\n### Using the API as a module in another project\n\nYou only need `googleplay.py` and `googleplay_pb2.py`. All other scripts are just front-ends.\n\n    \u003e\u003e\u003e from googleplay import GooglePlayAPI\n    \u003e\u003e\u003e help(GooglePlayAPI)\n\nWhat else?\n\n### To be continued\n\nFeel free to extend the API, add command-line options to scripts, fork the project, and port it to any language.\nYou can generate Protobuf stubs from `googleplay.proto` file with Google's `protoc`:\n\n    $ protoc -h\n    Usage: protoc [OPTION] PROTO_FILES\n    Parse PROTO_FILES and generate output based on the options given:\n    [...]\n      --cpp_out=OUT_DIR           Generate C++ header and source.\n      --java_out=OUT_DIR          Generate Java source file.\n      --python_out=OUT_DIR        Generate Python source file.\n\n## License\n\nThis project is released under the BSD license.\n\n","funding_links":[],"categories":["Python","Tools"],"sub_categories":["Market Crawlers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegirault%2Fgoogleplay-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegirault%2Fgoogleplay-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegirault%2Fgoogleplay-api/lists"}