A Python SDK for the Scrape.do web-scraping proxy API, built on httpx and pydantic v2
pip install scrape-do-pythonfrom scrape_do import ScrapeDoClient
# API token is pulled from `SCRAPE_DO_API_KEY`
# (override with `api_token=...`)
with ScrapeDoClient() as client:
response = client.get(
"https://example.com",
super=True,
render=True,
return_json=True,
screenshot=True,
)
response.raise_for_status()
print(response.target_status_code) # 200
print(response.remaining_credits) # 300000.0
response.screenshots[0].to_file("page.png")| Sync & Async | Sync and Async clients for both API Gateway and Proxy Mode |
| Async API Support | Submit, poll, and fetch jobs against q.scrape.do with the Async API Client |
| Parameter Validation | Every request parameter is validated locally by the RequestParameters pydantic model |
| Typed Responses | ScrapeDoResponse exposes response fields as pydantic models for easy access |
| Browser Automation | Build playWithBrowser sequences from typed Browser Action Models |
| Session Management | Use a custom session_validator function to track proxy rotations when using the session_id parameter
|
| Native Event Hooks | Provide custom request / response / retry / poll hooks that fire at the logical execution boundary |
| Automatic Retries | All clients implement automatic retries on transient gateway/network errors with a customisable Backoff Strategy |
| Documentation | Full API Reference |
| Examples | Curated Usage Examples |
| Roadmap | What's Planned |
| Changelog | What's Already Shipped |
Pull Requests, bug reports, and feature requests are all welcome
See
CONTRIBUTINGfor local setup, test commands, and PR conventions