Call it
curl https://api.peume.com/v1/call/fetch-page-content \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "https://docs.example.ai/",
"max_chars": 5000,
"live": false,
"prompt": "List the API endpoints."
}
}'const res = await fetch("https://api.peume.com/v1/call/fetch-page-content", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "https://docs.example.ai/",
"max_chars": 5000,
"live": false,
"prompt": "List the API endpoints."
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/fetch-page-content",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "https://docs.example.ai/",
"max_chars": 5000,
"live": False,
"prompt": "List the API endpoints."
}
},
)
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: fetch-page-content.
Parameters
urlRequiredstringExample: https://docs.example.ai/
max_charsintegerLonger content is truncated and a notice is appended after the cut.
Example: 5000
livebooleanFetch directly from the source instead of using the indexed copy; also supports URLs absent from the index.
Example: false
promptstringReturn only the extraction requested here instead of the full page.
Example: List the API endpoints.
Other ways to do it
Same job, other sources, cheapest first.
