An unofficial Python API that let you search, browse and download Android apps from Google Play Store
Project description
python-gpapi2
An unofficial Python API that let you search, browse and download Android apps from Google Play Store.
Installation
pip install python-gpapi2
Usage
[!IMPORTANT] Currently, this API is still in development. The API may change in the future.
Many features are not yet implemented at this time, I will continue to work on it.
from gpapi2 import GooglePlayAPI
gpapi = GooglePlayAPI(email="example@gmail.com")
# See README.md section "Obtaining the Google Play Store token" for more information
gpapi.login(aas_token="aas_et/AKpp...")
# Get the details of an app
# NOTE: The method currently returns a JSON string, you can use the
# `json.loads` to convert it to a Python dictionary. I will change it
# to return a user-friendly object in the future.
details = gpapi.details("com.whatsapp")
# Get the version of an app
version, version_code = gpapi.latest_version("com.whatsapp")
# Get the download link of an app
download_link = gpapi.download_url("com.whatsapp", version_code)
Obtaining the Google Play Store token
[!IMPORTANT] Please ensure to protect the OAuth Token or AAS Token obtained below and do not disclose it to anyone, as this could put your Google account at risk.
To use this API, you need to obtain a Google Play Store token. You can do this by following these steps:
-
First, you need to obtain an OAuth token. You can do this by opening the following URL in your browser:
https://accounts.google.com/embedded/setup/v2/android
And then:
-
Open the developer console in your browser (F12)
-
Log in with your Google account on the page that appears.
-
If the Google Terms of Services page appears, accept it. (It can hang up but it's normal)
-
Go to the
Applicationtab of the developer console. -
Expand the
Cookiessection and select thehttps://accounts.google.comentry. -
There should be a cookie named
oauth_token. Copy its value. This is your OAuth token. (It should look likeoauth2_4/0AdL...) -
This token can be used only once.
-
-
Then, you need to obtain an AAS token. Run the following code:
from gpapi2 import GooglePlayAPI email = "example@gmail.com" oauth_token = "oauth2_4/0AdL..." aas_token = GooglePlayAPI.request_aas_token(email, oauth_token) print(aas_token)
You should see a long string of characters. This is your AAS token. It should looks like this:
aas_et/AKpp...j25Q
License
This project is licensed under the MIT License or the Apache License 2.0, at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_gpapi2-0.1.2.tar.gz.
File metadata
- Download URL: python_gpapi2-0.1.2.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
939bf139ee531b8dccfad6c5360355799fa9e83fcbe3009830c2f69513779c98
|
|
| MD5 |
3f48ce8a34453c7180a12d11c7c2e043
|
|
| BLAKE2b-256 |
eb7cd4c0ec3201b9063f25b9ccc060ec1fbfef31e0f120bbf128e73205c23b1a
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-win_amd64.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4d470f2e42c30b4b5de906f256a32097fc5cd80f4b20f5c6a79bb1a814a3da0
|
|
| MD5 |
96f9b2578f6c02b0595bb4ad0dab164f
|
|
| BLAKE2b-256 |
38ca9ce78ef5bf5cd5d4af7a6d07714d5f0889e5d65f97b2cf89247ccba133b7
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-win32.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-win32.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.7+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e00b98c0b06a9243a795131c651ec51c3269be80b95ec5a8cb12d08b94e23b9f
|
|
| MD5 |
a5d87ab6ed46b9ce2e9e8049d64ad328
|
|
| BLAKE2b-256 |
f8a1cc42f20126123290215086feae604258ef04ae40d91f46bbf16f2adee97e
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.7+, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c91e0631bc86973968e44fcca0b9c0f833e5485b529ca9b6a6443f8af697dcd6
|
|
| MD5 |
03ee6f585cd826fa51a0672c280ef219
|
|
| BLAKE2b-256 |
38a9f92b984ef7d415ddecc70fd655f1fde1b32563ba0d52597ecdd602100968
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-musllinux_1_1_aarch64.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-musllinux_1_1_aarch64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.7+, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d7bf4a91601013d9ab316cd73e3e452b929845632c65e2c1eed4fa5b77450a0
|
|
| MD5 |
b0838b2f1a00053d99beb47cbe1ceb7c
|
|
| BLAKE2b-256 |
bbf9728d377f052b97883946d28792080ea7c473c69bc2c34ea0629e9a53fa9a
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ae5ebc778353c2f3680c8ae1c2783727ce6a3ee7c7185262b694e42c27bd15b
|
|
| MD5 |
ac7380c3caaa0101a662642f970dc625
|
|
| BLAKE2b-256 |
9bf9bf25f845eea6bb58e23dea350d32e3d35ddc85de2401038c5874aa6ded93
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61e7db6810956cdaacfb0b31629464f8549b40f0e6580235115143c952946553
|
|
| MD5 |
e4bf2006f75d7407d4f3b8fc57ffd428
|
|
| BLAKE2b-256 |
4a011d14339337b594b3ab64712447b06894d037cefdc182e670d1119d0d2a9f
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a08abb89f8382efdc029f7f08a5c85482be97ae398d87e1905e40e0fea1aae0
|
|
| MD5 |
e3c9b711992b31e253a4a226c7bb8bae
|
|
| BLAKE2b-256 |
eccfed2a0a77ed24fb45c63667027694e228a4d13ca73dc6767457b5ef7f15e8
|
File details
Details for the file python_gpapi2-0.1.2-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: python_gpapi2-0.1.2-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.7+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8514b0632dbc875e47574739bac15cb6579a8f114b9eb5dbd2d7ac7038003b8
|
|
| MD5 |
d11f3aa87924150a14ad8e110182cc4b
|
|
| BLAKE2b-256 |
c96107f3b8f0a94ab89dcfa6eec6198d90e73cbeb3649d828081bcd052469998
|