Apinoa Docs

Answer

向 Google AI Mode 提问并获取回答,附带引用、来源、卡片和提及。

查看原始 .mdx
POST /v1/google-ai-mode/answer

以 JSON 请求体发送输入。回答需要数秒,请将超时设为最多 120 秒。

请求

curl -X POST "https://gateway.apinoa.com/v1/google-ai-mode/answer" \
  -H "x-api-key: $APINOA_API_KEY" \
  -H "content-type: application/json" \
  -d '{"prompt": "What are the best running shoes for beginners?"}'

参数

参数类型必填说明
promptstring是The question, as a person would type it.
conversationstringAn earlier answer's conversation.id: ask a follow-up in the same conversation.
countrystringThe market the answer is asked from, as an ISO 3166 country code. Each engine's page lists its countries.
includeenum listpage: also return the answer as a self-contained HTML page, in page.
languagestringThe language to answer in, as a language tag (en, ko-KR).

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

在 data 中返回 Answer。 真实响应的节选:数组只保留前几项,长文本已截断。

{
  "success": true,
  "data": {
    "engine": "google-ai-mode",
    "prompt": "What are the best running shoes for beginners?",
    "askedAt": "2026-10-30T01:03:14.053Z",
    "country": "US",
    "outcome": "answered",
    "title": "Best Running Shoes for Beginners",
    "blocks": [
      {
        "type": "paragraph",
        "markdown": "Choosing the right running shoes as a beginner comes down to finding a protective, comfortable **daily trainer** that offers a balanced mix of stability and sho…"
      },
      {"type": "heading", "level": 3, "markdown": "Top Running Shoes for Beginners"},
      {"type": "cards", "cards": [0]}
    ],
    "text": "Choosing the right running shoes as a beginner comes down to finding a protective, comfortable daily trainer that offers a balanced mix of stability and shock a…",
    "markdown": "Choosing the right running shoes as a beginner comes down to finding a protective, comfortable **daily trainer** that offers a balanced mix of stability and sho…",
    "citations": [{"start": 171, "end": 282, "sources": [0, 1]}, {"start": 317, "end": 408, "sources": [3]}],
    "sources": [
      {
        "url": "https://www.reddit.com/r/AskRunningShoeGeeks/comments/1ngm9bj/advice_on_daily_runners_for_beginner_should_i/",
        "title": "Advice on daily runners for beginner - should i listen less to you guys?",
        "site": "Reddit",
        "favicon": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://www.reddit.com&client=AIM&size=128&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
        "snippet": "The Saucony Triumph is frequently suggested as a suitable cushioned daily trainer for beginners, with having less cushion than the...",
        "cited": true,
        "ext": {"origin": "https://www.reddit.com"}
      },
      {
        "url": "https://www.google.com/search?q=product&prds=pvt:hg,pvo:29,productid:5825792439568125735,catalogid:10929777223096081606,gpcid:5310959131376330242,mid:5764628895…",
        "title": "ASICS Men's Gel-Nimbus 28",
        "site": "Google",
        "favicon": "https://encrypted-tbn1.gstatic.com/faviconV2?url=https://www.google.com&client=AIM&size=128&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
        "snippet": "The Gel-Nimbus 28 is a refined max-cushion daily neutral shoe. It's 7% lighter than the Nimbus 27, with a 43.5 / 35.5 mm stack. Th...",
        "cited": true,
        "ext": {"origin": "https://www.google.com"}
      }
    ],
    "cards": [
      {
        "type": "product",
        "title": "ASICS Men's Novablast 6",
        "url": "https://www.google.com/search?ibp=oshop&prds=pvt:a,pvo:29,mid:576462896392334029,imageDocid:13241215194731966452,gpcid:5626042281368975415,headlineOfferDocid:24…",
        "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABA…",
        "price": {"text": "$155.00", "amount": 155, "currency": "USD"},
        "rating": 4.66,
        "reviews": 1546,
        "merchant": "ASICS",
        "sponsored": false,
        "ext": {
          "productId": "7161459321851462405",
          "catalogId": "8790407336806612921",
          "offerId": "2453831124051266496",
          "merchantId": "576462896392334029",
          "moreMerchants": true,
          "reviewsShown": "1.5K",
          "merchantUrl": "http://www.asics.com/us/",
          "delivery": {"from": "2026-11-03", "to": "2026-11-09"}
        }
      },
      {
        "type": "product",
        "title": "Brooks Men's Ghost 18",
        "url": "https://www.google.com/search?ibp=oshop&prds=pvt:a,pvo:29,mid:576462236222818190,imageDocid:7301987987080420790,gpcid:7326703641027475137,headlineOfferDocid:214…",
        "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABA…",
        "price": {"text": "$150.00", "amount": 150, "currency": "USD"},
        "rating": 4.53,
        "reviews": 674,
        "merchant": "Brooks Running",
        "sponsored": false,
        "ext": {
          "productId": "2256397734681246202",
          "catalogId": "12711205400595365682",
          "offerId": "2148487881347949421",
          "merchantId": "576462236222818190",
          "moreMerchants": true,
          "merchantUrl": "https://www.BrooksRunning.com",
          "delivery": {"from": "2026-10-28", "to": "2026-10-30"}
        }
      }
    ],
    "mentions": [
      {"name": "ASICS Novablast 6", "kind": "product", "at": 1767, "card": 4},
      {"name": "Brooks Ghost 18", "kind": "product", "at": 1870, "card": 5}
    ],
    "suggestions": [],
    "conversation": {"id": "c_0nTtfHpv8jl7f55V-cg1Yg", "turn": 1, "expiresAt": "2026-10-30T01:33:16.375Z"}
  }
}

错误

状态代码含义
400INVALID_PARAMS参数缺失、未知、超出范围,或该引擎不接受。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
429MARKETPLACE_SATURATED并发调用过多。请等待 Retry-After 秒后重试。
502UPSTREAM_ERROR引擎返回了无法使用的内容。请退避后重试。
502UPSTREAM_TIMEOUT引擎未能及时回答。请重试。
503SERVICE_UNAVAILABLE临时故障。请退避后重试。

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 $0.0012。标价;单日调用超过 1,000 次后单价下调。

说明

  • 要追问,把回答中的 conversation.id 作为 conversation 传入。
  • language 设置回答的语言。

本页内容