No project description provided
Project description
appstorescraperpy
Apple App Store Scraper written in python
Apple App Store Scraper
This is based on cowboy-bebug's app-store-scraper (now deprecated) as this is the only project I've seen that is able to retrieve all the App Store reviews. The project is now deprecated and Apple has changed some of the ways to retrieve the data compared to cowboy-bebug's method.
I initially used this on an Azure Function and I did not implement custom classes and let the caller parse the JSON data themselves. This iteration I included classes to handle the data.
Usage
Basic usage
To get the app details, ratings, and reviews with this library, you must use the app ID. This can be seen in the URL of the app page.
For example, Facebook's URL in the App Store is:
https://apps.apple.com/us/app/facebook/id284882215
The app ID is
284882215
Sample code
import appstorescraper
# Let's use Facebook's app ID '284882215'
# by default get_app will use country='us'
# you can change the country. just follow ISO 3166 format for the
# country codes
app = appstorescraper.get_app(app_id='284882215',country='us')
# you can get the raw data from the app store by doing
print(app.data)
For ratings data
# To get the average ratings
print(app.ratings.average)
# To get each star count you can either
one_star = app.ratings.list[0]
two_star = app.ratings.list[1]
three_star = app.ratings.list[2]
four_star = app.ratings.list[3]
five_star = app.ratings.list[4]
# or you can do
app.ratings.one_star
app.ratings.two_star
app.ratings.three_star
app.ratings.four_star
app.ratings.five_star
# to get the raw data from the App Store
print(app.ratings.data)
Sample ratings data
{
"ariaLabelForRatings": "4.9 stars",
"ratingCount": 318959,
"ratingCountList": [
3925,
928,
2700,
10776,
300630
],
"value": 4.9
}
For reviews
Reviews are sorted by the most recent review.
Just a note: the App Store puts out a maximum of 20 reviews per call. This library takes care of that limitation. You can still try to get all reviews with this library, but I had cases where I got blocked by the App Store for calling the API too much
There are two ways to get reviews:
app.reviews
# By using app.reviews
# This is an iterator so you can use next()
print(next(app.reviews))
# or use a for loop
for review in app.reviews:
print(review)
# you can also get the nth review
# note that this will still get all the reviews before it (1-9 will still be loaded and stored)
print(app.reviews[10])
app.get_reviews()
# By using app.get_reviews()
# This provides more control
# arguments
# count: how many reviews to retrieve, sorted by the most recent review
# offset: which review index to start, useful when you want to get older reviews so you don't have to load other reviews
# usage
reviews = app.get_reviews(count=100,offset=0)
The next ones did not get tested thoroughly so use with caution
get_countries_with_reviews
This gives you a list of countries which has at least one retrievable review. This is an expensive all as it goes through all countries and get one review for checking
It returns a dictionary list with data
{
"alpha_2": "{country_code}",
"name": "{country_name}"
}
Sample usage
from appstorescraper.core import AppleScraper
for country in AppleScraper.get_countries_with_reviews(app_id,sleep=1):
print(country)
check_review_availability
This checks if a given country code has a retrievable review. Note that is still possible for a country to have a rating but no review
Sample usage
from appstorescraper.core import AppleScraper
app_id = '284882215'
print(AppleScraper.check_review_availability(app_id, 'ph'))
Sample result
{
"has_reviews": true,
"status_code": 200,
"message": ""
}
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 Distribution
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 appstorescraperpy-0.1.0.tar.gz.
File metadata
- Download URL: appstorescraperpy-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8ada6ec78bc1c28b812630c600b1d4464dea58825baed30db897599984a6f41
|
|
| MD5 |
ab69698c18762b0636859ae9d25558ae
|
|
| BLAKE2b-256 |
cd8f1a068e83f1675bee849bbe4390098bd383d10e2f8b67e76e48c46c6acf6c
|
Provenance
The following attestation bundles were made for appstorescraperpy-0.1.0.tar.gz:
Publisher:
publish.yml on SpeakingStapler/appstorescraperpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
appstorescraperpy-0.1.0.tar.gz -
Subject digest:
d8ada6ec78bc1c28b812630c600b1d4464dea58825baed30db897599984a6f41 - Sigstore transparency entry: 878539163
- Sigstore integration time:
-
Permalink:
SpeakingStapler/appstorescraperpy@09def3944c0dbfda9e76af4125fd88c0abf78bdf -
Branch / Tag:
refs/tags/release/v0.1.0 - Owner: https://github.com/SpeakingStapler
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@09def3944c0dbfda9e76af4125fd88c0abf78bdf -
Trigger Event:
release
-
Statement type:
File details
Details for the file appstorescraperpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: appstorescraperpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
194391551722935ea773f07306307b1e99e61b7aa9edc30c0a94199a6fcbccc3
|
|
| MD5 |
5b9e84d922fc48462ac2a4a6b5929bb8
|
|
| BLAKE2b-256 |
7608356776f088a611e666766c3e1829ede30f7c84a7966e78a130e494868819
|
Provenance
The following attestation bundles were made for appstorescraperpy-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on SpeakingStapler/appstorescraperpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
appstorescraperpy-0.1.0-py3-none-any.whl -
Subject digest:
194391551722935ea773f07306307b1e99e61b7aa9edc30c0a94199a6fcbccc3 - Sigstore transparency entry: 878539192
- Sigstore integration time:
-
Permalink:
SpeakingStapler/appstorescraperpy@09def3944c0dbfda9e76af4125fd88c0abf78bdf -
Branch / Tag:
refs/tags/release/v0.1.0 - Owner: https://github.com/SpeakingStapler
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@09def3944c0dbfda9e76af4125fd88c0abf78bdf -
Trigger Event:
release
-
Statement type: