Call it
curl https://api.peume.com/v1/call/fetch-cleaned-page-content-not-source-html \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"urls": [
"https://example.com"
],
"format": "markdown",
"links": false,
"image_links": false,
"page_metadata": false,
"include_etag_and_last_modified": false
}
}'const res = await fetch("https://api.peume.com/v1/call/fetch-cleaned-page-content-not-source-html", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"urls": [
"https://example.com"
],
"format": "markdown",
"links": false,
"image_links": false,
"page_metadata": false,
"include_etag_and_last_modified": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/fetch-cleaned-page-content-not-source-html",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"urls": [
"https://example.com"
],
"format": "markdown",
"links": False,
"image_links": False,
"page_metadata": False,
"include_etag_and_last_modified": False
}
},
)
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-cleaned-page-content-not-source-html.
Parameters
urlsRequiredarrayExample: ["https://example.com"]
purposestringformatstringmarkdown (default) for LLM consumption; html returns cleaned semantic HTML, not the page source — head scripts (including application/ld+json), forms, mailto targets and many attributes are removed; json returns a structured document tree. has no raw/source-HTML format on this route; for HTML as the browser received it (head and scripts intact), use.web.scrape with formats including html.
Example: markdown
linksbooleanExample: false
image_linksbooleanExample: false
page_metadatabooleanExample: false
ttlintegercache lifetime in seconds; 0 requests a fresh fetch.
per_url_timeout_msintegerif_none_matchstringif_modified_sincestringinclude_etag_and_last_modifiedbooleanExample: false
include_selectorsarrayexclude_selectorsarrayOther ways to do it
Same job, other sources, cheapest first.
