# Tạo tác vụ ‘Bing Ads Audience Estimation’ trực tiếp

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/keywords_data/bing/audience_estimation/live`

**Tags:** DataForSEO

Ước tính đối tượng Bing Ads có thể tiếp cận với `bid` và `daily_budget` cho trước, thu hẹp theo `location_code`, `age`, ngành và chức năng công việc. Được bọc trong phong bì của DataForSEO: dữ liệu ở `tasks[0].result`, kết quả ở `tasks[0].status_code` - yêu cầu bị từ chối vẫn trả về HTTP 200. Giá trị ngành và chức năng công việc đến từ `get_dataforseo_keywords_bing_audience_industries` và `get_dataforseo_keywords_bing_audience_job_functions` - cả hai đều miễn phí và đều nên đọc trước khi soạn yêu cầu. Cặp endpoint gửi và truy xuất của endpoint này thực hiện cùng công việc một cách bất đồng bộ, với cùng mức giá, cho những lô quá lớn không thể chờ.

### Tham chiếu giá

- Đo lường: Chi phí phản hồi được báo cáo.
- Ước tính tham chiếu cho mỗi yêu cầu: USD 0.09.
- Hệ số khách hàng tham chiếu: 1.0. Không áp dụng lại cho số tiền khách hàng đã quyết toán.

Chỉ là siêu dữ liệu tham chiếu, không phải báo giá cho tài khoản, mức giá được bảo đảm hay hạn mức chi tiêu. Tín dụng tài nguyên không phải tín dụng Felo. Khoản phí cuối cùng tuân theo bản ghi thanh toán của 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: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "location_name": {
            "type": "string",
            "description": "<em>tên đầy đủ của vị trí công cụ tìm kiếm</em><br><strong>trường bắt buộc nếu bạn không chỉ định</strong> <code>location_code</code> hoặc <code>location_coordinate</code><br><strong>nếu bạn dùng trường này, bạn không cần chỉ định <code>location_code</code> hoặc <code>location_coordinate</code></strong><br>bạn có thể nhận danh sách vị trí khả dụng của công cụ tìm kiếm cùng <code>location_name</code> của chúng bằng cách gửi một yêu cầu riêng đến <code>https://api.dataforseo.com/v3/keywords_data/bing/locations</code><br>ví dụ:<br><code class=\"long-string\">London,England,United Kingdom</code>"
          },
          "location_code": {
            "type": "integer",
            "description": "<em>mã vị trí của công cụ tìm kiếm</em><br><strong>trường bắt buộc nếu bạn không chỉ định</strong> <code>location_name</code> hoặc <code>location_coordinate</code><br><strong>nếu bạn dùng trường này, bạn không cần chỉ định <code>location_name</code> hoặc <code>location_coordinate</code></strong><br>bạn có thể nhận danh sách vị trí khả dụng của công cụ tìm kiếm cùng <code>location_code</code> của chúng bằng cách gửi một yêu cầu riêng đến <code>https://api.dataforseo.com/v3/keywords_data/bing/locations</code><br>ví dụ:<br><code class=\"long-string\">2840</code>"
          },
          "location_coordinate": {
            "type": "string",
            "description": "<em>tọa độ GPS của một vị trí</em><br><strong>trường bắt buộc nếu bạn không chỉ định</strong> <code>location_name</code> hoặc <code>location_code</code><br><strong>nếu bạn dùng trường này, bạn không cần chỉ định <code>location_name</code> hoặc <code>location_code</code></strong><br>tham số <code>location_coordinate</code> phải được chỉ định ở định dạng <em>\"latitude,longitude,radius (tính bằng km)\"</em><br><strong>dữ liệu sẽ được cung cấp cho quốc gia mà tọa độ đã chỉ định thuộc về</strong><br>ví dụ:<br><code class=\"long-string\">29.6821525,-82.4098881,100</code>"
          },
          "age": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>lựa chọn độ tuổi để nhắm mục tiêu</em><br>giá trị khả dụng: <code>eighteen_to_twenty_four</code>, <code>fifty_to_sixty_four</code>, <code>sixty_five_and_above</code>, <code>thirteen_to_seventeen</code>, <code>thirty_five_to_forty_nine</code>, <code>twenty_five_to_thirty_four</code>, <code>unknown</code>, <code>zero_to_twelve</code>"
          },
          "bid": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>giá trị đặt giá thầu mong muốn tính bằng USD</em><br>giá trị tối đa: 1000"
          },
          "daily_budget": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>giá trị ngân sách chiến dịch hàng ngày tính bằng USD</em><br>giá trị tối đa: 10000"
          },
          "gender": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>giới tính để nhắm mục tiêu</em><br>giá trị khả dụng: <code>male</code>, <code>female</code>, <code>unknown</code>"
          },
          "industry": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>ngành của hồ sơ LinkedIn dùng để nhắm mục tiêu</em><p>nếu bạn dùng trường này, bạn có thể nhận danh sách tên ngành khả dụng cùng industry_id bằng cách gửi một yêu cầu riêng đến https://api.dataforseo.com/v3/keywords_data/bing/audience_estimation/industries<p>ví dụ: <code>806301758</code>"
          },
          "job_function": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>chức năng công việc của hồ sơ LinkedIn dùng để nhắm mục tiêu</em><p>nếu bạn dùng trường này, bạn có thể nhận danh sách tên chức năng công việc khả dụng cùng job_function_id bằng cách gửi một yêu cầu riêng đến https://api.dataforseo.com/v3/keywords_data/bing/audience_estimation/job_functions<p>ví dụ: <code>806300451</code>"
          }
        },
        "example": [
          {
            "location_coordinate": "29.6821525,-82.4098881,100",
            "age": [
              "twenty_five_to_thirty_four",
              "eighteen_to_twenty_four",
              "unknown"
            ],
            "bid": 1,
            "daily_budget": 24,
            "gender": [
              "male"
            ],
            "industry": [
              "806303407",
              "806301758"
            ],
            "job_function": [
              "806298607"
            ]
          }
        ]
      }
    ]
  },
  "example": [
    {
      "location_coordinate": "29.6821525,-82.4098881,100",
      "age": [
        "twenty_five_to_thirty_four",
        "eighteen_to_twenty_four",
        "unknown"
      ],
      "bid": 1,
      "daily_budget": 24,
      "gender": [
        "male"
      ],
      "industry": [
        "806303407",
        "806301758"
      ],
      "job_function": [
        "806298607"
      ]
    }
  ]
}
```

## Responses

### 200 — Thao tác thành công

Headers:
- `X-Request-Id` (string) — Mã định danh yêu cầu cần bao gồm khi liên hệ bộ phận hỗ trợ Felo.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveResponseInfo"
    }
  ]
}
```

### 400 — Không thể xử lý yêu cầu. Hãy kiểm tra các tham số yêu cầu.

### 401 — Cần có khóa API Felo hợp lệ.

### 402 — Không thể tiếp tục yêu cầu vì chưa đáp ứng yêu cầu thanh toán.

### 403 — Tài khoản không được phép thực hiện thao tác này.

### 429 — Đã đạt giới hạn yêu cầu hoặc giới hạn chi tiêu.

### 502 — Dịch vụ không thể hoàn tất yêu cầu.

### 503 — API hoặc dịch vụ thanh toán tạm thời không khả dụng.

### 504 — Dịch vụ đã hết thời gian chờ khi xử lý yêu cầu.

### default — Phản hồi lỗi; phản hồi chuyển tiếp từ thượng nguồn có thể dùng định dạng của nhà cung cấp

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_AudienceEstimationInfo

`#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo`

```json
{
  "type": "object",
  "properties": {
    "high": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>cho biết giới hạn trên của kết quả khoảng</em>",
      "format": "double"
    },
    "low": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>cho biết giới hạn dưới của kết quả khoảng</em>",
      "format": "double"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "phiên bản hiện tại của API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "mã trạng thái chung; bạn có thể tìm danh sách đầy đủ các mã phản hồi tại đây"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "thông điệp thông tin chung; bạn có thể tìm danh sách đầy đủ các thông điệp thông tin chung tại đây"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "tổng thời gian thực thi, giây"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "tổng chi phí tác vụ, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "số lượng tác vụ trong mảng tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "số lượng tác vụ trong mảng tasks được trả về kèm lỗi",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "mã định danh tác vụ; mã định danh tác vụ duy nhất trong hệ thống của chúng tôi ở định dạng UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "mã trạng thái của tác vụ do DataForSEO tạo; có thể nằm trong khoảng sau: 10000-60000; bạn có thể tìm danh sách đầy đủ các mã phản hồi tại đây"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "thông điệp thông tin của tác vụ; bạn có thể tìm danh sách đầy đủ các thông điệp thông tin chung tại đây"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "thời gian thực thi, giây"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "tổng chi phí tác vụ, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "số phần tử trong mảng kết quả",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "Đường dẫn URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "chứa các tham số giống như bạn đã chỉ định trong yêu cầu POST"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveTaskInfo"
              }
            ]
          },
          "description": "<em>mảng tác vụ</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveResultInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "est_impressions": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo"
        }
      ],
      "description": "<em>khoảng lượt hiển thị ước tính hàng tháng</em>"
    },
    "est_audience_size": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo"
        }
      ],
      "description": "<em>khoảng số người dùng tiếp cận ước tính hàng tháng</em>"
    },
    "est_clicks": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo"
        }
      ],
      "description": "<em>khoảng số lần nhấp ước tính hàng tháng</em>"
    },
    "est_spend": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo"
        }
      ],
      "description": "<em>khoảng chi tiêu ước tính hàng tháng</em>"
    },
    "est_cost_per_event": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo"
        }
      ],
      "description": "<em>cho biết chi phí ước tính mỗi sự kiện dưới dạng khoảng giá trị</em>"
    },
    "est_ctr": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_AudienceEstimationInfo"
        }
      ],
      "description": "<em>khoảng tỷ lệ nhấp ước tính</em>"
    },
    "suggested_bid": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>giá thầu đề xuất theo nhắm mục tiêu hiện tại</em>"
    },
    "suggested_budget": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>ngân sách hàng ngày đề xuất theo nhắm mục tiêu và giá thầu hiện tại</em>",
      "format": "double"
    },
    "events_lost_to_bid": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>cho biết số sự kiện bị mất do giá thầu đầu vào không đủ</em>",
      "format": "int64"
    },
    "events_lost_to_budget": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>cho biết số sự kiện bị mất do ngân sách đầu vào không đủ</em>"
    },
    "est_reach_audience_size": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>số người dùng ước tính hàng tháng</em>",
      "format": "int64"
    },
    "est_reach_impressions": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>số lượt hiển thị ước tính hàng tháng</em>",
      "format": "int64"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>tên tiền tệ</em><p>ví dụ: <code>USDollar</code>"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataBingAudienceEstimationLiveResultInfo"
              }
            ]
          },
          "description": "<em>mảng kết quả</em>"
        }
      }
    }
  ]
}
```
