Documentation
API reference
Prairie Scrape exposes a clean REST API over your managed Firecrawl infrastructure. Authenticate with your API key, send JSON, get clean data back.
Getting started
Create a free account and grab your API key from the dashboard. Then send your first scrape request:
# Set your key once per shell session
export PRAIRIE_API_KEY="fc_live_YOUR_KEY"
# -w prints the HTTP status so we can branch on it
HTTP_STATUS=$(curl -sS -o /tmp/prairie.json -w "%{http_code}" \
-X POST https://prairiescrape.com/api/public/v1/scrape \
-H "Authorization: Bearer $PRAIRIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "formats": ["markdown", "html"] }')
case "$HTTP_STATUS" in
2*) cat /tmp/prairie.json ;;
401) echo "Invalid API key — check Authorization header." >&2; exit 1 ;;
402) echo "Out of credits — top up at https://prairiescrape.com/dashboard/credits" >&2; exit 2 ;;
429) echo "Rate limited — retry after a few seconds." >&2; exit 3 ;;
*) echo "Request failed ($HTTP_STATUS):" >&2; cat /tmp/prairie.json >&2; exit 1 ;;
esacTry it now
POST /api/v1/scrapeSends a real request through the Prairie gateway to the upstream Firecrawl instance. Pick one of your keys (or create one on the Keys page) and a URL to scrape.
Authentication
All requests authenticate via the Authorization header. Keys start with fc_live_ and can be rotated anytime from the dashboard.
Authorization: Bearer fc_live_82x1prairie_k7v9z2qm4rt8nfa2pdlx
Errors
The API returns standard HTTP status codes. Errors include a JSON body with a code and message.
{ "success": false, "error": "Insufficient credits", "code": "insufficient_credits" }Malformed JSON or missing required field.
Missing or invalid API key.
Top up on the Credits page.
Too many requests — slow down and retry.
Upstream Firecrawl unreachable.
Upstream took too long to respond.
/api/public/v1/scrape1 creditFetches a single URL and returns clean markdown, HTML, and metadata. Add `screenshot` to `formats` to capture a screenshot in the same call.
https://prairiescrape.com/api/public/v1/scrapeSample request
# Set your key once per shell session
export PRAIRIE_API_KEY="fc_live_YOUR_KEY"
# -w prints the HTTP status so we can branch on it
HTTP_STATUS=$(curl -sS -o /tmp/prairie.json -w "%{http_code}" \
-X POST https://prairiescrape.com/api/public/v1/scrape \
-H "Authorization: Bearer $PRAIRIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "formats": ["markdown", "html"] }')
case "$HTTP_STATUS" in
2*) cat /tmp/prairie.json ;;
401) echo "Invalid API key — check Authorization header." >&2; exit 1 ;;
402) echo "Out of credits — top up at https://prairiescrape.com/dashboard/credits" >&2; exit 2 ;;
429) echo "Rate limited — retry after a few seconds." >&2; exit 3 ;;
*) echo "Request failed ($HTTP_STATUS):" >&2; cat /tmp/prairie.json >&2; exit 1 ;;
esacRequest body
{
"url": "https://example.com",
"formats": ["markdown", "html"]
}Response
{
"success": true,
"data": {
"markdown": "# Example Domain\n\nThis domain is for use in illustrative examples...",
"html": "<h1>Example Domain</h1>...",
"metadata": {
"title": "Example Domain",
"statusCode": 200,
"sourceURL": "https://example.com"
}
}
}/api/public/v1/crawl1 credit per pageRecursively crawls a domain. Returns a job id you poll with GET /api/v1/crawl/{id}.
https://prairiescrape.com/api/public/v1/crawlSample request
# Set your key once per shell session
export PRAIRIE_API_KEY="fc_live_YOUR_KEY"
# -w prints the HTTP status so we can branch on it
HTTP_STATUS=$(curl -sS -o /tmp/prairie.json -w "%{http_code}" \
-X POST https://prairiescrape.com/api/public/v1/crawl \
-H "Authorization: Bearer $PRAIRIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "limit": 50, "maxDepth": 2, "scrapeOptions": { "formats": ["markdown"] } }')
case "$HTTP_STATUS" in
2*) cat /tmp/prairie.json ;;
401) echo "Invalid API key — check Authorization header." >&2; exit 1 ;;
402) echo "Out of credits — top up at https://prairiescrape.com/dashboard/credits" >&2; exit 2 ;;
429) echo "Rate limited — retry after a few seconds." >&2; exit 3 ;;
*) echo "Request failed ($HTTP_STATUS):" >&2; cat /tmp/prairie.json >&2; exit 1 ;;
esacRequest body
{
"url": "https://example.com",
"limit": 50,
"maxDepth": 2,
"scrapeOptions": { "formats": ["markdown"] }
}Response
{
"success": true,
"id": "c4f0b3e2-8a1d-4d7f-9c9b-7e2b1a0a5d11"
}/api/public/v1/map1 creditReturns every URL discovered on a domain — fast, no page bodies. Great for building sitemaps before a targeted scrape.
https://prairiescrape.com/api/public/v1/mapSample request
# Set your key once per shell session
export PRAIRIE_API_KEY="fc_live_YOUR_KEY"
# -w prints the HTTP status so we can branch on it
HTTP_STATUS=$(curl -sS -o /tmp/prairie.json -w "%{http_code}" \
-X POST https://prairiescrape.com/api/public/v1/map \
-H "Authorization: Bearer $PRAIRIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "search": "pricing", "limit": 500 }')
case "$HTTP_STATUS" in
2*) cat /tmp/prairie.json ;;
401) echo "Invalid API key — check Authorization header." >&2; exit 1 ;;
402) echo "Out of credits — top up at https://prairiescrape.com/dashboard/credits" >&2; exit 2 ;;
429) echo "Rate limited — retry after a few seconds." >&2; exit 3 ;;
*) echo "Request failed ($HTTP_STATUS):" >&2; cat /tmp/prairie.json >&2; exit 1 ;;
esacRequest body
{
"url": "https://example.com",
"search": "pricing",
"limit": 500
}Response
{
"success": true,
"links": [
"https://example.com/",
"https://example.com/pricing",
"https://example.com/docs"
]
}/api/public/v1/extract2 creditsSchema-guided JSON extraction. Pass a JSON schema or a natural-language prompt.
https://prairiescrape.com/api/public/v1/extractSample request
# Set your key once per shell session
export PRAIRIE_API_KEY="fc_live_YOUR_KEY"
# -w prints the HTTP status so we can branch on it
HTTP_STATUS=$(curl -sS -o /tmp/prairie.json -w "%{http_code}" \
-X POST https://prairiescrape.com/api/public/v1/extract \
-H "Authorization: Bearer $PRAIRIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "urls": ["https://example.com/product"], "schema": { "type": "object", "properties": { "name": { "type": "string" }, "price": { "type": "number" }, "in_stock": { "type": "boolean" } } } }')
case "$HTTP_STATUS" in
2*) cat /tmp/prairie.json ;;
401) echo "Invalid API key — check Authorization header." >&2; exit 1 ;;
402) echo "Out of credits — top up at https://prairiescrape.com/dashboard/credits" >&2; exit 2 ;;
429) echo "Rate limited — retry after a few seconds." >&2; exit 3 ;;
*) echo "Request failed ($HTTP_STATUS):" >&2; cat /tmp/prairie.json >&2; exit 1 ;;
esacRequest body
{
"urls": ["https://example.com/product"],
"schema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" },
"in_stock": { "type": "boolean" }
}
}
}Response
{
"success": true,
"data": {
"name": "Acme Widget",
"price": 29.99,
"in_stock": true
}
}