Call it
curl https://api.peume.com/v1/call/web-scrape \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"formats": [
"markdown",
"html"
],
"onlyMainContent": false,
"url": "https://example.com"
}
}'const res = await fetch("https://api.peume.com/v1/call/web-scrape", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"formats": [
"markdown",
"html"
],
"onlyMainContent": false,
"url": "https://example.com"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/web-scrape",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"formats": [
"markdown",
"html"
],
"onlyMainContent": False,
"url": "https://example.com"
}
},
)
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.
Parameters
fieldsstringComma-separated keys (dotted paths descend) to keep on each result item. Trims the response, not the charge.
max_itemsintegerCaps the result rows returned; `_truncated` says how many were withheld. Not the charge.
summaryboolean`true` returns only an outline: keys, item counts, per-field sizes.
jqstringjq expression over the result envelope; its output replaces `output`. A failed expression returns the full result with `jqError`.
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
Example: ["markdown","html"]
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
urlRequiredstringThe URL of the page to scrape.
Example: https://example.com
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 lon
Other ways to do it
Same job, other sources, cheapest first.
