Call it
curl https://api.peume.com/v1/call/auto-detect-a-page-type-and-extract-it-by \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "https://www.technologyreview.com/2020/09/04/1008156/knowledge-graph-ai-reads-web-machine-learning-natural-language-processing/",
"discussion": true,
"timeout": 30000
}
}'const res = await fetch("https://api.peume.com/v1/call/auto-detect-a-page-type-and-extract-it-by", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "https://www.technologyreview.com/2020/09/04/1008156/knowledge-graph-ai-reads-web-machine-learning-natural-language-processing/",
"discussion": true,
"timeout": 30000
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/auto-detect-a-page-type-and-extract-it-by",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "https://www.technologyreview.com/2020/09/04/1008156/knowledge-graph-ai-reads-web-machine-learning-natural-language-processing/",
"discussion": True,
"timeout": 30000
}
},
)
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: auto-detect-a-page-type-and-extract-it-by.
Parameters
urlRequiredstringtarget URL to extract, URL-encoded
Example: https://www.technologyreview.com/2020/09/04/1008156/knowledge-graph-ai-reads-web-machine-learning-natural-language-processing/
modestringrestrict extraction to one page type: article, product, discussion, image, video, list, event
fallbackstringwhich API to fall back to if page type cannot be determined
fieldsstringcomma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb
discussionbooleanpass false to disable automatic comment/review extraction
Example: true
timeoutintegerms to wait for content retrieval
Example: 30000
proxystringcustom proxy IP for fetching the target page
proxyAuthstringusername:password for the custom proxy
useProxystring'default' routes through Diffbot's datacenter proxy (2 credits/page instead of 1); 'none' disables proxies
renderDelayintegerextra rendering ms before DOM extraction, max 180000
scrollstring'slow' or 'fast' — triggers lazy-loaded content
callbackstringJSONP callback for cross-domain AJAX
