PeumeAPI

Search & SEO · Google

Ask AI Mode

Ask Google AI Mode a question and get its generated answer with sources.

$0.023 per call

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"
  }
}'

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

qRequiredstring

The 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.

continuablestring

Set 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_tokenstring

The 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.

hlstring

The 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).

glstring

The 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_urlstring

The URL of an image to include in the prompt. The image will be used as additional context for the AI to generate a response.

locationstring

From 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.

devicestring

The 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_restrictorstring

The fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

uulestring

The 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.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.