Call it
curl https://api.peume.com/v1/call/search-recent-news-3 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query": "AI browser agents",
"domain_type": "news",
"location": "US",
"language": "en",
"include_domains": [
"github.com",
"arxiv.org"
],
"exclude_domains": [
"pinterest.com",
"quora.com"
]
}
}'const res = await fetch("https://api.peume.com/v1/call/search-recent-news-3", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"query": "AI browser agents",
"domain_type": "news",
"location": "US",
"language": "en",
"include_domains": [
"github.com",
"arxiv.org"
],
"exclude_domains": [
"pinterest.com",
"quora.com"
]
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-recent-news-3",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"query": "AI browser agents",
"domain_type": "news",
"location": "US",
"language": "en",
"include_domains": [
"github.com",
"arxiv.org"
],
"exclude_domains": [
"pinterest.com",
"quora.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: search-recent-news-3.
Parameters
queryRequiredstringExample: AI browser agents
domain_typeRequiredstringnews
Example: news
purposestringlocationstringISO 3166-1 alpha-2 country code the ranking targets: rows from other countries come back, so check each row.
Example: US
languagestringExample: en
include_domainsarraydomains to favour: rows from other domains come back, and a narrow list can answer total_results 0; sent comma-separated on the wire
Example: ["github.com","arxiv.org"]
exclude_domainsarraydomains to drop from results; sent comma-separated on the wire
Example: ["pinterest.com","quora.com"]
after_datestringYYYY-MM-DD
Example: 2024-01-01
before_datestringYYYY-MM-DD
Example: 2024-12-31
recency_minutesintegerpageintegerExample: 0
include_thumbnailbooleanExample: false
fetchobjectJSON object in the query string; {} attaches each result's fetched page content. A boolean is rejected (400 INVALID_INPUT).
Example: {}
Other ways to do it
Same job, other sources, cheapest first.
