Answer a question from the web, prose or JSON
crawl4ai.web.answerAnswers a question or a whole agent prompt (up to 4,000 characters) from the web's current top results, with the pages it drew on. Ask for JSON in the question, or pass a JSON Schema, and the answer is JSON of that shape. answer.source says whether the text is Google's own answer (google_ai_mode, google_ai_overview) or written from the pages (crawl4ai). answered is false, and free, when the pages hold no answer. Experimental: fields may be added.
- Price
- $0.00215/successプロバイダー原価
- Success rate
- 97.7%Last 30 days · 2,074 calls
- Latency p50
- 4.9 sp95 11 s
- Last verified
- 2026/10/07Verified working
GEThttps://toolswitch.dev/v1/tools/crawl4ai.web.answer?q=who+founded+stripePreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
q | 文字列 | 必須 | the question or prompt, up to 4,000 characters; say the shape you want inside it, e.g. 'answer with JSON only: {...}' | who founded stripe |
gl | 文字列 | 任意 | search country, e.g. us | |
hl | 文字列 | 任意 | search language, e.g. en | |
deep | 整数 | 任意 | 1 reads pages and writes an answer when the web has none; 0 returns only the web's own direct answer, else answered false | |
schema | 文字列 | 任意 | a JSON Schema object as a JSON string, up to 4,000 bytes; the answer is then JSON of exactly that shape (parse answer.text) | |
nocache | 整数 | 任意 | 1 skips every cache | |
- クエリパラメータ
q文字列必須the question or prompt, up to 4,000 characters; say the shape you want inside it, e.g. 'answer with JSON only: {...}'
例:
who founded stripegl文字列任意search country, e.g. us
hl文字列任意search language, e.g. en
deep整数任意1 reads pages and writes an answer when the web has none; 0 returns only the web's own direct answer, else answered false
schema文字列任意a JSON Schema object as a JSON string, up to 4,000 bytes; the answer is then JSON of exactly that shape (parse answer.text)
nocache整数任意1 skips every cache
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
curl -X GET 'https://toolswitch.dev/v1/tools/crawl4ai.web.answer?q=who+founded+stripe' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/crawl4ai.web.answer?q=who+founded+stripe",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/crawl4ai.web.answer?q=who+founded+stripe", {
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.00215/success です。サービス料を含みます。