# Mencipta Tugas ‘DataForSEO Trends Demography’ Langsung

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/keywords_data/dataforseo_trends/demography/live`

**Tags:** DataForSEO

Audiens Google Trends di sebalik sesuatu kata kunci: pecahan umur dan jantina pada tetingkap yang sama yang digunakan `post_dataforseo_keywords_trends_explore_live`, dengan argumen `type` dan tarikh yang sama. Dibungkus dalam sampul DataForSEO: data dalam `tasks[0].result`, hasil dalam `tasks[0].status_code` - permintaan yang ditolak tetap memulangkan HTTP 200. Murah seperti kembarannya. Untuk di mana dan bukan siapa, gunakan `post_dataforseo_keywords_trends_subregion_interests_live`.

### Rujukan harga

- Pemeteran: Kos respons yang dilaporkan.
- Anggaran rujukan setiap permintaan: USD 0.0024.
- Pengganda pelanggan rujukan: 1.0. Jangan gunakan semula pada amaun pelanggan yang telah diselesaikan.

Metadata rujukan sahaja, bukan sebut harga akaun, harga terjamin atau had perbelanjaan. Kredit sumber bukan kredit Felo. Caj akhir mengikut rekod pengebilan Felo.

## Related links

- [artikel Pusat Bantuan ini](<https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis>)

## 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": {
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "<em>kata kunci</em><br><strong>medan wajib</strong><br>bilangan maksimum kata kunci yang boleh anda tentukan: 5<br>elakkan simbol dan aksara khas (contohnya: simbol UTF, emoji);<br>jika anda menentukan aksara bukan Latin, anda akan menerima data untuk negara yang menggunakannya<p>ketahui lebih lanjut tentang peraturan dan had medan <code>keyword</code> dan <code>keywords</code> dalam API DataForSEO dalam artikel Pusat Bantuan ini"
          },
          "location_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>nama penuh lokasi enjin carian</em><br>medan pilihan<br>jika anda tidak menggunakan medan ini, anda akan menerima hasil global<br><strong>jika anda menggunakan medan ini, anda tidak perlu menentukan <code>location_code</code></strong><br>anda boleh menerima senarai lokasi enjin carian yang tersedia dengan <code>location_name</code>nya dengan membuat permintaan berasingan ke <code>https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations</code><br><strong>ambil perhatian bahawa data akan diberikan untuk negara tempat <code>location_name</code> yang ditentukan berada;</strong><br>contoh:<br><code class=\"long-string\">United Kingdom</code>"
          },
          "location_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>kod lokasi enjin carian</em><br>medan pilihan<br>jika anda tidak menggunakan medan ini, anda akan menerima hasil global<br><strong>jika anda menggunakan medan ini, anda tidak perlu menentukan <code>location_name</code></strong><br>anda boleh menerima senarai lokasi enjin carian yang tersedia dengan <code>location_code</code>nya dengan membuat permintaan berasingan ke <code>https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations</code><br><strong>ambil perhatian bahawa data akan diberikan untuk negara tempat <code>location_code</code> yang ditentukan berada;</strong><br>contoh:<br><code class=\"long-string\">2840</code>"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "jenis elemen"
          },
          "date_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>tarikh mula julat masa</em><br>medan pilihan<br>jika anda tidak menetapkan medan ini, hari dan bulan semasa pada tahun sebelumnya akan digunakan secara lalai<br>nilai minimum untuk jenis <code>web</code>: <code>2004-01-01</code><br>nilai minimum untuk jenis lain: <code>2008-01-01</code><br>format tarikh: <code>\"yyyy-mm-dd\"</code><br>contoh:<br><code>\"2019-01-15\"</code>"
          },
          "date_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>tarikh tamat julat masa</em><br>medan pilihan<br>jika anda tidak menetapkan medan ini, tarikh hari ini akan digunakan secara lalai<br>format tarikh: <code>\"yyyy-mm-dd\"</code><br>contoh:<br><code>\"2019-01-15\"</code>"
          },
          "time_range": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>julat masa pratetap</em><br>medan pilihan<br>jika anda menentukan parameter <code>date_from</code> atau <code>date_to</code>, medan ini akan diabaikan semasa menetapkan tugas<br><em>nilai yang mungkin untuk semua parameter <code>type</code>:</em><br><code>past_4_hours</code>, <code>past_day</code>, <code>past_7_days</code>, <code>past_30_days</code>, <code>past_90_days</code>, <code>past_12_months</code>, <code>past_5_years</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>pengecam tugas yang ditentukan pengguna</em><br>medan pilihan<br><em>had aksara ialah 255</em><br>anda boleh menggunakan parameter ini untuk mengenal pasti tugas dan memadankannya dengan hasil<br>anda akan menemui nilai <code>tag</code> yang ditentukan dalam objek <code>data</code> respons"
          }
        },
        "example": [
          {
            "keywords": [
              "rugby",
              "cricket"
            ],
            "date_from": "2023-01-01",
            "date_to": "2024-01-01",
            "type": "web",
            "location_name": "United States"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "keywords": [
        "rugby",
        "cricket"
      ],
      "date_from": "2023-01-01",
      "date_to": "2024-01-01",
      "type": "web",
      "location_name": "United States"
    }
  ]
}
```

## Responses

### 200 — Operasi berjaya

Headers:
- `X-Request-Id` (string) — Pengecam permintaan untuk disertakan semasa menghubungi sokongan Felo.

**application/json**

Schema: object | null

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

### 400 — Permintaan tidak dapat diproses. Semak parameter permintaan.

### 401 — Kunci API Felo yang sah diperlukan.

### 402 — Permintaan tidak dapat diteruskan kerana keperluan pengebilan tidak dipenuhi.

### 403 — Akaun tidak dibenarkan melakukan operasi ini.

### 429 — Had permintaan atau had perbelanjaan telah dicapai.

### 502 — Perkhidmatan tidak dapat menyelesaikan permintaan.

### 503 — API atau perkhidmatan pengebilan tidak tersedia buat sementara waktu.

### 504 — Perkhidmatan tamat masa semasa memproses permintaan.

### default — Respons ralat; respons passthrough huluan mungkin menggunakan format penyedia

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseKeywordDataDataforseoTrendsItem

`#/components/schemas/Response36Afe1097B20_BaseKeywordDataDataforseoTrendsItem`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "jenis elemen"
    },
    "position": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>penjajaran elemen</em><br>boleh mengambil nilai berikut: <code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, dsb."
    },
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>kata kunci dalam array POST</em>"
    }
  },
  "additionalProperties": false,
  "discriminator": {
    "propertyName": "type",
    "mapping": {
      "dataforseo_trends_graph": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataforseoTrendsGraphElementItem",
      "subregion_interests": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsSubregionInterestsElementItem",
      "demography": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDemographyElementItem"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "versi semasa API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "kod status umum; anda boleh menemui senarai penuh kod respons di sini"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "mesej maklumat umum; anda boleh menemui senarai penuh mesej maklumat umum di sini"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "jumlah masa pelaksanaan, saat"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "jumlah kos tugas, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "bilangan tugas dalam array tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "bilangan tugas dalam array tasks yang dipulangkan dengan ralat",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "pengecam tugas; pengecam tugas unik dalam sistem kami dalam format UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "kod status tugas yang dijana oleh DataForSEO; boleh berada dalam julat berikut: 10000-60000; anda boleh menemui senarai penuh kod respons di sini"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "mesej maklumat tugas; anda boleh menemui senarai penuh mesej maklumat umum di sini"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "masa pelaksanaan, saat"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "jumlah kos tugas, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "bilangan elemen dalam array hasil",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "Laluan URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "mengandungi parameter yang sama seperti yang anda tentukan dalam permintaan POST"
    }
  }
}
```

### Response36Afe1097B20_DataforseoTrendsDataInfo

`#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataInfo`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>kata kunci berkaitan yang data demografinya disediakan</em>"
    },
    "values": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DemographyItemValueInfo"
          }
        ]
      },
      "description": "<em>mengandungi julat umur dan nilai populariti kata kunci yang sepadan</em>"
    }
  }
}
```

### Response36Afe1097B20_DataforseoTrendsDemographyElementItem

`#/components/schemas/Response36Afe1097B20_DataforseoTrendsDemographyElementItem`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseKeywordDataDataforseoTrendsItem"
    },
    {
      "type": "object",
      "properties": {
        "demography": {
          "type": [
            "object",
            "null"
          ],
          "oneOf": [
            {
              "$ref": "#/components/schemas/Response36Afe1097B20_Demography"
            }
          ],
          "description": "<em>pecahan demografi data populariti kata kunci bagi setiap istilah yang ditentukan</em><br>mengandungi data populariti kata kunci mengikut umur dan jantina"
        },
        "demography_comparison": {
          "type": [
            "object",
            "null"
          ],
          "oneOf": [
            {
              "$ref": "#/components/schemas/Response36Afe1097B20_DemographyComparisonInfo"
            }
          ],
          "description": "<em>perbandingan data demografi tentang populariti kata kunci bagi parameter yang ditentukan</em><br>mengandungi data populariti kata kunci mengikut umur dan jantina<br>jika anda menentukan satu kata kunci, nilainya akan menjadi <code>null</code>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_Demography

`#/components/schemas/Response36Afe1097B20_Demography`

```json
{
  "type": "object",
  "properties": {
    "age": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataInfo"
          }
        ]
      },
      "description": "<em>taburan populariti kata kunci mengikut umur</em>"
    },
    "gender": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataInfo"
          }
        ]
      },
      "description": "<em>taburan populariti kata kunci mengikut jantina</em>"
    }
  }
}
```

### Response36Afe1097B20_DemographyComparisonInfo

`#/components/schemas/Response36Afe1097B20_DemographyComparisonInfo`

```json
{
  "type": "object",
  "properties": {
    "age": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "description": "jenis elemen"
    },
    "gender": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "description": "jenis elemen"
    }
  }
}
```

### Response36Afe1097B20_DemographyItemValueInfo

`#/components/schemas/Response36Afe1097B20_DemographyItemValueInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "jenis elemen"
    },
    "value": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>kadar populariti kata kunci dalam julat umur yang ditentukan</em><br>dengan <code>value</code> ini anda boleh memahami betapa popularnya sesuatu kata kunci dalam setiap julat umur; <br>pengiraan: kami menentukan nilai populariti tertinggi bagi kata kunci berkaitan merentas semua kumpulan umur, kemudian menyatakan semua nilai lain sebagai peratusan nilai tertinggi itu (100);<br>nilai <code>100</code> ialah populariti tertinggi bagi istilah itu<br>nilai <code>0</code> bermakna data tidak mencukupi untuk istilah ini"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResponseInfo`

```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_KeywordsDataDataforseoTrendsDemographyLiveTaskInfo"
              }
            ]
          },
          "description": "<em>tatasusunan tugas</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResultInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>kata kunci dalam array POST</em>"
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "jenis elemen"
    },
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>kod lokasi dalam array POST</em><br>jika tiada data, nilainya ialah_<code>null</code>n"
    },
    "language_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>kod bahasa dalam array POST</em><br>jika tiada data, nilainya ialah_<code>null</code>n"
    },
    "datetime": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>tarikh dan masa hasil diterima</em><br>dalam format UTC: “yyyy-mm-dd hh-mm-ss +00:00”<br>contoh:<br><code class=\"long-string\">2019-11-15 12:57:46 +00:00</code>"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>bilangan hasil yang dipulangkan dalam tatasusunan <strong><code>items</code></strong></em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDemographyElementItem"
          }
        ]
      },
      "description": "<em>mengandungi populariti kata kunci dan data berkaitan</em>"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveTaskInfo`

```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_KeywordsDataDataforseoTrendsDemographyLiveResultInfo"
              }
            ]
          },
          "description": "<em>tatasusunan hasil</em>"
        }
      }
    }
  ]
}
```
