Keep your API key in server-side code. Never expose it in client-side applications.
Install
adscrawl-python on GitHub
View source, runnable examples, and releases.
Authenticate and make your first request
Create an API key in the dashboard and setADSCRAWL_API_KEY in your server environment. You can also pass the key explicitly to AdsCrawl(api_key="...").
Rendered content and screenshots
html() returns HTML by default. markdown() returns Markdown, article() returns a dictionary, and screenshot() returns PNG bytes. Use a custom proxy or managed countryCode; they cannot be combined.
Proxy and fingerprint
Structured extraction
missingFields.
Remote CDP browsers
cdp.list() returns {"ok": True, "data": [...]}. cdp.get_version(session) discovers the WebSocket endpoint without forwarding the API key. Connection URLs contain secrets and should not be logged.
Persistent cloud browsers
proxy every time. A stopping response does not confirm shutdown; poll get() until stopped. Failed launches can expose a cleanup id as AdsCrawlAPIError.id.
Async client
Configuration and errors
ADSCRAWL_API_KEY. The base URL defaults to ADSCRAWL_BASE_URL, then ADSCRAWL_API_URL, then https://api.adscrawl.net. Errors include AdsCrawlAPIError, AdsCrawlTimeoutError, AdsCrawlConnectionError, and AdsCrawlResponseError. API response bodies are credential-redacted. The HTTP deadline includes response body reading. Requests are not automatically retried.