/scrape

High-performance HTTP scraper with authentic Chrome TLS fingerprints for anti-bot bypass. Use this endpoint when the target page doesn't require JavaScript to render content.

POST /scrape

When to Use

Use /scrape for:

  • Static websites and server-rendered pages
  • REST APIs and JSON endpoints
  • News articles, blog posts, product pages
  • High-volume scraping where speed matters

Use /scrapeJs instead for:

  • Single Page Applications (React, Vue, Angular)
  • Pages with infinite scroll or lazy loading
  • Cloudflare, PerimeterX, or DataDome protected sites

Request Parameters

Required Parameters

ParameterTypeDescription
urlstringThe URL to scrape (must start with http:// or https://)

HTTP Request Options

ParameterTypeDefaultDescription
methodstringGETHTTP method: GET, POST, or PUT
headersstring[]-Custom headers as "Header: Value" strings
datastring-Request body for POST/PUT requests
multipartbooleanfalseSend data as multipart form
followRedirectsbooleantrueFollow HTTP redirects
timeoutinteger10Request timeout in seconds (4-30)

Proxy Options

ParameterTypeDefaultDescription
geostringdefaultProxy geo: default, us, eu, residential, br, de, fr, es, au, ca, 4g-eu (MEGA/ULTRA only)
proxystring-Custom proxy URL (overrides geo). Format: http://user:pass@host:port
stickyIpKeystring-Key for sticky IP sessions. Same key = same IP across requests

Retry Options

ParameterTypeDefaultDescription
retryNuminteger0Number of retry attempts (0-4)
textNotExpectedstring[]-Retry if response contains these strings (e.g., ["Access Denied", "Please verify"])
statusNotExpectedinteger[]-Retry if response has these status codes (e.g., [403, 429, 503])

Content Extraction

ParameterTypeDescription
extractorPresetstringBuilt-in extractor: markdown, markdown_content, content
extractorstringCustom JavaScript extractor code. Function signature: function(input, cheerio) { ... }

Output Options

ParameterTypeDefaultDescription
outputBodybooleantrueInclude response body in output
outputHeadersbooleantrueInclude response headers in output

Example Requests

Basic Request

request.json
{
  "url": "https://httpbin.org/html"
}

With Custom Headers

request.json
{
  "url": "https://httpbin.org/headers",
  "headers": [
    "X-Custom-Header: MyValue",
    "Accept: application/json"
  ]
}

POST Request with Data

request.json
{
  "url": "https://httpbin.org/post",
  "method": "POST",
  "data": "username=test&password=demo"
}

With Retry and Extraction

request.json
{
  "url": "https://news.ycombinator.com/",
  "retryNum": 2,
  "extractorPreset": "markdown"
}

With Geo Proxy and Sticky Session

request.json
{
  "url": "https://httpbin.org/ip",
  "geo": "us",
  "stickyIpKey": "session123"
}

Custom Extractor

request.json
{
  "url": "https://quotes.toscrape.com/",
  "extractor": "function(input, cheerio) { let $ = cheerio.load(input); return { quotes: $('.quote .text').map((i, el) => $(el).text()).get().slice(0, 5) }; }"
}

cURL Example

Terminal
curl -X POST https://scraperex1.p.rapidapi.com/scrape \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: scraperex1.p.rapidapi.com" \
  -d '{
    "url": "https://httpbin.org/html",
    "headers": ["Accept-Language: en-US"],
    "timeout": 30
  }'

Response

response.json
{
  "body": "<!DOCTYPE html>...",
  "info": {
    "statusCode": 200,
    "latency": 523,
    "isBinary": false,
    "headers": {
      "content-type": "text/html; charset=utf-8",
      "date": "Sun, 08 Feb 2026 10:00:00 GMT"
    }
  },
  "extractor": {
    "result": {
      "markdown": "# Article Title\n\nContent...",
      "html": "<h1>Article Title</h1>...",
      "meta": {
        "title": "Article Title",
        "author": "John Doe"
      }
    }
  }
}

Response Fields

FieldTypeDescription
bodystringResponse body (HTML or text)
info.statusCodeintegerHTTP status code from target
info.latencyintegerRequest latency in milliseconds
info.isBinarybooleanWhether response is binary
info.headersobjectResponse headers from target
extractorobjectExtracted data (if extractorPreset was used)
stderrstringError message if any

Proxy Geo Options

Geo CodeLocationPlan Required
defaultMixed globalAll
usUnited StatesAll
euEuropeAll
caCanadaAll
brBrazilAll
deGermanyAll
frFranceAll
esSpainAll
auAustraliaAll
residentialResidential IPsAll
4g-euEuropean 4G MobileMEGA/ULTRA only

Error Responses

403 - Premium Geo Required

error.json
{
  "status": "fail",
  "message": "Premium geo code, please upgrade to ULTRA or MEGA to use it!",
  "errors": [{"geo": "Premium geo code, please upgrade to ULTRA or MEGA to use it!"}]
}

422 - Validation Error

error.json
{
  "detail": [
    {"loc": ["body", "url"], "msg": "URL must start with http:// or https://", "type": "value_error"}
  ]
}

503 - Scrape Failed

error.json
{
  "status": "fail",
  "message": "Request failed after retries",
  "errors": [{"url": "Connection timeout"}]
}