Call it
curl https://api.peume.com/v1/call/extract-structured-data \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "your url",
"schema": "your schema"
}
}'const res = await fetch("https://api.peume.com/v1/call/extract-structured-data", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "your url",
"schema": "your schema"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/extract-structured-data",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "your url",
"schema": "your schema"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: extract-structured-data.
Parameters
urlRequiredstringStarting website URL to crawl and extract from.
schemaRequiredobjectJSON Schema describing the object to return. Generate it from a Zod or Pydantic model, or hand-write it — fills exactly this shape.
instructionsstringExtraction guidance: which facts to prioritize, how to interpret ambiguous fields.
factCheckbooleanWhen true, every returned value must be grounded in text stated on the page and unsupported fields come back null/empty. When false (default), reasonable inferences are allowed while verifiable specifics stay faithful to the source.
followSubdomainsbooleanFollow links on subdomains of the starting URL's domain. Default false.
maxPagesintegerMaximum number of pages to analyze. Default 5, hard cap 50. Does NOT change the price — extraction is billed per call.
maxDepthintegerMaximum link depth from the starting URL (0 = only the starting page). Unlimited when omitted.
includeFramesbooleanInclude iframe contents in the Markdown handed to the extractor. Default false.
maxAgeMsintegerReuse a cached result younger than this many milliseconds. Default 86400000 (1 day), max 2592000000 (30 days). Set 0 to always fetch fresh.
waitForMsintegerExtra browser wait in milliseconds after page load before the content is captured (0-30000). Useful for JavaScript-heavy pages.
settleAnimationsbooleanWait briefly for animations to settle before each page is read. Default false.
stopAfterMsintegerSoft time budget for the crawl phase in milliseconds (10000-110000, default 80000).
timeoutMSintegerUpstream timeout in milliseconds (max 300000). aborts the call with a 408 when exceeded. Keep it below the endpoint's requestTimeoutMs so the provider answers before the platform's own budget expires.
