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 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

pip install 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.3.2.tar.gz (274.7 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.3.2-cp311-abi3-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11+Windows x86-64

playfast-0.3.2-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.3.2-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.3.2.tar.gz.

File metadata

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

File hashes

Hashes for playfast-0.3.2.tar.gz
Algorithm Hash digest
SHA256 57e7c5545b7f5ac9e72d813a80aad295344b44ee200992eec571a1a77bea377b
MD5 e178da474d5708761656e4df6474cf4d
BLAKE2b-256 b42e0e2b15b728aae949cb270289b13658488403f0b6dfdae857b53cc11ce24d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playfast-0.3.2-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.3.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f09049b33b19b62bd90d62b7370ea12795eb0fd9201bceac6c15b2cae6d0decd
MD5 6b1cfa91b0283c5e76a1038bd3a2648a
BLAKE2b-256 da5a36ca6a0ae74520463e37ef07ab7ff4a778b88e122241caa21d5e41922973

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playfast-0.3.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a8bc18da8d9aa77472a0c6b5e6c5bf5a1d64bef6c63b7e37e0d25b1eaeb19cb
MD5 4de759a34f49aa6badaf5bf8261511c9
BLAKE2b-256 e9c0fdaa7c36f561fe7b054485f96dbfe1657231808b70635478fb858e246186

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playfast-0.3.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8d1053eb2ed8d9afe36d50ba746520b50599fb896192b893f05ae186c04af967
MD5 e608d324c75d14eda3016a505295e653
BLAKE2b-256 c2c295c9cf741447125b5ad72f2e82cdfda4035f857f0a18a9e7321a01b89f1f

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