Base URL

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 ;;
esac

Try it now

POST /api/v1/scrape

Sends 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.

Loading…
Response will appear here.

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" }
400bad_request

Malformed JSON or missing required field.

401unauthorized

Missing or invalid API key.

402insufficient_credits

Top up on the Credits page.

429rate_limited

Too many requests — slow down and retry.

502bad_gateway

Upstream Firecrawl unreachable.

504timeout

Upstream took too long to respond.

POST/api/public/v1/scrape1 credit

Fetches a single URL and returns clean markdown, HTML, and metadata. Add `screenshot` to `formats` to capture a screenshot in the same call.

Full URLhttps://prairiescrape.com/api/public/v1/scrape

Sample 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 ;;
esac

Request 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"
    }
  }
}
POST/api/public/v1/crawl1 credit per page

Recursively crawls a domain. Returns a job id you poll with GET /api/v1/crawl/{id}.

Full URLhttps://prairiescrape.com/api/public/v1/crawl

Sample 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 ;;
esac

Request body

{
  "url": "https://example.com",
  "limit": 50,
  "maxDepth": 2,
  "scrapeOptions": { "formats": ["markdown"] }
}

Response

{
  "success": true,
  "id": "c4f0b3e2-8a1d-4d7f-9c9b-7e2b1a0a5d11"
}
POST/api/public/v1/map1 credit

Returns every URL discovered on a domain — fast, no page bodies. Great for building sitemaps before a targeted scrape.

Full URLhttps://prairiescrape.com/api/public/v1/map

Sample 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 ;;
esac

Request body

{
  "url": "https://example.com",
  "search": "pricing",
  "limit": 500
}

Response

{
  "success": true,
  "links": [
    "https://example.com/",
    "https://example.com/pricing",
    "https://example.com/docs"
  ]
}
POST/api/public/v1/extract2 credits

Schema-guided JSON extraction. Pass a JSON schema or a natural-language prompt.

Full URLhttps://prairiescrape.com/api/public/v1/extract

Sample 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 ;;
esac

Request 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
  }
}