Skip to main content

Single API ☝ App Store Review Scraper 🧹

Project description

build PRs Welcome PyPI downloads license code style

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

Quickstart

Install:

pip3 install app-store-scraper

Scrape reviews for an app:

from app_store_scraper import AppStore
from pprint import pprint

minecraft = AppStore(country="nz", app_name="minecraft")
minecraft.review(how_many=20)

pprint(minecraft.reviews)
pprint(minecraft.reviews_count)

Scrape reviews for a podcast:

from app_store_scraper import Podcast
from pprint import pprint

sysk = Podcast(country="nz", app_name="stuff you should know")
sysk.review(how_many=20)

pprint(sysk.reviews)
pprint(sysk.reviews_count)

Extra Details

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

Instantiation

There are two required and one positional parameters:

  • country (required)
  • app_name (required)
    • name of an iOS application to fetch reviews for
    • also used by search_id() method to search for app_id internally
  • app_id (positional)
    • can be passed directly
    • or ignored to be obtained by search_id method internally

Once instantiated, the object can be examined:

>>> minecraft
AppStore(country='nz', app_name='minecraft', app_id=479516143)
>>> print(app)
     Country | nz
        Name | minecraft
          ID | 479516143
         URL | https://apps.apple.com/nz/app/minecraft/id479516143
Review count | 0

Other optional parameters are:

  • 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 5 seconds (by default) as a "heartbeat" (useful for a long scraping session)
    • default is 5

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.

>>> minecraft.review(how_many=33)
>>> minecraft.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.

Optional Parameters

  • after
    • a datetime object to filter older reviews
  • sleep
    • an int to specify seconds to sleep between each call

Review Data

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

>>> minecraft.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.3.5.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

app_store_scraper-0.3.5-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: app-store-scraper-0.3.5.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for app-store-scraper-0.3.5.tar.gz
Algorithm Hash digest
SHA256 1ad400af5581cdd0b443ba30cc9a985f26f86981a8745fe7e460e09d4cd8832a
MD5 1057370ac2da0986fc35d0774c30e646
BLAKE2b-256 cabec72a0a7b26c384f9b7126a1dea7987aeefd19673fe8476d93fdd8ec83755

See more details on using hashes here.

File details

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

File metadata

  • Download URL: app_store_scraper-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for app_store_scraper-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 36d926909672d9645ae21c5bf3e26c50509b16992723b13b34f09565e9dc3822
MD5 6b7f5f484a41d3171908d4dd92216125
BLAKE2b-256 ba2e35eb1628b550d5e936f0a9171c1e3ea978288849693d3c6daab9e74cbab9

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