Call it
curl https://api.peume.com/v1/call/google-ask-ai-mode \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"q": "your q"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-ask-ai-mode", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"q": "your q"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-ask-ai-mode",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"q": "your q"
}
},
)
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-ask-ai-mode.
Parameters
qRequiredstringThe query you want to search. You can use anything that you would use in a regular Google AI Mode search. Google AI Mode may support multiple languages (including **English**), though not all are available yet.
continuablestringSet parameter to `true` to make the conversation continuable. It defaults to `false`. When set to `true`, will return a `subsequent_request_token` in the response which can be used to continue the conversation with a follow-up question that includes the prior exchange as context (multi-turn).
subsequent_request_tokenstringThe token used to continue a Google AI Mode conversation. Pass this token to send a follow-up question that includes the prior exchange as context (multi-turn). The token is returned by from your previous request using our Google AI Mode API. When using this token, include a new `q` for your follow-up prompt. For consistent behavior, reuse the same localization settings (`gl`, `hl`, and location) you used to obtain the token.
hlstringThe language to use for the Google search. It's a two or three-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French), optionally followed by a two-letter or three-digit region code (e.g., `en-gb` for British English, or `es-419` for Latin American Spanish).
glstringThe country to use for the Google search. It's a two-letter country code. (e.g., `us` for the United States, `uk` for United Kingdom, or `fr` for France).
image_urlstringThe URL of an image to include in the prompt. The image will be used as additional context for the AI to generate a response.
locationstringFrom where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need more precise control. The `location` and `uule` parameters can't be used together. It is recommended to specify `location` at the city level in order to simulate a real user’s search. If `location` is omitted, the search may take on the location of the proxy.
devicestringThe device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser.
json_restrictorstringThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
uulestringThe Google encoded location you want to use for the search. `uule` and `location` parameters can't be used together. For consistent results with coordinates-based `uule` parameter, a matching `gl` parameter is required. Head to UULE Generator if you need to convert a location or GPS coordinates to `uule` parameter, and vice versa.
