/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
| Parameter | Type | Description |
|---|---|---|
url | string | The URL to scrape (must start with http:// or https://) |
HTTP Request Options
| Parameter | Type | Default | Description |
|---|---|---|---|
method | string | GET | HTTP method: GET, POST, or PUT |
headers | string[] | - | Custom headers as "Header: Value" strings |
data | string | - | Request body for POST/PUT requests |
multipart | boolean | false | Send data as multipart form |
followRedirects | boolean | true | Follow HTTP redirects |
timeout | integer | 10 | Request timeout in seconds (4-30) |
Proxy Options
| Parameter | Type | Default | Description |
|---|---|---|---|
geo | string | default | Proxy geo: default, us, eu, residential, br, de, fr, es, au, ca, 4g-eu (MEGA/ULTRA only) |
proxy | string | - | Custom proxy URL (overrides geo). Format: http://user:pass@host:port |
stickyIpKey | string | - | Key for sticky IP sessions. Same key = same IP across requests |
Retry Options
| Parameter | Type | Default | Description |
|---|---|---|---|
retryNum | integer | 0 | Number of retry attempts (0-4) |
textNotExpected | string[] | - | Retry if response contains these strings (e.g., ["Access Denied", "Please verify"]) |
statusNotExpected | integer[] | - | Retry if response has these status codes (e.g., [403, 429, 503]) |
Content Extraction
| Parameter | Type | Description |
|---|---|---|
extractorPreset | string | Built-in extractor: markdown, markdown_content, content |
extractor | string | Custom JavaScript extractor code. Function signature: function(input, cheerio) { ... } |
Output Options
| Parameter | Type | Default | Description |
|---|---|---|---|
outputBody | boolean | true | Include response body in output |
outputHeaders | boolean | true | Include 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
| Field | Type | Description |
|---|---|---|
body | string | Response body (HTML or text) |
info.statusCode | integer | HTTP status code from target |
info.latency | integer | Request latency in milliseconds |
info.isBinary | boolean | Whether response is binary |
info.headers | object | Response headers from target |
extractor | object | Extracted data (if extractorPreset was used) |
stderr | string | Error message if any |
Proxy Geo Options
| Geo Code | Location | Plan Required |
|---|---|---|
default | Mixed global | All |
us | United States | All |
eu | Europe | All |
ca | Canada | All |
br | Brazil | All |
de | Germany | All |
fr | France | All |
es | Spain | All |
au | Australia | All |
residential | Residential IPs | All |
4g-eu | European 4G Mobile | MEGA/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"}]
}