Call it
curl https://api.peume.com/v1/call/google-trends-interest-over-time-for-search-terms \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"engine": "google_trends",
"q": "coffee,milk",
"data_type": "TIMESERIES",
"geo": "US",
"date": "today 12-m"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-trends-interest-over-time-for-search-terms", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"engine": "google_trends",
"q": "coffee,milk",
"data_type": "TIMESERIES",
"geo": "US",
"date": "today 12-m"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-trends-interest-over-time-for-search-terms",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"engine": "google_trends",
"q": "coffee,milk",
"data_type": "TIMESERIES",
"geo": "US",
"date": "today 12-m"
}
},
)
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-trends-interest-over-time-for-search-terms.
Parameters
engineRequiredstringExample: google_trends
qRequiredstringup to 5 comma-separated terms
Example: coffee,milk
data_typestringTIMESERIES (default; single or multiple queries) | GEO_MAP (compared breakdown by region; multiple comma-separated q only) | GEO_MAP_0 (interest by region; single query only) | RELATED_TOPICS (single query only) | RELATED_QUERIES (single query only)
Example: TIMESERIES
geostringregion code; default Worldwide
Example: US
datestringe.g. "today 12-m", "now 7-d"
Example: today 12-m
Other ways to do it
Same job, other sources, cheapest first.
