Skip to main content

Playfast - Lightning-Fast Google Play Store Scraper

Project description

Playfast โšก

Lightning-Fast Google Play Store Scraper

License: MIT Python 3.11+ Built with Rust CI Coverage PyPI Documentation

Playfast is a high-performance Google Play Store scraper built with Rust + PyO3, delivering 5-10x faster performance with true parallel batch processing.

โœจ Features

  • ๐Ÿš€ Blazingly Fast: Batch API is 5-10x faster than sequential
  • โšก True Parallel: Rust core completely releases GIL
  • ๐Ÿฆ€ Pure Rust: HTTP + parsing all in Rust for maximum performance
  • ๐Ÿ”’ Type Safe: Full Pydantic validation and type hints
  • ๐Ÿ’พ Memory Efficient: Only 1.5 KB per app, linear scaling
  • ๐ŸŒ Multi-Country: 247 countries, 93 unique Play Stores
  • ๐Ÿ“ฆ Batch API: High-level functions for easy parallel processing

๐Ÿ“Š Performance

Batch Processing makes bulk operations 5-10x faster through true Rust parallelism!

Method Time Speedup
Batch API ~3s 6-8x ๐Ÿš€
RustClient + ThreadPool ~3-4s 6-7x
AsyncClient (concurrent) ~3-5s 5-7x
Sequential ~20-30s 1x

Benchmark: Fetching 3 apps across 3 countries (9 requests total)

๐Ÿš€ Quick Start

Installation

Using pip (traditional):

pip install playfast

Using uv (recommended - faster):

uv add playfast

Using poetry:

poetry add playfast

Option 1: Batch API (Recommended - Easiest & Fastest)

from playfast import fetch_apps

# Fetch multiple apps across countries (parallel!)
apps = fetch_apps(
    app_ids=["com.spotify.music", "com.netflix.mediaclient"],
    countries=["us", "kr", "jp"],
)
print(f"Fetched {len(apps)} apps in ~3 seconds!")

Option 2: RustClient (Maximum Performance)

from playfast import RustClient

client = RustClient()

# Get app information (GIL-free!)
app = client.get_app("com.spotify.music")
print(f"{app.title}: {app.score}โญ ({app.ratings:,} ratings)")

# Get reviews
reviews, next_token = client.get_reviews("com.spotify.music")
for review in reviews[:5]:
    print(f"{review.user_name}: {review.score}โญ")

Option 3: AsyncClient (Easy Async)

import asyncio
from playfast import AsyncClient


async def main():
    async with AsyncClient() as client:
        app = await client.get_app("com.spotify.music")
        print(f"{app.title}: {app.score}โญ")


asyncio.run(main())

๐Ÿ“š Examples

See the examples/ directory for more:

๐Ÿ“– Documentation

๐Ÿ—๏ธ Architecture

Playfast uses pure Rust for both HTTP and parsing:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Python Layer                      โ”‚
โ”‚   - Batch API (high-level)          โ”‚
โ”‚   - RustClient / AsyncClient        โ”‚
โ”‚   - Pydantic Models                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚ PyO3 Bindings
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Rust Core                         โ”‚
โ”‚   - HTTP Client (reqwest)           โ”‚
โ”‚   - HTML Parser (scraper)           โ”‚
โ”‚   - Parallel Processing (rayon)     โ”‚
โ”‚   - Complete GIL Release            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Three Client Options

Method Speed Ease Best For
Batch API โšกโšกโšก โญโญโญ Multiple items
RustClient โšกโšกโšก โญโญ Single items
AsyncClient โšกโšก โญโญ Async code

๐ŸŒ Multi-Country Optimization

Playfast optimizes global data collection:

from playfast import get_unique_countries, get_representative_country

# Instead of 247 countries, use 93 unique stores (2.7x faster!)
unique = get_unique_countries()  # 93 unique Play Stores

# Get representative for any country
rep = get_representative_country(
    "fi"
)  # Finland โ†’ Vanuatu store (shared by 138 countries)

๐Ÿ”ง Development

# Clone repository
git clone https://github.com/mixL1nk/playfast.git
cd playfast

# Install dependencies
uv sync

# Build Rust extension
uv run maturin develop --release

# Run tests
uv run pytest

# Run examples
uv run python examples/basic.py

# Run benchmarks
uv run python benchmarks/batch_apps_benchmark.py

See Development Setup for detailed instructions.

๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

๐Ÿ“ License

MIT License - see LICENSE for details.

๐Ÿ™ Acknowledgments

โš ๏ธ Disclaimer

This tool is for educational and research purposes only. Please respect Google Play Store's Terms of Service. Use responsibly with appropriate rate limiting.


Made with โค๏ธ using Rust + Python

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

playfast-0.5.0.tar.gz (291.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

playfast-0.5.0-cp311-abi3-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11+Windows x86-64

playfast-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

playfast-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file playfast-0.5.0.tar.gz.

File metadata

  • Download URL: playfast-0.5.0.tar.gz
  • Upload date:
  • Size: 291.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.6

File hashes

Hashes for playfast-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4afc3d77174c906ed39b3495fe6c74927153488699c06228b6550f833aedfba1
MD5 b5970e1a3870b643e05dd83ef8158b93
BLAKE2b-256 aee912452cc022da5d389d916a1f35de690fcba7a44dcd4dd87a1c7dbc8a109b

See more details on using hashes here.

File details

Details for the file playfast-0.5.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: playfast-0.5.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.6

File hashes

Hashes for playfast-0.5.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b9966571f043c2b77dffacd6f69df314fe54b2de9c31ca6bd6b21809d1760e53
MD5 98bafbc2239c32ee46967c80315ea672
BLAKE2b-256 088e47ee7dd8249a776ac7354735b532eedb7d8b5a691f930228de24bad86190

See more details on using hashes here.

File details

Details for the file playfast-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for playfast-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ca0008de4d3e66ad36889935611e58e3f23793fef839dceecf0c11d68513eec
MD5 1b7cd47f330c96eb0c244d29205466ff
BLAKE2b-256 71b74f8d1e7946f8cdbc27aad1a7db4425cac35400bb238caddaac859d0a57ee

See more details on using hashes here.

File details

Details for the file playfast-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for playfast-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 409d2ef4ea6158f747c3c3c7c0fee22549d6502b2af345f637347e3741373bd9
MD5 9883247f68f5916bac262b894e600459
BLAKE2b-256 ab2254800d2228fd33185f42151395418338632ae5b6cfdf30baea35723ccf88

See more details on using hashes here.

Supported by

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