# 設定 Google 活動 SERP 任務

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/serp/google/events/task_post`

**Tags:** DataForSEO

將 Google 針對查詢呈現的活動排入佇列，傳回 `tasks[0].id` 中的任務 `id`。採用 DataForSEO 的信封結構：資料位於 `tasks[0].result`，結果狀態位於 `tasks[0].status_code`——被拒絕的請求仍會回傳 HTTP 200。即時版本會立即回應，單一查詢時更為簡單；當批次會超過一次工具呼叫時，再使用佇列。

### 計費參考

- 計量方式：依回報的回應成本計量。
- 參考請求估算：0.02 美元。
- 參考客戶倍率：1.0。不得對已結算的客戶金額再次套用。

僅供參考的中繼資料，並非帳戶報價、保證價格或消費上限。資源額度並非 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": "array",
  "items": {
    "type": "object",
    "properties": {
      "keyword": {
        "type": "string",
        "description": "要搜尋的關鍵字"
      },
      "location_code": {
        "type": "integer",
        "description": "搜尋引擎地點代碼"
      },
      "location_name": {
        "type": "string",
        "description": "搜尋引擎地點全名"
      },
      "location_coordinate": {
        "type": "string",
        "description": "地點的 GPS 座標"
      },
      "language_code": {
        "type": "string",
        "description": "搜尋引擎語言代碼"
      },
      "language_name": {
        "type": "string",
        "description": "搜尋引擎語言全名"
      },
      "priority": {
        "type": "integer",
        "description": "任務優先順序"
      },
      "postback_url": {
        "type": "string",
        "description": "用於傳送任務結果的 URL"
      },
      "pingback_url": {
        "type": "string",
        "description": "已完成任務的通知 URL"
      },
      "postback_data": {
        "type": "string",
        "description": "Postback 資料類型"
      }
    },
    "required": [
      "keyword"
    ]
  }
}
```

## Responses

### 200 — 成功回應

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

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "description": "API 目前版本"
    },
    "status_code": {
      "type": "integer",
      "description": "一般狀態碼"
    },
    "status_message": {
      "type": "string",
      "description": "一般資訊訊息"
    },
    "time": {
      "type": "string",
      "description": "執行時間（秒）"
    },
    "cost": {
      "type": "number",
      "description": "任務總費用，美元"
    },
    "tasks_count": {
      "type": "integer",
      "description": "tasks 陣列中的任務數量"
    },
    "tasks_error": {
      "type": "integer",
      "description": "tasks 陣列中傳回錯誤的任務數量"
    },
    "tasks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "任務物件陣列"
    },
    "tasks[].id": {
      "type": "string",
      "description": "UUID 格式的任務識別碼"
    },
    "tasks[].status_code": {
      "type": "integer",
      "description": "任務狀態碼"
    },
    "tasks[].status_message": {
      "type": "string",
      "description": "任務狀態訊息"
    },
    "tasks[].cost": {
      "type": "number",
      "description": "任務費用，美元"
    },
    "tasks[].result_count": {
      "type": "integer",
      "description": "結果陣列中的元素數量"
    }
  }
}
```

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```
