# Danh sách vị trí Youtube cho SERP

**API:** Data API

**Endpoint:** `GET /v1/beta/dataforseo/serp/youtube/locations`

**Tags:** DataForSEO

Các vị trí mà endpoint SERP YouTube chấp nhận, dưới dạng `location_code`, `location_name`, `location_code_parent`, `country_iso_code` và `location_type`. Không gọi từ agent: `location_code` 2840 là Hoa Kỳ, còn các mã khác nằm trong tài liệu của DataForSEO.

### 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.012.
- 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`)

## 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_SerpYoutubeLocationsResponseInfo"
    }
  ]
}
```

### 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_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_SerpYoutubeLocationsResponseInfo

`#/components/schemas/Response36Afe1097B20_SerpYoutubeLocationsResponseInfo`

```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_SerpYoutubeLocationsTaskInfo"
              }
            ]
          },
          "description": "<em>mảng tác vụ</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_SerpYoutubeLocationsResultInfo

`#/components/schemas/Response36Afe1097B20_SerpYoutubeLocationsResultInfo`

```json
{
  "type": "object",
  "properties": {
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>mã vị trí</em>"
    },
    "location_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>tên đầy đủ của vị trí</em>"
    },
    "location_code_parent": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>mã của vị trí cấp trên</em><br>ví dụ:<br>`\"location_code\": 9041134`,<br>`\"location_name\": \"Vienna International Airport,Lower Austria,Austria\"`,<br>`\"location_code_parent\": 20044`<p>trong đó `location_code_parent` tương ứng với:<p>`\"location_code\": 20044`,<br>`\"location_name\": \"Lower Austria,Austria\"`"
    },
    "country_iso_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>mã quốc gia ISO của vị trí</em>"
    },
    "location_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>loại vị trí</em><br>cho biết phân loại địa lý của vị trí<br>ví dụ:<br>`\"location_type\": \"Country\"`, hoặc `\"location_type\": \"State\"`"
    }
  }
}
```

### Response36Afe1097B20_SerpYoutubeLocationsTaskInfo

`#/components/schemas/Response36Afe1097B20_SerpYoutubeLocationsTaskInfo`

```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_SerpYoutubeLocationsResultInfo"
              }
            ]
          },
          "description": "<em>mảng kết quả</em>"
        }
      }
    }
  ]
}
```
