Call it
curl https://api.peume.com/v1/call/get-page-contents-by-url \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"urls": [
"https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world"
],
"text": {
"maxCharacters": 2000
}
}
}'const res = await fetch("https://api.peume.com/v1/call/get-page-contents-by-url", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"urls": [
"https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world"
],
"text": {
"maxCharacters": 2000
}
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-page-contents-by-url",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"urls": [
"https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world"
],
"text": {
"maxCharacters": 2000
}
}
},
)
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: get-page-contents-by-url.
Parameters
urlsRequiredarrayone or more page URLs; each page is billed per content type requested
Example: ["https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world"]
textbooleantrue, or {maxCharacters: N} — the page as clean text. $0.001 per page
Example: {"maxCharacters":2000}
highlightsbooleantrue, or {query, maxCharacters} — the passages most relevant to `query`. $0.001 per page
summaryobject{query} — an AI summary of the page focused on `query`. $0.001 per page
maxAgeHoursintegerserve cache if younger than this, else live-crawl; omit for default freshness
livecrawlTimeoutintegerms, default 10000
subpagesintegeralso crawl N linked subpages (each billed as a page)
Other ways to do it
Same job, other sources, cheapest first.
