Call it
curl https://api.peume.com/v1/call/google-ai-mode-answer-text-sources-products-places \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "best electric suv under 50k",
"gl": "US",
"hl": "en",
"device": "desktop"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-ai-mode-answer-text-sources-products-places", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "best electric suv under 50k",
"gl": "US",
"hl": "en",
"device": "desktop"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-ai-mode-answer-text-sources-products-places",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "best electric suv under 50k",
"gl": "US",
"hl": "en",
"device": "desktop"
}
},
)
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-ai-mode-answer-text-sources-products-places.
Parameters
promptRequiredstring1-10,000 characters
Example: best electric suv under 50k
glRequiredstringresult geography, ISO 3166-1 alpha-2, from AI Mode's own supported-country list. `country` is a deprecated alias.
Example: US
hlstringinterface language override
Example: en
locationstringfree-text location; mutually exclusive with uule
uulestringGoogle UULE location string; mutually exclusive with location
devicestringdesktop | mobile, default desktop
Example: desktop
includeobjectany of markdown, html, googleGoto, expandProducts. The first three are free; expandProducts adds 1 credit per expanded product, charged after the fact from the number actually returned.
Other ways to do it
Same job, other sources, cheapest first.
