SerpBase

API リファレンス · 検索エンジン

Google AI Mode

Google's AI Mode answer to a question, as plain text and as Markdown with its headings, lists and tables, plus the pages it cites with their real URLs.

POSThttps://api.serpbase.dev/google/ai_mode
3 クレジットPlayground で実行

例

BASH
curl -X POST 'https://api.serpbase.dev/google/ai_mode' \
  -H "Content-Type: application/json" \
  -H 'X-API-Key: YOUR_API_KEY' \
  --max-time 60 \
  -d '{"gl":"us","hl":"en","q":"how does a heat pump work"}'

このエンドポイントの実際の応答例はまだ公開していません。Playground で例を実行すると実際の応答を確認できます。

パラメーター

format
"json" | "markdown"
json(デフォルト)は解析済みの結果、markdown は同じ結果を言語モデル向けの Markdown テキスト(text/markdown)で返します。
詳細

クレジットは同じで、失敗時は JSON のエンベロープが返ります。

gl
string
例: "us"
hl
string
例: "en"
q
string
例: "how does a heat pump work"

例は完全な契約ではありません。既知の項目は検証され、追加パラメーターは許可されます。

返るフィールド

フィールドは上の応答例のとおりです。すべてのエンドポイントに status、credits_charged、request_id が含まれます。

失敗したとき

失敗したリクエストは status が 0 以外で error が付き、課金されません。よくあるもの:

1000パラメーターが不足または誤りリクエストを修正
1020クレジット不足チャージ
1029毎秒リクエスト数の超過Retry-After 秒待つ
1502 · 1504今回は取得元を読み取れなかった再試行
すべてのステータスコード →