Scrape any URL with one GET request
Fetch web pages and WHOIS records through a rotating pool of datacenter and residential (ISP) IPs. No SDK, no setup: the target's response comes back as-is.
100 free requests a day. No signup, no API key.
curl "https://api.scrapeapi.dev/?url=https://httpbin.org/ip"
import requests
r = requests.get("https://api.scrapeapi.dev/", params={
"url": "https://httpbin.org/ip",
})
print(r.headers.get("X-ScrapeAPI-Target-Status"), r.text)
const params = new URLSearchParams({ url: "https://httpbin.org/ip" });
const res = await fetch(`https://api.scrapeapi.dev/?${params}`);
console.log(res.headers.get("x-scrapeapi-target-status"), await res.text());
x-scrapeapi-target-status: 200
x-scrapeapi-duration-ms: 412
x-ratelimit-remaining: 99
{
"origin": "203.0.113.42"
}
Rotating IPs
Requests are spread across datacenter and residential (ISP) exits that change over time.
WHOIS at scale
Look up IPs, networks and AS numbers. Rate-limited answers are retried from another IP.
Just HTTP
One GET endpoint with CORS enabled. Call it from curl, a script or the browser.
Pay per success
$0.005 per successful request. Failed requests are free, credits never expire.
Playground
Send a live request
Pick an example or enter your own target. This calls the real API straight from your browser.
Counts toward your 100 free requests a day
Send a request to see the live response here.
Docs
API reference
One endpoint. Pass the target as a query parameter and get its response back.
Authentication
Without a key, each IP address gets 100 requests a day, and X-RateLimit-Remaining on every
response shows what is left. With a key there is no daily limit. Send it in the X-API-Key
header, or as the key parameter where you can't set headers.
Parameters
| Parameter | Description |
|---|---|
| Target · one is required | |
| urlstring | Absolute http:// or https:// URL to fetch. Redirects are followed. URL-encode it if it has a query string of its own. |
| whoisQuerystring | IP address, network or AS number to look up, e.g. 8.8.8.8 or AS15169. |
| URL options | |
| headersJSON object | Request headers to send, e.g. {"Accept":"text/html"}. Up to 20, printable ASCII only. Hop-by-hop headers such as Host and Connection are refused. |
| userAgentstring | User-Agent to send instead of the default. A User-Agent in headers takes precedence. |
| forceProxy1 | Route the request through a random proxy from the pool instead of the default exits. |
| WHOIS options | |
| whoisServerhostname | Ask a specific server: whois.arin.net, whois.ripe.net, whois.apnic.net, whois.afrinic.net, whois.lacnic.net, whois.radb.net, whois.level3.net or rwhois.cogentco.com. |
| whoisPort1–65535 | Port for whoisServer, e.g. 4321 for rwhois. |
| stricttrue | Answer 429 or 502 instead of 200 when the final WHOIS response is rate-limited or incomplete. |
| refreshtrue | Skip the WHOIS cache and store a fresh record. |
| Other | |
| typeMIME type | Content-Type of the response. Defaults to text/html for URLs and text/plain for WHOIS. |
| keystring | Your API key, if you can't send the X-API-Key header. |
Examples
curl "https://api.scrapeapi.dev/?url=https://news.ycombinator.com"
curl -G https://api.scrapeapi.dev/ \
--data-urlencode "url=https://httpbin.org/headers" \
--data-urlencode 'headers={"Accept":"application/json","Accept-Language":"de-DE"}'
curl -G https://api.scrapeapi.dev/ \
--data-urlencode "url=https://httpbin.org/user-agent" \
--data-urlencode "userAgent=MyBot/1.0"
curl "https://api.scrapeapi.dev/?url=https://httpbin.org/ip&forceProxy=1"
curl "https://api.scrapeapi.dev/?whoisQuery=8.8.8.8"
curl "https://api.scrapeapi.dev/?whoisQuery=68.144.0.0&whoisServer=whois.arin.net"
curl -H "X-API-Key: $SCRAPEAPI_KEY" \
"https://api.scrapeapi.dev/?url=https://example.com"
Response
The body is the target's response, unchanged. If the target answers with an error page you still get a
200 with that page, so check X-ScrapeAPI-Target-Status. These headers describe
what happened:
| Header | Description |
|---|---|
| X-ScrapeAPI-Target-Status | HTTP status the target answered with. |
| X-ScrapeAPI-Duration-Ms | Time spent fetching the target, in milliseconds. |
| X-ScrapeAPI-Attempts | How many exits were tried. |
| X-ScrapeAPI-Result | success, or why an answer is suspect: rate-limited, partial, empty. |
| X-ScrapeAPI-Cache | hit when a WHOIS record came from the short-lived cache. |
| X-RateLimit-Remaining | Free requests left today, on requests without a key. X-RateLimit-Limit and X-RateLimit-Reset (Unix time) come with it. |
| X-Request-ID | Your own X-Request-ID, or a generated one. Quote it when you contact support. |
Errors
Errors are JSON:
{ "error": "Either url or whoisQuery is required", "code": "INVALID_REQUEST" }
| Status | Meaning |
|---|---|
| 400 | A parameter is missing or invalid; error says which. |
| 429 | The free daily limit is used up (retryAfterSeconds says for how long), the queue is full, or a strict WHOIS lookup stayed rate-limited. |
| 502 | The target could not be fetched. code and syscallCode, e.g. ENOTFOUND, say why. |
| 503 | No exit is available right now. Retry with backoff. |
| 504 | The target did not answer in time. |
Pricing
Pay only for requests that succeed
No subscription. Buy credits once and use them at your own pace.
Free
100 requests a day per IP address.
- No signup, no API key
- URL scraping and WHOIS
- Resets every day
Pay as you go
1 credit is 1 successful request. Minimum 100 credits.
- Failed requests are not charged
- No daily limit
- Credits never expire