Call it
curl https://api.peume.com/v1/call/crawl-website \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "your url"
}
}'const res = await fetch("https://api.peume.com/v1/call/crawl-website", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "your url"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/crawl-website",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "your url"
}
},
)
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-website.
Parameters
urlRequiredstringStarting URL for the crawl, including the http:// or https:// scheme.
maxPagesintegerMaximum number of pages to crawl. Default 100, hard cap 500. This is also what sizes the admission hold — one credit per page.
maxDepthintegerMaximum link depth from the starting URL (0 = only the starting page). Unlimited when omitted.
urlRegexstringOnly URLs matching this pattern are followed and scraped.
excludeUrlRegexstringURLs matching this pattern are never followed or scraped, even when they match urlRegex. The starting URL is always scraped.
sourcePreferencearrayMarkdown sources in order of preference: 'html-conversion' converts the page HTML, 'markdown-direct' uses Markdown the site publishes. Default both, in that order.
followSubdomainsbooleanFollow links on subdomains of the starting URL's domain (e.g. docs.example.com from example.com). www and apex are always equivalent. Default false.
includeLinksbooleanPreserve hyperlinks in the Markdown output. Default true.
includeImagesbooleanInclude image references in the Markdown output. Default false.
shortenBase64ImagesbooleanTruncate inline base64 image payloads to keep the output small. Default true.
useMainContentOnlybooleanBest-effort: ask to drop headers, footers, sidebars, navigation, and cookie or consent panels on each page. It is a heuristic, so on some pages (news sites, legal and corporate pages, comment sections) a lot of that chrome stays in the output; do not assume the first characters are the article body. For exact control set excludeSelectors / includeSelectors on this crawl. Default false.
includeFramesbooleanRender iframe contents into the output. Default false.
includeSelectorsarrayCSS selectors. When provided, only matching subtrees are kept before each page is converted to Markdown.
excludeSelectorsarrayCSS selectors to remove before conversion. Applied after includeSelectors; exclusion wins on a double match.
pdfobjectPDF parsing controls.
settleAnimationsbooleanWait briefly for animations to settle before capturing each page. Default false.
maxAgeMsintegerReuse a cached result younger than this many milliseconds. Default 86400000 (1 day), max 2592000000 (30 days). Set 0 to always fetch fresh.
waitForMsintegerExtra browser wait in milliseconds after page load before the content is captured (0-30000). Useful for JavaScript-heavy pages.
stopAfterMsintegerSoft time budget for the whole crawl in milliseconds (10000-110000, default 80000). When exceeded, the pages collected so far are returned instead of continuing.
countrystringTwo-letter ISO 3166-1 alpha-2 country code (e.g. 'us', 'gb', 'de'). Must be one of supported countries.
timeoutMSintegerUpstream deadline in milliseconds (1000-110000). stops the call when it passes; the cap leaves the run time to return the answer within the endpoint's budget.
