Call it
curl https://api.peume.com/v1/call/web-scrape-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"formats": [
"markdown",
"html"
],
"onlyMainContent": false,
"url": "your url"
}
}'const res = await fetch("https://api.peume.com/v1/call/web-scrape-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"formats": [
"markdown",
"html"
],
"onlyMainContent": false,
"url": "your url"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/web-scrape-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"formats": [
"markdown",
"html"
],
"onlyMainContent": False,
"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: web-scrape-2.
Parameters
blockAdsbooleanWhen true (upstream default), strip ad and cookie-consent elements before capture. Set false to keep them.
excludeTagsarrayCSS selectors to drop before capture (for example ["nav", "footer", ".ads"]). Applied after includeTags.
formatsarrayWhich representations of the page to return. Any combination of: markdown (page content as Markdown), html (the page HTML exactly as the browser received it, including head and script tags). Each requested format is returned under the matching output field. Defaults to both. rawHtml is a deprecated alias of html, returned under a rawHtml field for callers that predate the rename; send html instead.
Example: ["markdown","html"]
routestringUpstream source to run on; omit for "heron". bison ($0.00063 per call, 89.1% uptime); salamander ($0.001 per call, 79.4% uptime); heron ($0.00125 per call, 91.7% uptime); badger ($0.0014 per call, 40.7% uptime); koala ($0.0015 per call, 38.2% uptime). Output fields only some routes return: html (bison, salamander, badger, koala); rawHtml (bison, salamander, badger, koala); statusCode (bison, salamander, heron, koala). A route can refuse an input it cannot apply with a 400 source_unknown (not charged): retry on another route, or omit that input.
bison · salamander · heron · badger · koala
includeTagsarrayCSS selectors to keep. When set, only content matching these selectors is captured (for example ["article", "main"] or ["#content"]).
mobilebooleanWhen true, render the page with a mobile viewport and user agent instead of desktop. Some sites serve materially different content to mobile.
onlyMainContentbooleanWhen true, return only the main article content, stripping navigation, headers, footers, and other boilerplate. Defaults to false to capture the full page.
Example: false
waitForintegerMilliseconds to wait for the page to finish rendering before capture. Use this for JavaScript-heavy pages or single-page apps whose content loads after the initial paint. Capped at 15000 to stay within the request timeout. This wait is time you asked us to spend, so your response takes this much longer, and it is excluded from the latency published for this endpoint. If every provider that can wait fails, the page may still be returned, captured without the wait.
urlRequiredstringThe full web address of the page to scrape, including its domain, for example https://example.com. The https:// prefix is optional.
