Scraping
GET
https://scrapely.15.204.158.166.sslip.io /api/v1/scrape Scrape a URL
Fetch one page synchronously and return it. Waits up to 70 seconds while we retry through proxies; set your client timeout to at least 70 s. Uses one of your concurrency slots for its duration; with none free it fails fast with CONCURRENCY_LIMIT (use async jobs to queue instead). Also accepts POST with the same parameters as JSON or a form.
Parameters
urlstringqueryrequiredThe page to scrape: an absolute http(s) URL, URL-encoded when sent in a query string. Private, loopback and link-local hosts are refused.
renderbooleanqueryLoad the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
premiumbooleanqueryRoute through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
ultra_premiumbooleanqueryOur hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
country_codestringqueryGeotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g.
us, de, jp).device_typestringquerySend a desktop or mobile user agent and viewport.
session_numberintegerqueryReuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersbooleanqueryForward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
output_formatstringqueryReturn the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
autoparsebooleanqueryFor supported domains, return structured JSON parsed from the page instead of HTML.
wait_for_selectorstringqueryWith render=true: wait until this CSS selector appears before capturing the page.
rawbooleanqueryReturn the target's body directly (as ScraperAPI does) instead of the JSON envelope. Metering headers are still set.
Code samples
cURL
curl -X GET "https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw="TypeScript
const res = await fetch('https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw=', {
method: 'GET',
});
const data = await res.json();Python
import requests
res = requests.request(
"GET",
"https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw=",
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw=", nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw=')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://scrapely.15.204.158.166.sslip.io/api/v1/scrape?url=&render=&premium=&ultra_premium=&country_code=&device_type=&session_number=&keep_headers=&output_format=&autoparse=&wait_for_selector=&raw="))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
200 The page. With
raw=true, the body itself with the target's Content-Type and status (200 or 404).Example
{
"url": "string",
"final_url": "string",
"status_code": 200,
"credits": 10,
"duration_ms": 1830,
"content_type": "text/html; charset=utf-8",
"content": "string"
}Schema
urlstringrequiredThe URL you asked for.
final_urlstringAfter redirects.
status_codeintegerrequiredThe target's HTTP status (200, or 404/410 — which are billed).
creditsintegerrequiredCredits charged for this request.
duration_msintegerrequiredcontent_typestringrequiredcontentstring | objectrequiredThe page: a string for html/markdown/text, an object for json and autoparse.
400
MISSING_PARAM or INVALID_PARAM; param names the culprit.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
401
UNAUTHORIZED: missing, unknown or revoked key.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
402
INSUFFICIENT_CREDITS: nothing was charged.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
429
RATE_LIMITED or CONCURRENCY_LIMIT. Honour Retry-After.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
500
INTERNAL: our fault, not charged. Quote X-Request-Id.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
502
TARGET_FAILED: the target blocked us, errored, or timed out after retries. Not charged.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
504
TARGET_FAILED: the target blocked us, errored, or timed out after retries. Not charged.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
POST
https://scrapely.15.204.158.166.sslip.io /api/v1/scrape Scrape a URL (POST)
Identical to GET, with parameters in the body. Use it for long URLs or when keeping the key out of URLs.
Request body application/json
urlstringrequiredThe page to scrape: an absolute http(s) URL, URL-encoded when sent in a query string. Private, loopback and link-local hosts are refused.
renderbooleanLoad the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
premiumbooleanRoute through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
ultra_premiumbooleanOur hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
country_codestringGeotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g.
us, de, jp).device_typestringSend a desktop or mobile user agent and viewport.
session_numberintegerReuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersbooleanForward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
output_formatstringReturn the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
autoparsebooleanFor supported domains, return structured JSON parsed from the page instead of HTML.
wait_for_selectorstringWith render=true: wait until this CSS selector appears before capturing the page.
rawbooleanReturn the target's body directly (as ScraperAPI does) instead of the JSON envelope. Metering headers are still set.
{
"url": "string",
"render": false,
"premium": false,
"ultra_premium": false,
"country_code": "us",
"device_type": "desktop",
"session_number": 0,
"keep_headers": false,
"output_format": "html",
"autoparse": false,
"wait_for_selector": "string",
"raw": false
}Code samples
cURL
curl -X POST "https://scrapely.15.204.158.166.sslip.io/api/v1/scrape" \
-H "Content-Type: application/json" \
-d '{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","raw":false}'TypeScript
const res = await fetch('https://scrapely.15.204.158.166.sslip.io/api/v1/scrape', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","raw":false}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://scrapely.15.204.158.166.sslip.io/api/v1/scrape",
headers={
"Content-Type": "application/json",
},
json={"url": "string", "render": False, "premium": False, "ultra_premium": False, "country_code": "us", "device_type": "desktop", "session_number": 0, "keep_headers": False, "output_format": "html", "autoparse": False, "wait_for_selector": "string", "raw": False},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://scrapely.15.204.158.166.sslip.io/api/v1/scrape", strings.NewReader(`{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","raw":false}`))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrapely.15.204.158.166.sslip.io/api/v1/scrape');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","raw":false}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://scrapely.15.204.158.166.sslip.io/api/v1/scrape')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","raw":false}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://scrapely.15.204.158.166.sslip.io/api/v1/scrape"))
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"url\":\"string\",\"render\":false,\"premium\":false,\"ultra_premium\":false,\"country_code\":\"us\",\"device_type\":\"desktop\",\"session_number\":0,\"keep_headers\":false,\"output_format\":\"html\",\"autoparse\":false,\"wait_for_selector\":\"string\",\"raw\":false}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
200 The page. With
raw=true, the body itself with the target's Content-Type and status (200 or 404).Example
{
"url": "string",
"final_url": "string",
"status_code": 200,
"credits": 10,
"duration_ms": 1830,
"content_type": "text/html; charset=utf-8",
"content": "string"
}Schema
urlstringrequiredThe URL you asked for.
final_urlstringAfter redirects.
status_codeintegerrequiredThe target's HTTP status (200, or 404/410 — which are billed).
creditsintegerrequiredCredits charged for this request.
duration_msintegerrequiredcontent_typestringrequiredcontentstring | objectrequiredThe page: a string for html/markdown/text, an object for json and autoparse.
400
MISSING_PARAM or INVALID_PARAM; param names the culprit.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
401
UNAUTHORIZED: missing, unknown or revoked key.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
402
INSUFFICIENT_CREDITS: nothing was charged.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
429
RATE_LIMITED or CONCURRENCY_LIMIT. Honour Retry-After.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
500
INTERNAL: our fault, not charged. Quote X-Request-Id.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
502
TARGET_FAILED: the target blocked us, errored, or timed out after retries. Not charged.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
504
TARGET_FAILED: the target blocked us, errored, or timed out after retries. Not charged.Example
{
"error": {
"code": "MISSING_PARAM",
"message": "string",
"param": "string",
"docs": "/docs/errors#insufficient_credits"
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredStable, machine-readable. Branch on this, never on
message.messagestringrequiredHuman-readable; may change.
paramstringThe parameter at fault, when there is one.
docsstringLink to this code on /docs/errors.
Updated