Skip to main content

Single API ☝ App Store Review Scraper 🧹

Project description

build PRs Welcome PyPI downloads license code style

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

Quickstart

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

fortnite = AppStore(country="nz", app_name="fortnite")
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 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:

>>> fortnite
AppStore(country='nz', app_name='fortnite', app_id=1261357853)
>>> print(app)
     Country | nz
        Name | fortnite
          ID | 1261357853
         URL | https://apps.apple.com/nz/app/fortnite/id1261357853
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 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.2.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

app_store_scraper-0.2.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: app-store-scraper-0.2.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.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.2.2.tar.gz
Algorithm Hash digest
SHA256 9edc7382620b550a35cbc852fd5ed5bc8922c6762d662bcd2c6c3fc47865fba6
MD5 89c2661ca6cc6d9d098cccc45d1dda1d
BLAKE2b-256 bc724dc6d539f9eacaf628861807e19567af3e7540e404adec9e2cc985e2ecef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: app_store_scraper-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b5c9fc56006103612fc7d682897a2a7b68dda0e31f62a87b767c2792616b2615
MD5 913a0ac34cc864dc9ea2bafeb5aed29d
BLAKE2b-256 11f7775fa491919ece67612afc04a3536489c82c0257b42fb6a7ed3091af1be9

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