Extract
POST /extract
Fetch one or more URLs and return clean, extracted content — HTML (via trafilatura), PDF (via pypdf), and JS-heavy pages (via a headless-Chromium fallback). Only successfully extracted URLs are billed.
Request
Section titled “Request”curl -X POST https://api.crisps.ai/extract \ -H "Authorization: Bearer $CRISPS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "urls": [ "https://arxiv.org/pdf/2412.19437", "https://en.wikipedia.org/wiki/Mixture_of_experts" ], "extract_depth": "advanced", "format": "markdown" }'import os, httpx
r = httpx.post( "https://api.crisps.ai/extract", headers={"Authorization": f"Bearer {os.environ['CRISPS_API_KEY']}"}, json={ "urls": ["https://arxiv.org/pdf/2412.19437"], "extract_depth": "advanced", }, timeout=120,)print(r.json()["results"][0]["raw_content"][:500])const res = await fetch("https://api.crisps.ai/extract", { method: "POST", headers: { Authorization: `Bearer ${process.env.CRISPS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ urls: ["https://arxiv.org/pdf/2412.19437"], extract_depth: "advanced", }),});console.log((await res.json()).results);Try it
Section titled “Try it”Body parameters
Section titled “Body parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
urls required | string | string[] | — | One URL or a list (up to 20). |
extract_depth | string | advanced | basic or advanced (deeper fallbacks, higher recall). |
format | string | markdown | markdown or text. |
query | string | — | If set, chunks are reranked against this query. |
chunks_per_source | integer | 3 | Top-N most relevant chunks per source when query is given. |
include_favicon | bool | false | Include each URL’s favicon. |
timeout | number | — | Per-URL fetch cap in seconds. |
Response
Section titled “Response”{ "results": [ { "url": "https://arxiv.org/pdf/2412.19437", "raw_content": "# DeepSeek-V3 …" } ], "failed_results": []}| Field | Description |
|---|---|
results[] | Successfully extracted URLs with raw_content (and favicon when requested). |
failed_results[] | URLs that could not be extracted — not billed. |
Credits: 1 per 5 successful URLs (2 per 5 on advanced), reported in the
X-Credits-* response headers.