Call it
curl https://api.peume.com/v1/call/fetch-rendered-web-content \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"assert_status_code": 200,
"locale": "en-US",
"page_timeout": 30,
"referer": "https://example.com",
"remove_selector": "nav, footer",
"respond_timing": "network-idle"
}
}'const res = await fetch("https://api.peume.com/v1/call/fetch-rendered-web-content", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"assert_status_code": 200,
"locale": "en-US",
"page_timeout": 30,
"referer": "https://example.com",
"remove_selector": "nav, footer",
"respond_timing": "network-idle"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/fetch-rendered-web-content",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"assert_status_code": 200,
"locale": "en-US",
"page_timeout": 30,
"referer": "https://example.com",
"remove_selector": "nav, footer",
"respond_timing": "network-idle"
}
},
)
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-rendered-web-content.
Parameters
assert_status_codeintegerExpected origin HTTP status, 100-599. A different status is rejected; otherwise a rendered error page is a successful capture.
Example: 200
basestringResolve relative links against the requested URL (initial, default) or the final URL after redirects (final).
initial · final
detach_invisiblesbooleanDrop display:none elements from the page.
enginestringauto (default; lightweight HTTP first, a browser when needed), browser, or curl (no JavaScript).
auto · browser · curl
keep_img_data_urlbooleanKeep inline data: images in Markdown.
localestringBrowser locale as a language tag, 2-64 characters. Defaults to the browser's own.
Example: en-US
markdown_chunkingstringtrue, h1-h5, structured or s1-s5: split the Markdown and return chunks.
true · h1 · h2 · h3 · h4 · h5 · structured · s1 · s2 · s3 · s4 · s5
max_tokensintegerInteger 500-10,000,000. Trim content to this many tokens.
no_gfmstringtrue, false or table: disable GitHub-flavored Markdown, or only its tables.
page_timeoutintegerSeconds from 1 through 180 for page loading and browser operations. Cannot extend the total request budget set by timeout.
Example: 30
presetstringOption preset. Fills only the options the request leaves unset.
reader · index · research · agent · spider
refererstringHTTP(S) URL sent as the Referer.
Example: https://example.com
remove_overlaybooleanRemove modal and cookie-banner overlays from the page.
remove_selectorstringCSS selector removed before extraction, 1-2,048 characters; POST also accepts a list of 1-16 selectors.
Example: nav, footer
respond_timingstringPage readiness condition to reach before responding.
html · visible-content · mutation-idle · resource-idle · media-idle · network-idle
Example: network-idle
respond_withstringOutput format: content (default; main content as Markdown, or the whole page when extraction keeps too little), markdown (whole page as Markdown), html, text, frontmatter (content plus front matter), or a '+' combination such as markdown+frontmatter. For screenshots use /api/web/screenshot.
Example: markdown
retain_imagesstringImages to keep: all (default), alt (alt text only) or none.
none · all · alt
Example: alt
retain_linksstringLinks to keep: all (default), text (link text only), none, or gpt-oss (citation format with a links summary).
none · all · text · gpt-oss
retain_mediastringHow video, audio and embedded video appear: none, text, link (default), image or html.
none · text · link · image · html
robots_txtstringUser agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected.
Example: MyBot
target_selectorstringCSS selector to extract, 1-2,048 characters; POST also accepts a list of 1-16 selectors. Implies waiting for the selector. Match-all selectors are rejected.
Example: article
token_budgetintegerInteger 1-10,000,000. Reject the page when its token count exceeds the budget.
urlRequiredstringPublic HTTP(S) URL to capture, 1-8,192 characters. Include http:// or bare domains are rejected. The host must be public, on port 80 or 443, without embedded credentials.
Example: https://example.com
user_agentstringUser-Agent for the page request, 1-1,024 characters without control characters. Defaults to the browser's own.
wait_for_selectorstringCSS selector to wait for after navigation, 1-2,048 characters. POST also accepts a list of 1-16 selectors.
Example: main
with_iframestringtrue, false or quoted: include iframe content before extraction.
with_images_summarybooleanAdd an images list to the response.
with_links_summarystringtrue, false or all: add a links list to the response.
with_shadow_dombooleanInclude open shadow DOM content before extraction.
timeoutnumberOptional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline.
Other ways to do it
Same job, other sources, cheapest first.
