# 查詢 AI 回答引擎，以掌握 GEO/AEO 能見度。

**API:** Data API

**Endpoint:** `POST /v1/beta/oxylabs/ai-search`

**Tags:** Oxylabs

使用 source google_search 或 google_ai_mode 以及文件記載的其他請求欄位，執行同步的 AI 輔助搜尋。此端點不接受 chatgpt、gemini 或 perplexity 作為同步來源。

### 定價參考

- 計量方式：以成功請求為固定成本基礎。
- 參考請求預估：USD 0.00145。
- 參考客戶乘數：1.45。不得再次套用於已結算的客戶金額。

僅供參考的中繼資料，並非帳戶報價、保證價格或消費上限。資源額度並非 Felo 額度。最終費用依 Felo 計費記錄為準。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "type": "object",
  "description": "Google 答案引擎的直通請求主體。`source` 選擇引擎；`query`、`render`、`parse` 與 `geo_location` 是 Google 來源所需的參數。其他上游參數會依原樣透傳。",
  "additionalProperties": true,
  "properties": {
    "source": {
      "type": "string",
      "enum": [
        "google_search",
        "google_ai_mode"
      ],
      "description": "要查詢的 Google AI 答案引擎。`google_search` 傳回 Google AI Overviews；`google_ai_mode` 傳回 Google AI Mode。如需查詢 ChatGPT/Gemini/Perplexity，請改用非同步端點 `post_oxylabs_llm`。",
      "example": "google_search"
    },
    "query": {
      "type": "string",
      "description": "搜尋查詢。`google_search` 與 `google_ai_mode` 為必填。",
      "example": "best noise cancelling headphones 2026"
    },
    "render": {
      "type": "string",
      "enum": [
        "html"
      ],
      "description": "對於 `google_search` 與 `google_ai_mode`，設為 \"html\" 可在解析前先渲染頁面。",
      "example": "html"
    },
    "parse": {
      "type": "boolean",
      "description": "傳回結構化、已解析的結果，而非原始輸出。建議所有來源都啟用。",
      "example": true
    },
    "geo_location": {
      "type": "string",
      "description": "查詢的國家／地區層級地理位置，例如 \"United States\"。",
      "example": "United States"
    }
  },
  "required": [
    "source"
  ]
}
```

Example:

```json
{
  "source": "google_ai_mode",
  "query": "best noise cancelling headphones 2026",
  "parse": true,
  "render": "html",
  "geo_location": "United States"
}
```

## Responses

### 200 — 查詢成功完成。`results[]` 每個查詢保留一筆結果。`content` 內的解析結構因來源而異（參見屬性說明）；下方範例展示 `google_search`（Google AI 總覽）的結構。

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "每個查詢一筆。Realtime 單次查詢只傳回一個結果，該結果即為計費單位。",
      "items": {
        "type": "object",
        "properties": {
          "content": {
            "type": "object",
            "description": "已解析的答案承載內容。結構因 Google 來源而異：\n- `google_search` → `content.results.ai_overviews[]`，包含 `answer_text` 與 `references[]{source, url}`（如下所示）。\n- `google_ai_mode` → `content.citations[]{text, urls[]}`。",
            "properties": {
              "results": {
                "type": "object",
                "description": "Google 類型的已解析結果容器。",
                "properties": {
                  "ai_overviews": {
                    "type": "array",
                    "description": "為此查詢傳回的 Google AI Overviews。",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answer_text": {
                          "type": "array",
                          "description": "AI 產生的答案，拆分為可能帶有行內引用的片段。",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fragments": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "references": {
                                      "type": "array",
                                      "items": {}
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "references": {
                          "type": "array",
                          "description": "此概覽引用的來源。",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```
