Keep your API key in server-side code. Never expose it in client-side applications.
Install
adscrawl-ruby 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 to AdsCrawl::Client.new(api_key: "...").
Rendered content and screenshots
html returns HTML, markdown returns Markdown, article returns a Hash, and screenshot returns binary PNG data. Page options include viewport, locale, cookies, custom proxy, managed countryCode, fingerprint, server-side timeoutMs, and navigation waitUntil. A custom proxy and managed country cannot be combined.
Proxy and fingerprint
Structured extraction
Remote CDP browsers
client.cdp.list returns active sessions. get_version validates the session token URL and deliberately omits the API key. CDP connection URLs contain secrets; do not log them.
Persistent cloud browsers
stopping response means shutdown is pending; poll get until stopped. A failed launch may expose a cleanup profile ID as APIError#resource_id.
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 APIError, TimeoutError, ConnectionError, and ResponseError. API response bodies are credential-redacted. The HTTP deadline includes response body reading. Requests are not automatically retried.