curl -sS -X POST "https://api.adscrawl.net/screenshot" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"viewport": { "width": 1440, "height": 900 },
"fullPage": true,
"waitUntil": "load",
"countryCode": "GLOBAL",
"userAgentMode": "random",
"userAgentOs": "windows"
}' \
--output page.png
curl -sS -X POST "https://api.adscrawl.net/screenshot" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"selector": "#hero",
"waitUntil": "load",
"countryCode": "US"
}' \
--output hero.png
import fs from "fs";
const response = await fetch("https://api.adscrawl.net/screenshot", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
url: "https://example.com",
viewport: { width: 1440, height: 900 },
fullPage: true,
waitUntil: "load",
countryCode: "GLOBAL",
userAgentMode: "random",
userAgentOs: "windows",
}),
});
if (!response.ok) {
const err = await response.json();
throw new Error(`${response.status} ${err.code}: ${err.error}`);
}
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("page.png", buffer);
import httpx
response = httpx.post(
"https://api.adscrawl.net/screenshot",
headers={
"content-type": "application/json",
"x-api-key": "YOUR_API_KEY",
},
json={
"url": "https://example.com",
"viewport": {"width": 1440, "height": 900},
"fullPage": True,
"waitUntil": "load",
"countryCode": "GLOBAL",
"userAgentMode": "random",
"userAgentOs": "windows",
},
)
response.raise_for_status()
with open("page.png", "wb") as f:
f.write(response.content)
HTTP/1.1 200 OK
Content-Type: image/png
<binary PNG stream>
{
"error": "Content selector was not found",
"code": "CONTENT_SELECTOR_NOT_FOUND"
}
{
"error": "Insufficient credits",
"code": "INSUFFICIENT_CREDITS",
"balance": 0,
"requiredCredits": 1
}
{
"error": "countryCode is not supported",
"code": "INVALID_COUNTRY_CODE"
}
{
"error": "Dynamic country/region routing is unavailable",
"code": "DYNAMIC_PROXY_NOT_CONFIGURED"
}
Browser Tasks
Capture Screenshot
Render any URL in a real browser and return a full-page or element-scoped PNG screenshot, routed through residential proxies.
POST
/
screenshot
curl -sS -X POST "https://api.adscrawl.net/screenshot" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"viewport": { "width": 1440, "height": 900 },
"fullPage": true,
"waitUntil": "load",
"countryCode": "GLOBAL",
"userAgentMode": "random",
"userAgentOs": "windows"
}' \
--output page.png
curl -sS -X POST "https://api.adscrawl.net/screenshot" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"selector": "#hero",
"waitUntil": "load",
"countryCode": "US"
}' \
--output hero.png
import fs from "fs";
const response = await fetch("https://api.adscrawl.net/screenshot", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
url: "https://example.com",
viewport: { width: 1440, height: 900 },
fullPage: true,
waitUntil: "load",
countryCode: "GLOBAL",
userAgentMode: "random",
userAgentOs: "windows",
}),
});
if (!response.ok) {
const err = await response.json();
throw new Error(`${response.status} ${err.code}: ${err.error}`);
}
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("page.png", buffer);
import httpx
response = httpx.post(
"https://api.adscrawl.net/screenshot",
headers={
"content-type": "application/json",
"x-api-key": "YOUR_API_KEY",
},
json={
"url": "https://example.com",
"viewport": {"width": 1440, "height": 900},
"fullPage": True,
"waitUntil": "load",
"countryCode": "GLOBAL",
"userAgentMode": "random",
"userAgentOs": "windows",
},
)
response.raise_for_status()
with open("page.png", "wb") as f:
f.write(response.content)
HTTP/1.1 200 OK
Content-Type: image/png
<binary PNG stream>
{
"error": "Content selector was not found",
"code": "CONTENT_SELECTOR_NOT_FOUND"
}
{
"error": "Insufficient credits",
"code": "INSUFFICIENT_CREDITS",
"balance": 0,
"requiredCredits": 1
}
{
"error": "countryCode is not supported",
"code": "INVALID_COUNTRY_CODE"
}
{
"error": "Dynamic country/region routing is unavailable",
"code": "DYNAMIC_PROXY_NOT_CONFIGURED"
}
Use
POST /screenshot to capture a pixel-perfect PNG of any public webpage. Request a full-page capture or target a specific element with a CSS selector. The capture is performed in a real browser with randomized fingerprints and residential proxy routing so you see exactly what a real visitor sees.
string
required
Target page URL. Must be a reachable HTTP(S) URL using port 80 or 443.
object
boolean
Whether to capture the full scrollable page. Defaults to
true. When selector is provided, only the matched element is captured regardless of this value.string
CSS selector for the element to capture. Only the first matching element is screenshotted. Returns
422 CONTENT_SELECTOR_NOT_FOUND if the selector is not found on the page.string
Navigation event to wait for before capturing. Defaults to
"load".| Value | Behaviour |
|---|---|
"domcontentloaded" | Waits for DOMContentLoaded. HTML is parsed without waiting for secondary resources such as images. |
"load" | Waits for window.load after the page and dependent resources (images, stylesheets) finish loading. |
"networkidle" | Waits until there are no network connections for at least 500 ms. Long polling, analytics, or lazy-loaded resources may cause a timeout. |
number
Maximum time to wait for the task to complete, in milliseconds. Must be a positive integer no greater than
3,600,000. Values outside this range fall back to the server default.string
Browser locale, for example
"en-US" or "zh-CN". Affects navigator.language and Accept-Language headers.string
IANA timezone identifier, for example
"Asia/Shanghai" or "America/New_York".object
object
Custom proxy configuration. Cannot be combined with
countryCode. Provide either server or the split form (protocol + host + port). Credentials must not be embedded in server.Show proxy fields
Show proxy fields
string
Full proxy URL such as
http://host:port or socks5://host:port. Cannot be combined with host.string
"http" or "socks5". Used in the split form.string
Proxy host. Used in the split form.
number | string
Port from 1 to 65535.
string
Proxy username. Must be supplied together with
password.string
Proxy password. Must be supplied together with
username.string
Managed residential proxy region. Cannot be combined with
proxy."GLOBAL": dynamic exit from 15 popular regions.- Two-letter country code (e.g.
"US","DE"): prefers a trusted proxy for that region with dynamic fallback. - Omitted: a random trusted proxy is selected automatically.
string
"random" lets the server pick a User-Agent from its library. Requests without an explicit userAgent already default to "random".string
Operating system used when
userAgentMode is "random". Accepted values: "windows" (default) or "macos".string
Explicit User-Agent string. Overrides the random selection.
object
Browser fingerprint settings. When omitted, every signal defaults to random while keeping OS, GPU, CPU, memory, fonts, and device signals coherent.
Show fingerprint fields
Show fingerprint fields
string
"forward" uses the proxy exit address. "real" or "disabled" also accepted.string
"random" or "real". Controls WebGL vendor and renderer metadata.string
"random", "real", or "disabled". Random mode follows the WebGL GPU setting.string
"random" or "real". Controls WebGL image noise.string
"random" or "real". Controls canvas noise.string
"random" or "real". Controls audio fingerprint noise.string
"random" or "real". Controls layout measurement noise.string
"random" or "real". Returns an OS-matched speech voice list.string
"random" or "real". Returns an OS-matched font list.string
"random" or "real". Generates a coherent CPU thread count and memory pair.string
"random", "enabled", or "disabled".array
Cookie list injected into the browser context before navigation. Each cookie object requires
name, value, and domain.Show cookie fields
Show cookie fields
string
required
Cookie name.
string
required
Cookie value.
string
required
Target domain such as
.example.com.string
Cookie path. Defaults to
/.boolean
Whether the cookie is sent only over HTTPS.
boolean
Whether the cookie is inaccessible to client-side JavaScript.
string
SameSite attribute.
boolean
Set
true for a session cookie.number
Unix expiry timestamp in seconds. Also accepted as
expires or expiry.Response
| Code | Meaning |
|---|---|
200 | Success. Returns an image/png binary stream of the captured page or element. |
400 | Invalid JSON, URL, cookies, proxy, region, or User-Agent. Body over 1 MiB. |
401 | Missing or invalid x-api-key. |
402 | Insufficient balance. Returns INSUFFICIENT_CREDITS, balance, and requiredCredits. |
422 | Selector not found (CONTENT_SELECTOR_NOT_FOUND) or invalid Worker payload. |
429 | Task rate limited. |
502 | Proxy unreachable or target HTTP failure. |
503 | Queue, Worker, managed proxy, or User-Agent resources unavailable. |
504 | Task, navigation, or proxy connection timed out. |
500 | Unclassified task execution failure. |
When using
selector, the server waits for the element to appear before capturing it. If the element is not found within the navigation timeout, the response is 422 CONTENT_SELECTOR_NOT_FOUND.One credit is consumed after request validation but before the task is enqueued. Request bodies are limited to 1 MiB.
curl -sS -X POST "https://api.adscrawl.net/screenshot" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"viewport": { "width": 1440, "height": 900 },
"fullPage": true,
"waitUntil": "load",
"countryCode": "GLOBAL",
"userAgentMode": "random",
"userAgentOs": "windows"
}' \
--output page.png
curl -sS -X POST "https://api.adscrawl.net/screenshot" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com",
"selector": "#hero",
"waitUntil": "load",
"countryCode": "US"
}' \
--output hero.png
import fs from "fs";
const response = await fetch("https://api.adscrawl.net/screenshot", {
method: "POST",
headers: {
"content-type": "application/json",
"x-api-key": "YOUR_API_KEY",
},
body: JSON.stringify({
url: "https://example.com",
viewport: { width: 1440, height: 900 },
fullPage: true,
waitUntil: "load",
countryCode: "GLOBAL",
userAgentMode: "random",
userAgentOs: "windows",
}),
});
if (!response.ok) {
const err = await response.json();
throw new Error(`${response.status} ${err.code}: ${err.error}`);
}
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("page.png", buffer);
import httpx
response = httpx.post(
"https://api.adscrawl.net/screenshot",
headers={
"content-type": "application/json",
"x-api-key": "YOUR_API_KEY",
},
json={
"url": "https://example.com",
"viewport": {"width": 1440, "height": 900},
"fullPage": True,
"waitUntil": "load",
"countryCode": "GLOBAL",
"userAgentMode": "random",
"userAgentOs": "windows",
},
)
response.raise_for_status()
with open("page.png", "wb") as f:
f.write(response.content)
HTTP/1.1 200 OK
Content-Type: image/png
<binary PNG stream>
{
"error": "Content selector was not found",
"code": "CONTENT_SELECTOR_NOT_FOUND"
}
{
"error": "Insufficient credits",
"code": "INSUFFICIENT_CREDITS",
"balance": 0,
"requiredCredits": 1
}
{
"error": "countryCode is not supported",
"code": "INVALID_COUNTRY_CODE"
}
{
"error": "Dynamic country/region routing is unavailable",
"code": "DYNAMIC_PROXY_NOT_CONFIGURED"
}