API Documentation
Turn any web page into clean Markdown with one API call.
Overview
Scrappilot provides a single API endpoint to scrape any public web page. We handle the rendering, HTML cleaning, and Markdown conversion. Just send us a URL, get back clean content.
One POST endpoint. Send URL, get content back.
Pay as you go. 1 credit = 1 page. No monthly fees.
Get Markdown, HTML, or plain text output.
Authentication
Every request requires an API key. Pass it in the Authorization header. Get your key from the dashboard after signing up.
Endpoints
/api/scrape
Scrape a URL and return the content in your chosen format.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | — | The URL to scrape. Use either url or urls. |
| urls | array | — | Up to 10 URLs to scrape in one request. Each successful URL consumes credits. |
| format | string | "md" | Output format: md, html, or text |
| js | boolean | false | Enable JavaScript rendering (uses more credits — see pricing) |
Parameters in detail
url requiredThe fully qualified URL to scrape. Must include the protocol (https://). For batch scraping, use urls with up to 10 URLs.
format optional, default: "md"Choose the output format:
"md"— Clean Markdown (HTML tags stripped, headings/links converted)"html"— Raw HTML response"text"— Plain text (all HTML tags stripped)
js optional, default: falseEnable JavaScript rendering for SPAs and dynamically loaded content. Note: JS requests consume 5 credits instead of 1.
Response format
All responses are JSON. A successful scrape returns:
Batch requests return one result per URL and keep per-URL failures isolated:
Code examples
curl
-H "Authorization: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "md"}'
Python
Batch scrape
-H "Authorization: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com", "https://example.com/about"], "format": "md"}'
JavaScript (fetch)
PHP
Ruby
Error codes
| Code | Meaning | Action |
|---|---|---|
| 400 | Bad request — missing or invalid url parameter | Check your request body |
| 401 | Missing or invalid API key | Get a key from your dashboard |
| 402 | Insufficient credits | Buy more credits |
| 422 | Invalid JSON body | Check your JSON syntax |
| 500 | Upstream scraping error | Retry with exponential backoff |
Errors return a JSON body with a detail field describing the issue.
Pricing
Rate limits
Rate limits depend on your plan. Current limits:
| Limit | Value |
|---|---|
| Max response size | ~2 MB |
| Request timeout | 30 seconds |
| Concurrent requests (approx) | 25 |
Need help? Contact support