Skip to main content

serpcheap-django

Django integration for the serp.cheap Google Search API — real-time Google SERP data (organic results, ads, knowledge graph, page scraping, rank tracking), wrapped as a Django app with settings, cached client, and a management command.

It's the cheapest Google Search API we know of — $0.0003 per cached search, $0.0006 fresh, no monthly minimum (~10× cheaper than SerpApi).

Wraps the serpcheap Python SDK with a Django app, settings-driven config, transparent result caching via Django's cache framework, and a management command.

Install

pip install serpcheap-django

Add the app and configure it in settings.py:

INSTALLED_APPS = [
    # ...
    "serpcheap_django",
]

SERPCHEAP = {
    "API_KEY": os.environ["SERPCHEAP_API_KEY"],  # get one at https://app.serp.cheap
}

Usage

from serpcheap_django import serpcheap

results = serpcheap.search("best running shoes", gl="us")
page = serpcheap.scrape("https://example.com")
rank = serpcheap.rank("example.com", "best running shoes")

Results are cached by default (keyed by query + options) using your default Django cache, so repeat calls don't spend credits. Reach the raw, uncached SDK client when you need it:

from serpcheap_django import get_client

for page in get_client().client.search_pages("best running shoes", to=3):
    ...

Management command

python manage.py serpcheap_search "best running shoes" --gl us --page 1
python manage.py serpcheap_search "best running shoes" --json

Configuration

All keys are optional except API_KEY:

SERPCHEAP = {
    "API_KEY": "...",                       # required
    "BASE_URL": "https://api.serp.cheap",
    "TIMEOUT_MS": 15000,
    "MAX_RETRIES": 2,
    "CACHE": {
        "ENABLED": True,
        "ALIAS": "default",                 # any cache alias from settings.CACHES
        "TTL": 3600,
    },
}

Set CACHE["ENABLED"] = False to disable result caching entirely.

License

MIT

Metadata

Release files for serpcheap-django 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for serpcheap-django 0.2.0
File Size Uploaded
serpcheap_django-0.2.0.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for serpcheap-django 0.2.0
File Interpreter ABI Platform
serpcheap_django-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / serpcheap_django-0.2.0.tar.gz

Download URL serpcheap_django-0.2.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e1ff65a8d861dfc2306f060ad5b57b6f7162a563d0f29ac09903481e79b0eb96
BLAKE2b-256 checksum
How to use checksums
0e58f87fa19a1c68e049c5b26c3e8efdf3ff7126651e98feaf299ead4c0e7445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / serpcheap_django-0.2.0-py3-none-any.whl

Download URL serpcheap_django-0.2.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f7761a771edc68be8e0a6a20360da870d89d4e46cbd4c33ed0eaa11a3cd877a
BLAKE2b-256 checksum
How to use checksums
d65a6d225a2f0a001c60b7aaaf08fd5494846c2a78b8adee105af53f8144fcf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page