Any public web page as HTML, markdown or text
Fetch one public URL and return its content with the upstream status.
/v1/scraperender, 10 with premium, 75 with both. Only a 2xx page with content is charged: a block, an error page, an empty page and failed requests are freeBy default the page comes back as served; render=true runs the page's JavaScript and returns the DOM after domcontentloaded, an optional wait_for CSS selector and wait_ms, with images, media and fonts blocked unless block_resources=false, and an optional PNG screenshot. format picks html, markdown or text; markdown and text drop scripts, styles, navigation, footers and iframes and make every link absolute.
A request the site refuses (403, 429, a bot-check page) is retried automatically; premium=true uses the premium network from the first attempt; country keeps the request in that country; session_id keeps the same IP address across requests.
The answer is a 200 carrying the upstream status_code; only a 2xx with non-empty content is charged (1 credit, 5 with render, 10 with premium, 75 with both). A target that refuses every attempt is a 503, an HTTP 402 (pay-per-crawl) is returned as is and never retried elsewhere, and private, loopback and cloud-metadata addresses — the URL, a redirect or anything a rendered page loads — are refused (422). A timeout_s that runs out, or a wait_for that never appears, is a 503 that says to retry or allow more time. All of those are free.
Request
https://api.scrapercompany.com/v1/scrapeAuthenticate with your API key in the x-api-key header (see Authentication).
Run this request on your own API key from this page, with the values you type. Signed out? Sign in or get an API key.
Body
JSON object. Unknown fields are rejected with 422.
- urlstringrequiredmin length 1, max length 2048
The page to fetch: an absolute
http://orhttps://URL on port 80, 443, 8080 or 8443. Private, loopback and cloud-metadata addresses, and hosts on the scrape denylist, are refused (422), as is any redirect to one; at most 5 redirects are followed. - renderbooleandefault
falseRun the page's JavaScript and return the DOM after
domcontentloadedand anywait_for/wait_ms. Needed for pages that build their content with JavaScript. 5 credits instead of 1. - premiumbooleandefault
falseUse the premium network from the first attempt, for sites that block standard requests. 10 credits (75 with
render). - countrystring | null
Two-letter country (ISO 3166-1) the request must come from, e.g.
DE. Only routes verified in that country are used; when none is available the answer is a 503.251 allowed values
AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UK, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW
- wait_forstring | nullmin length 1, max length 500
CSS selector to wait for after
domcontentloaded(attached to the DOM, visible or not), e.g.#prices .row. Never appearing withintimeout_sis a 503 with Retry-After: retry, or allow more time. Needsrender. - wait_msintegerdefault
0min 0, max 10000A further fixed wait, in milliseconds (0-10000), after the page and any
wait_for. Needsrender. - block_resourcesbooleandefault
trueAbort image, media and font requests while rendering: faster, and the DOM is the same. Set false, with
render, to load them (for a screenshot that shows images). - formatstringdefault
htmlhtml(the page as served, or the rendered DOM),markdownortext. Markdown and text drop scripts, styles,noscript, SVG,nav,footerand iframes, and make links absolute. A non-HTML text answer (JSON, XML, plain text) comes back as served, withformat: raw.One of
htmlmarkdowntext - screenshotbooleandefault
falseAdd a PNG screenshot (base64,
screenshot) of the viewport (1440x900). No extra credits. Needsrender. - full_pagebooleandefault
falseScreenshot the whole page instead of the viewport. Needs
screenshot. - headersobject
Headers to send to the target, e.g.
Accept-Languageor aCookieyou hold for the site. Hop-by-hop headers,Host,Content-Length,Proxy-*and anything named like an API-key header (X-API-Key) are dropped;AuthorizationandCookieare not sent on to another host after a redirect. Withrenderthey go with the page request only. At most 32. - timeout_sintegerdefault
30min 1, max 90Seconds the whole request may take, every attempt and redirect included: at most 60, or 90 with
render. Running out is a 503 with Retry-After: retry, or allow more time. - session_idstring | nullpattern ^[A-Za-z0-9_-]{1,64}$
Keep the same IP address across requests that share this id (letters, digits,
_,-; up to 64); ids are scoped to your API key. The IP address changes if it stops working.
Example request
curl -X POST "https://api.scrapercompany.com/v1/scrape" \
-H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com"
}'Response
200 — The page, its upstream status and request metadata. Metered responses carry x-credits-charged and x-credits-remaining headers (see credit headers).
{
"url": "https://example.com/",
"final_url": "https://example.com/",
"status_code": 200,
"content_type": "text/html; charset=UTF-8",
"format": "markdown",
"content": "# Example Domain\n\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n\n[Learn more](https://iana.org/domains/example)",
"headers": {
"content-type": "text/html; charset=UTF-8",
"last-modified": "Mon, 05 Oct 2026 18:43:12 GMT",
"etag": "\"84238dfc8092e5d9c0dac8ef93371a07:1736799080.121134\"",
"location": []
},
"meta": {
"render": false,
"premium": false,
"elapsed_s": 0.412,
"bytes": 1256
}
}Errors
Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.
| Status | Meaning | Retry? |
|---|---|---|
401Unauthorized | Missing or invalid API key. {"detail":"missing or invalid API key"} | No, fix the request |
402Payment Required | Not enough credits for this request: the account's credits mode is {"detail":"insufficient credits: this request costs 5, 0 available. Credits renew 2026-11-01."} | No, fix the request |
422Unprocessable Content | Request validation failed. {"detail":[{"loc":["body","name"],"msg":"Field required","type":"missing"}]} | No, fix the request |
429Too Many Requests | Too many requests: the key's requests-per-minute limit was exceeded, or (in {"detail":"rate limit 60/min exceeded"} | Yes, with backoff |
503Service Unavailable | Temporarily unavailable: a dependency of this endpoint is down, or the upstream source changed its contract. Retry later. {"detail":"database unavailable: OperationalError"} | Yes, with backoff |
Try it
Press Try it above to run this request on your own key, with the values you type (sign in first). For a no-code walkthrough, use the workspace’s guided Try it.
- Export your key:
export SCRAPERCOMPANY_API_KEY=sk_...(no key yet? start a free trial). - Copy the cURL example above and run it in a terminal.
Questions about this page?
Send the page link and your question, and the team will answer.