Call it
curl https://api.peume.com/v1/call/google-news \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"gl": "us",
"hl": "en",
"query": "openai"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-news", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"gl": "us",
"hl": "en",
"query": "openai"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-news",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"gl": "us",
"hl": "en",
"query": "openai"
}
},
)
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: google-news.
Parameters
fieldsstringComma-separated keys (dotted paths descend) to keep on each result item. Trims the response, not the charge.
max_itemsintegerCaps the result rows returned; `_truncated` says how many were withheld. Not the charge.
summaryboolean`true` returns only an outline: keys, item counts, per-field sizes.
jqstringjq expression over the result envelope; its output replaces `output`. A failed expression returns the full result with `jqError`.
glstringTwo-letter country code for result localization (e.g. us, gb, de).
Example: us
hlstringTwo-letter interface and results language code (e.g. en, es, de).
Example: en
limitintegerRequested article count (1-20, default 20). Google News returns its latest matching articles and may return more or fewer than requested. Price is flat per request.
locationstringFine-grained location for result localization, given as a canonical Google location string (e.g. 'New York, United States', 'London, United Kingdom'). More specific than the country-level gl.
queryRequiredstringNews search query; supports operators like '-', 'OR', and 'site:' (e.g. bitcoin site:cnn.com).
Example: openai
timeframestringHow far back to search, written as a count plus a unit: h hours, d days, w weeks, m months, y years. So 2h is the last two hours, 30d the last thirty days, 6m the last six months. Omit this field, or send 'all', to search without a time limit.
Other ways to do it
Same job, other sources, cheapest first.
