SDKs
Python SDK

Python SDK

A synchronous, typed client over every SuperScraper endpoint.

⚠️

Not published. There is no SuperScraper package on PyPI. pip install superscraper fetches an unrelated third-party project by a different author, do not run it. The source lives in this repository at packages/sdk-python; everything below describes that source, not an installable release.

Use the REST API instead

requests (or httpx) covers the same surface with no dependency on an unreleased package:

import os, requests
 
r = requests.post(
    "https://api.superscraper.dev/v1/scrape",
    headers={"x-api-key": os.environ["SUPERSCRAPER_API_KEY"]},
    json={"url": "https://example.com"},
    timeout=60,
)
r.raise_for_status()
print(r.json()["markdown"])

See the Quickstart and the API reference for every endpoint and parameter.

Running the source locally

Clone the repository and add packages/sdk-python to your PYTHONPATH (or install it from the local path). Requires Python 3.9+ and httpx.

Scrape in 5 lines

from superscraper import SuperScraper
 
# Reads SUPERSCRAPER_API_KEY from the environment (or pass api_key="...").
client = SuperScraper()
 
page = client.scrape("https://example.com")
print(page["markdown"])

Constructor

SuperScraper(api_key=None, base_url=None, timeout=60.0)
ParamDefaultEnv var
api_key, (raises ValueError if missing)SUPERSCRAPER_API_KEY
base_urlhttps://api.superscraper.devSUPERSCRAPER_BASE_URL
timeout60.0

The client is also a context manager (with SuperScraper() as client: ...).

More calls

# Structured extraction with an LLM schema
extracted = client.extract(
    "https://example.com/product",
    schema={"name": "string", "price": "number", "description": "string"},
)
print(extracted.data)
 
# Pre-built Google Maps scraper
leads = client.scrape_google_maps("plumbers", location="Austin, TX", max_results=20)
for biz in leads.results:
    print(biz)
 
# Enrich a domain
enriched = client.enrich_website("acme.com")
print(enriched.emails, [t.name for t in enriched.tech_stack])

See the API Reference for every parameter each method accepts.