API Documentation

Turn any web page into clean Markdown with one API call.

New here? Sign up for free and get 100 credits to start scraping immediately.

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.

Simple

One POST endpoint. Send URL, get content back.

Credit-based

Pay as you go. 1 credit = 1 page. No monthly fees.

Three formats

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.

Authorization: sk_live_abc123def456

Endpoints

POST /api/scrape

Scrape a URL and return the content in your chosen format.

ParameterTypeDefaultDescription
urlstringThe URL to scrape. Use either url or urls.
urlsarrayUp to 10 URLs to scrape in one request. Each successful URL consumes credits.
formatstring"md"Output format: md, html, or text
jsbooleanfalseEnable JavaScript rendering (uses more credits — see pricing)

Parameters in detail

url required

The 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: false

Enable 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:

{
"url": "https://example.com",
"format": "md",
"result": "# Example Domain\n\nThis domain is for use...",
"markdown": "# Example Domain\n\nThis domain is for use...",
"credits_remaining": 499
}

Batch requests return one result per URL and keep per-URL failures isolated:

{
"format": "md",
"results": [
{ "url": "https://example.com", "ok": true, "result": "# Example..." },
{ "url": "https://example.com/missing", "ok": false, "error": "HTTP error" }
],
"credits_used": 1,
"credits_remaining": 499
}

Code examples

curl

curl https://www.scrappilot.com/api/scrape \
-H "Authorization: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "md"}'

Python

import httpx
 
resp = httpx.post(
"https://www.scrappilot.com/api/scrape",
headers={"Authorization": "sk_live_xxx"},
json={"url": "https://example.com", "format": "md"},
)
data = resp.json()
print(data["result"])

Batch scrape

curl https://www.scrappilot.com/api/scrape \
-H "Authorization: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com", "https://example.com/about"], "format": "md"}'

JavaScript (fetch)

const resp = await fetch("https://www.scrappilot.com/api/scrape", {
method: "POST",
headers: {
"Authorization": "sk_live_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example.com",
format: "md",
}),
});
const data = await resp.json();
console.log(data.result);

PHP

$client = new \GuzzleHttp\Client();
$resp = $client->post("https://www.scrappilot.com/api/scrape", [
"headers" => ["Authorization" => "sk_live_xxx"],
"json" => ["url" => "https://example.com"],
]);
$data = json_decode($resp->getBody(), true);
echo $data["result"];

Ruby

require "httparty"
 
resp = HTTParty.post(
"https://www.scrappilot.com/api/scrape",
headers: { "Authorization" => "sk_live_xxx" },
body: { url: "https://example.com", format: "md" }.to_json,
)
puts resp["result"]

Error codes

CodeMeaningAction
400Bad request — missing or invalid url parameterCheck your request body
401Missing or invalid API keyGet a key from your dashboard
402Insufficient creditsBuy more credits
422Invalid JSON bodyCheck your JSON syntax
500Upstream scraping errorRetry with exponential backoff

Errors return a JSON body with a detail field describing the issue.

Pricing

FeatureCost
Standard scrape (no JS)1 credit
JavaScript-rendered scrape5 credits
Free credits on signup100 credits
5,000 credits pack$4 (buy)
50,000 credits pack$29 (buy)

Rate limits

Rate limits depend on your plan. Current limits:

LimitValue
Max response size~2 MB
Request timeout30 seconds
Concurrent requests (approx)25

Need help? Contact support