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 (required)
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://).

format optional, default: "md"

Choose the output format:

  • "md" — Clean Markdown (HTML tags stripped, headings/links converted)
  • "html" — Raw HTML as returned by Crawlbase
  • "text" — Plain text (all HTML tags stripped)
js optional, default: false

Enable JavaScript rendering for SPAs and dynamically loaded content. Note: JS requests consume 25 credits instead of 1 due to higher Crawlbase costs.

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
}

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"])

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 scrape25 credits
Free credits on signup100 credits
5,000 credits pack$4 (buy)
50,000 credits pack$29 (buy)

Grok Build plugin

Scrappilot has an official plugin for Grok Build. Install it and scrape URLs directly from your agent conversations.

Install

/plugin install web-scraper

Usage

/scrape https://example.com --key sk_live_xxx --format md --js

Available flags

FlagDescription
--keyYour API key (required)
--formatOutput format: md, html, or text (default: md)
--jsEnable JavaScript rendering

Rate limits

Rate limits depend on the Crawlbase plan tied to your token. Current limits:

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

Need help? Contact support