Skip to main content
The AdsCrawl PHP SDK works with PHP 8.1 and later. It requires only the standard JSON and cURL extensions, uses explicit HTTP deadlines, and returns credential-redacted errors.
Keep your API key in server-side code. Never expose it in client-side applications.

Install

adscrawl-php 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 new Client(apiKey: '...').

Rendered content and screenshots

html() returns HTML, markdown() returns Markdown, article() returns an associative array, and screenshot() returns PNG bytes. 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. getVersion() 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 ApiException::$resourceId.

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 ApiException, TimeoutException, ConnectionException, and ResponseException. API response bodies are credential-redacted. The HTTP deadline includes response body reading. Requests are not automatically retried.