Call it
curl https://api.peume.com/v1/call/search-the-web-by-query-ranked-pages-and-highlights \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query": "Octen API documentation",
"count": 5,
"time_basis": "auto",
"format": "text",
"safesearch": "strict",
"include_images": false
}
}'const res = await fetch("https://api.peume.com/v1/call/search-the-web-by-query-ranked-pages-and-highlights", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"query": "Octen API documentation",
"count": 5,
"time_basis": "auto",
"format": "text",
"safesearch": "strict",
"include_images": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-the-web-by-query-ranked-pages-and-highlights",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"query": "Octen API documentation",
"count": 5,
"time_basis": "auto",
"format": "text",
"safesearch": "strict",
"include_images": 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: search-the-web-by-query-ranked-pages-and-highlights.
Parameters
queryRequiredstringExample: Octen API documentation
countintegerExample: 5
include_domainsarrayexclude_domainsarrayinclude_textarrayexclude_textarraytime_basisstringauto · published · crawled
Example: auto
time_rangestringday · week · month · year · d · w · m · y
start_timestringend_timestringlanguagearrayhighlightobjectOptional enable and max_tokens controls; highlights do not incur the full-content surcharge.
full_contentobjectSet enable=true for full page content. Only returned full-content results beyond 10 cost extra.
formatstringmarkdown · text
Example: text
safesearchstringoff · strict
Example: strict
include_imagesbooleanExample: false
Other ways to do it
Same job, other sources, cheapest first.
