Skip to main content

Single API ☝ App Store Review Scraper 🧹

Project description

Build PRs Welcome Code style: black

   ___                _____ _                   _____
  / _ \              /  ___| |                 /  ___|
 / /_\ \_ __  _ __   \ `--.| |_ ___  _ __ ___  \ `--.  ___ _ __ __ _ _ __   ___ _ __
 |  _  | '_ \| '_ \   `--. \ __/ _ \| '__/ _ \  `--. \/ __| '__/ _` | '_ \ / _ \ '__|
 | | | | |_) | |_) | /\__/ / || (_) | | |  __/ /\__/ / (__| | | (_| | |_) |  __/ |
 \_| |_/ .__/| .__/  \____/ \__\___/|_|  \___| \____/ \___|_|  \__,_| .__/ \___|_|
       | |   | |                                                    | |
       |_|   |_|                                                    |_|

Quickstart

pip3 install app-store-scraper
from app_store_scraper import AppStore
from pprint import pprint

fortnite = AppStore(country="nz", app_name="fortnite", app_id=1261357853)
fortnite.review(how_many=20)

pprint(fortnite.reviews)
pprint(fortnite.reviews_count)

Extra Details

Let's continue from the code example used in Quickstart.

Instantiation

There are three required arguments, country, app_name, app_id.

>>> fortnite
AppStore(country=nz, app_name=fortnite, app_id=1261357853)

These are required to create a URL for the App Store landing page, which can be displayed by the private field, landing_url like below:

>>> fortnite.landing_url
'https://apps.apple.com/nz/app/fortnite/id1261357853'

There are optional arguments used to override log settings:

  • log_format
    • passed directly to logging.basicConfig(format=log_format)
    • default is "%(asctime)s [%(levelname)s] %(name)s - %(message)s"
  • log_level
    • passed directly to logging.basicConfig(level=log_level)
    • default is "INFO"
  • log_interval
    • log is produced every 10 seconds (by default) as a "heartbeat" (useful for a long scraping session)
    • default is 10

Fetching Review

The maximum number of reviews fetched per request is 20. To minimise the number of calls, the limit of 20 is hardcoded. This means the review() method will always grab more than the how_many argument supplied with an increment of 20.

>>> fortnite.review(how_many=33)
>>> fortnite.reviews_count
40

If how_many is not provided, review() will terminate after all reviews are fetched.

NOTE the review count seen on the landing page differs from the actual number of reviews fetched. This is simply because only some users who rated the app also leave reviews.

Review Data

The fetched review data are loaded in memory and live inside reviews attribute as a list of dict.

>>> fortnite.reviews
[{'userName': 'someone', 'rating': 5, 'date': datetime.datetime(...

Each review dictionary has the following schema:

{
    "date": datetime.datetime,
    "isEdited": bool,
    "rating": int,
    "review": str,
    "title": str,
    "userName": str
 }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

app-store-scraper-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

app_store_scraper-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file app-store-scraper-0.1.1.tar.gz.

File metadata

  • Download URL: app-store-scraper-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for app-store-scraper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cfe65af33b363af9f0214fc61fdfffd3241efdbbc355f87011250ff59ac148fb
MD5 3efea74cb5714ae75be558cf22a04e05
BLAKE2b-256 5ccacf6373e09ba00e373efb7b1b85f7b849b445fb36d26c6073685bd214b422

See more details on using hashes here.

File details

Details for the file app_store_scraper-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: app_store_scraper-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for app_store_scraper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa9797bb427dd506663e7dfc165d45b9fe5e36e4ceb184bdfc2630ef493a8c0
MD5 c0a23f43221266cfa0353b6bd2d30942
BLAKE2b-256 ff7537debe7e96f59654b655e095894a6ca87a02009e0489c57826c620857a62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page