POST /v1/extract

Hosted: https://api.fastcrw.com · Self-hosted: http://localhost:3000

Auth (hosted only): Authorization: Bearer $CRW_API_KEY

Self-hosted: no auth required by default. See configuration.

Request body

{
  "url": "https://example.com/pricing",
  "urls": ["https://example.com/pricing"],
  "schema": {
    "type": "object",
    "properties": {
      "plan": {"type": "string"},
      "monthly_price_usd": {"type": "number"}
    }
  },
  "prompt": "Extract the plan name and monthly USD price.",
  "llmApiKey": "sk-...",
  "llmProvider": "openai",
  "llmModel": "gpt-4o-mini"
}

Provide either url or urls. BYOK: llmApiKey is required unless the server is configured with a provider key. Minimum 2 credits per call (LLM round-trip).

Response

{
  "success": true,
  "data": {
    "plan": "Pro",
    "monthly_price_usd": 49
  }
}

Python

# Run with: python3 extract.py
import os, requests

resp = requests.post(
    "https://api.fastcrw.com/v1/extract",
    headers={"Authorization": f"Bearer {os.environ['CRW_API_KEY']}"},
    json={
        "url": "https://example.com/pricing",
        "prompt": "Extract the plan name and monthly USD price.",
        "schema": {
            "type": "object",
            "properties": {
                "plan": {"type": "string"},
                "monthly_price_usd": {"type": "number"},
            },
        },
        "llmApiKey": os.environ["OPENAI_API_KEY"],
        "llmProvider": "openai",
        "llmModel": "gpt-4o-mini",
    },
    timeout=120,
)
resp.raise_for_status()
body = resp.json()  # {"success": true, "data": {...}}
print(body["data"])

Related endpoints

← CRW docs home