Skip to main content
The AdsCrawl Ruby SDK works with Ruby 3.1 and later. It uses only the Ruby standard library, supports hash and keyword arguments that mirror the HTTP API’s camelCase field names, and provides explicit HTTP deadlines with credential-redacted errors.
Keep your API key in server-side code. Never expose it in client-side applications.

Install

Or add it to your bundle:

adscrawl-ruby on GitHub

View source, runnable examples, and releases.

Authenticate and make your first request

Create an API key in the dashboard and set ADSCRAWL_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

AdsCrawl uses real browsers with configurable routing and browser fingerprints. Randomized settings are generated as a coherent profile across the operating system, GPU, hardware, fonts, and related signals. This browser workflow has been verified to access and render BrowserScan, Pixelscan, and IPhey and return screenshots.

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

API-key starts and launches require an explicit top-level custom proxy. A 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

The API key defaults to 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.