API Documentation
Before you can download an APK, you need the following elements:
- API Key: Your personal API key for accessing the service.
- SHA256: The SHA256 hash of the APK you want to download.
Once you have both of these, you can proceed with downloading the APK using one of the following methods.
Methods to Download an APK
1. Using Curl (Command-Line Utility on Linux):
Run the following command in your terminal to download the APK:
curl -O --remote-header-name -G -d apikey=${APIKEY} -d sha256=${SHA256} \
https://androzoo.uni.lu/api/download
Note: A valid request does NOT contain any '$', '{', or '}'. Ensure that that parts are replaced with actual values.
Please use at most ~20 concurrent downloads.
2. From Your Browser (e.g. Firefox, Chrome, Safari, Opera...):
Simply paste the following URL in your browser's address bar:
https://androzoo.uni.lu/api/download?apikey=${APIKEY}&sha256=${SHA256}
Note: A valid request does NOT contain any '$', '{', or '}'. Ensure that that parts are replaced with actual values.
3. Using the az Script (Thanks to Artsiom Kushniarou's Contribution):
For more details, check out the az GitHub repository and consider starring it!
az -n 10 -d 2015-12-11: -s :3000000 -m play.google.com,appchina
This command downloads 10 APKs starting from December 11, 2015, with a maximum size of 3,000,000 bytes. The APKs will be from either play.google.com or appchina.
Obtaining SHA256 Hashes
You can download the entire list of APKs available on AndroZoo as a compressed CSV file.
The file is updated nightly (before 6am Luxembourg/Paris time).
The file is quite big (>2.7GB compressed).
Download the latest CSV file here: latest.csv.gz
The CSV file contains the following fields:
- sha256, sha1, md5: These are the standard cryptographic hashes.
- apk_size: The size of the APK file in bytes.
- dex_size: The size of the classes.dex file, excluding other dex files.
- dex_date: The date attached to the dex file inside the APK. Note: This field is often unreliable as many apps from Google Play have a 1980 date.
- pkg_name, vercode: The package name and version code of the APK, as reported in the manifest file. Note: Some package names may be unique to a particular market.
- vt_detection, vt_scan_date: The number of VirusTotal (VT) engines that flagged the APK as malware, along with the scan date.
- markets: A '|' separated list of the markets where the APK was detected. The absence of a market doesn't mean the APK wasn't published there. It means we did not see it there.
In addition to the standard CSV, we provide another CSV file with the "added" field.
- added: The date the APK was added to AndroZoo.
Note: An APK may have existed for years before it was added to AndroZoo.
Examples of Filtering the APK List
You can filter the list based on various criteria. Below are a few examples for the latest.csv.gz file:
- Only APKs from Google Play Store:
zcat latest.csv.gz | awk -F, '{if ($11 ~ /play\.google\.com/) {print} }'
- APKs larger than 10,000,000 bytes:
zcat latest.csv.gz | awk -F, '{if ($5 >10000000 ) {print} }'
- APKs detected by at least 2 Antivirus engines:
zcat latest.csv.gz | awk -F, '{if ($8 >=2 ) {print} }'
- APKs with a dex_date after 2018-12-01:
zcat latest.csv.gz | awk -F, '{if ( $4 >= "2018-12" ) {print} }'
- APKs with a dex_date before 2019-11-30:
zcat latest.csv.gz | awk -F, '{if ( $4 < "2019-11-30" ) {print} }'
- Extract only the list of selected SHA256 hashes:
zcat latest.csv.gz | cut -d',' -f1 > list_of_selected_sha256
Important Note About the "snaggamea" APK
There is one known issue with the "snaggamea" APK. The APK with the SHA256 BC564D52C6E79E1676C19D9602B1359A33B8714A1DC5FCB8ED602209D0B70266
has a malformed pkg_name that contains a comma. This can cause issues when parsing the data.
To avoid processing this APK, you can filter it out from your queries with the following command:
grep -v ',snaggamea'
This will exclude any records containing "snaggamea" from your CSV results.
Then you can finally combine multiple filters into one command. For example:
zcat latest.csv.gz | grep -v ',snaggamea' | awk -F, '{if ($11 ~ /play\.google\.com/) {print} }' | awk -F, '{if ($5 >10000000 ) {print} }' | awk -F, '{if ($8 >=2 ) {print} }' | awk -F, '{if ( $4 >= "2018-12" ) {print} }' | awk -F, '{if ( $4 >= "2019-11-30" ) {print} }' | cut -d',' -f1 > list_of_selected_sha256