Call it
curl https://api.peume.com/v1/call/crawl-a-whole-site-as-a-background-job \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "https://docs.example.com/",
"depth": 2,
"max_pages": 100,
"include_subdomains": false,
"content": "md"
}
}'const res = await fetch("https://api.peume.com/v1/call/crawl-a-whole-site-as-a-background-job", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "https://docs.example.com/",
"depth": 2,
"max_pages": 100,
"include_subdomains": false,
"content": "md"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/crawl-a-whole-site-as-a-background-job",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "https://docs.example.com/",
"depth": 2,
"max_pages": 100,
"include_subdomains": False,
"content": "md"
}
},
)
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: crawl-a-whole-site-as-a-background-job.
Parameters
urlRequiredstringthe start page, an http(s) URL
Example: https://docs.example.com/
depthintegerExample: 2
max_pagesintegerExample: 100
includestringfollow only matching URLs: a path prefix or a glob with *
excludestringnever follow matching URLs, same form as include
include_subdomainsbooleanExample: false
contentstringmd · html · none
Example: md
Other ways to do it
Same job, other sources, cheapest first.
