Call it
curl https://api.peume.com/v1/call/extract-structured-data-from-a-web-page \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
}
},
"mode": "standard",
"renderJs": false,
"extractImages": false
}
}'const res = await fetch("https://api.peume.com/v1/call/extract-structured-data-from-a-web-page", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
}
},
"mode": "standard",
"renderJs": false,
"extractImages": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/extract-structured-data-from-a-web-page",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
}
},
"mode": "standard",
"renderJs": False,
"extractImages": False
}
},
)
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-from-a-web-page.
Parameters
urlRequiredstringExample: https://example.com
schemaRequiredobjectExample: {"type":"object","properties":{"title":{"type":"string"}}}
instructionsstringAdditional extraction guidance; maximum 4,000 characters.
modestringstandard · pro
Example: standard
renderJsbooleanExample: false
extractImagesbooleanExample: false
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 page dataExtract fields from a public page using a prompt and JSON Schema.
