Get Google AI Mode answer
litescrape.google.serp.ai_modeReturns the answer Google AI Mode generates for a question, as ordered text blocks, with the sources it cited
- Price
- $0.00015/successプロバイダー原価
- Success rate
- 50.6%Last 30 days · 1,745 calls
- Latency p50
- 8.5 sp95 34 s
- Last verified
- 2026/09/29Verified working
GEThttps://toolswitch.dev/v1/tools/litescrape.google.serp.ai_mode?q=what+is+photosynthesis&gl=us&hl=enPreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
q | 文字列 | 必須 | Question to ask, up to 2,048 characters. Required on every turn, including follow-ups. | what is the best espresso machine for a small kitchen |
gl | 文字列 | 任意 | Two-letter country code used to localize results. | us |
hl | 文字列 | 任意 | Language code such as en, en-GB, or de. | en |
uule | 文字列 | 任意 | Pre-encoded Google location token. Mutually exclusive with location. | |
device | 文字列 | 任意 | Google device layout. Each device is served Google's real layout for it. | |
timeout | 数値 | 任意 | Optional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline. | |
location | 文字列 | 任意 | Human-readable search location, such as Austin, Texas. At most 63 UTF-8 bytes. Mutually exclusive with uule. | Austin, Texas |
image_url | 文字列 | 任意 | Public http or https URL of an image to include in the question, up to 2,048 characters. The image may be at most 20 MB. Cannot be combined with subsequent_request_token. | |
continuable | 真偽値 | 任意 | Return a subsequent_request_token so this answer can be followed up, when Google offers a continuation. | |
google_domain | 文字列 | 任意 | Google domain used for the request. | google.com |
subsequent_request_token | 文字列 | 任意 | Token from a previous continuable response. Send it with a new q to continue that conversation; reuse the same gl, hl and location. Expires after 30 minutes. Cannot be combined with image_url. | |
- クエリパラメータ
q文字列必須Question to ask, up to 2,048 characters. Required on every turn, including follow-ups.
例:
what is the best espresso machine for a small kitchengl文字列任意Two-letter country code used to localize results.
例:
ushl文字列任意Language code such as en, en-GB, or de.
例:
enuule文字列任意Pre-encoded Google location token. Mutually exclusive with location.
device文字列任意Google device layout. Each device is served Google's real layout for it.
timeout数値任意Optional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline.
location文字列任意Human-readable search location, such as Austin, Texas. At most 63 UTF-8 bytes. Mutually exclusive with uule.
例:
Austin, Texasimage_url文字列任意Public http or https URL of an image to include in the question, up to 2,048 characters. The image may be at most 20 MB. Cannot be combined with subsequent_request_token.
continuable真偽値任意Return a subsequent_request_token so this answer can be followed up, when Google offers a continuation.
google_domain文字列任意Google domain used for the request.
例:
google.comsubsequent_request_token文字列任意Token from a previous continuable response. Send it with a new q to continue that conversation; reuse the same gl, hl and location. Expires after 30 minutes. Cannot be combined with image_url.
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
curl -X GET 'https://toolswitch.dev/v1/tools/litescrape.google.serp.ai_mode?q=what+is+photosynthesis&gl=us&hl=en' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/litescrape.google.serp.ai_mode?q=what+is+photosynthesis&gl=us&hl=en",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/litescrape.google.serp.ai_mode?q=what+is+photosynthesis&gl=us&hl=en", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は $0.00015/success です。サービス料を含みます。