Call it
curl https://api.peume.com/v1/call/extract-structured-page-data-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "https://example.com",
"prompt": "Extract the page title.",
"response_format": "your response format"
}
}'const res = await fetch("https://api.peume.com/v1/call/extract-structured-page-data-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "https://example.com",
"prompt": "Extract the page title.",
"response_format": "your response format"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/extract-structured-page-data-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "https://example.com",
"prompt": "Extract the page title.",
"response_format": "your response format"
}
},
)
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-page-data-2.
Parameters
urlRequiredstringExample: https://example.com
promptstringExample: Extract the page title.
response_formatRequiredobjectUse {type: json_schema, json_schema: <JSON Schema>}; the live API rejects omission despite its docs.
Other ways to do it
Same job, other sources, cheapest first.
Extract structured page dataBest sourceExtract typed JSON from one web page. Checks the cheapest source first and moves to the next one until it finds an answer.Extract structured data from a web page (contact, JSON)Scrape a page (crawled for you) or read your own content, and return typed JSON matching a JSON schema and/or a plain-English instruction, extracted by an LLM.Extract structured data from a web pageFetch a page and extract typed JSON with a supplied schema.
