context.Context cancellation and deadlines, and provides typed request and response models.
Keep your API key in server-side code. Never expose it in client-side applications.
Install
adscrawl-go 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.NewClient(adscrawl.Config{APIKey: "..."}).
Rendered content and screenshots
client.HTML(ctx, options) returns HTML; Markdown returns Markdown; Article returns a structured Article; Screenshot returns PNG bytes. Page options include Viewport, Locale, Cookies, Proxy, managed CountryCode, Fingerprint, server-side TimeoutMS, and navigation WaitUntil.
Proxy and CountryCode cannot be combined.
Proxy and fingerprint
Structured extraction
client.SPA.Templates(ctx) lists built-in templates. client.SPA.Inspect(ctx, options) suggests fields and schema.
Remote CDP browsers
GetVersion validates the token URL and does not forward the API key.
Persistent cloud browsers
stopping response means shutdown is pending; poll Get until stopped. A failed launch may return a cleanup profile ID in *adscrawl.APIError.
Configuration and errors
PassConfig{Timeout: 75 * time.Second} to change the HTTP deadline. Set PageOptions.TimeoutMS to control the remote browser task separately.
ADSCRAWL_API_KEY supplies the key by default. The base URL defaults to ADSCRAWL_BASE_URL, then ADSCRAWL_API_URL, then https://api.adscrawl.net. Errors include APIError, TimeoutError, ConnectionError, and ResponseError. The HTTP deadline includes response body reading. Cancelling a request does not prove remote browser work stopped.