Call it
curl https://api.peume.com/v1/call/search-news-by-query-articles-and-subjects \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query": "Octen AI",
"count": 5,
"time_basis": "auto"
}
}'const res = await fetch("https://api.peume.com/v1/call/search-news-by-query-articles-and-subjects", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"query": "Octen AI",
"count": 5,
"time_basis": "auto"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-news-by-query-articles-and-subjects",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"query": "Octen AI",
"count": 5,
"time_basis": "auto"
}
},
)
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-news-by-query-articles-and-subjects.
Parameters
queryRequiredstringExample: Octen AI
countintegerExample: 5
include_domainsarrayexclude_domainsarraytime_basisstringauto · published · crawled
Example: auto
time_rangestringday · week · month · year · d · w · m · y
start_timestringend_timestringlanguagearrayhighlightobjectfull_contentobjectSet enable=true for full page content. Only returned full-content results beyond 10 cost extra.
subjectsobjectSubject grouping is enabled by default; accepts enable, count, and max_sub_news.
Other ways to do it
Same job, other sources, cheapest first.
Search news with BraveFind recent news articles in Brave's news index.Search newsBest sourceSearch recent news articles by topic. Checks the cheapest source first and moves to the next one until it finds an answer.Search recent newsSearch news index with optional recency, date and language filters, steered toward chosen domains and a country.Search recent newsReturn ranked news coverage from one or more sources.Search recent newsSearch news articles with news topic.Search news by topicThe search endpoint lets you intelligently search the web and extract contents from the results.
