---
title: "DataForSEO Keywords Data API / /v3/keywords_data/dataforseo_trends/demography/live.ai"
description: "DataForSEO tool dataforseo-keywords-data-dataforseo-trends-demography-live-ai on looot: input fields, $0.09 per call, output shape, and code to run it with curl, JavaScript or Python."
sidebar:
  hidden: true
---

{/* Generated by scripts/generate-api-reference.mjs from data/api-reference.json. Do not edit. */}

This endpoint will provide you with the demographic breakdown (by age and gender) of keyword popularity per each specified term based on DataForSEO Trends data

- **Tool id:** `dataforseo-keywords-data-dataforseo-trends-demography-live-ai`
- **Provider:** [DataForSEO](/providers/dataforseo)
- **Job:** [Live ai keywordsdata dataforseo trends demography](/reference/jobs/keywordsdata-dataforseo-trends-demography-live-ai) (`keywordsdata.dataforseo-trends.demography.live-ai`)
- **Price:** $0.09 per call. A call that fails at the provider costs $0.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `date_from` | string | no | starting date of the time range if you don’t specify this field, the current day and month of the preceding year will be used by default minimal value for the web type: 2004-01-01 minimal value for other types: 2008-01-01 date format: "yyyy-mm-dd" example: "2019-01-15" |
| `date_to` | string | no | ending date of the time range if you don’t specify this field, the today’s date will be used by default date format: "yyyy-mm-dd" example: "2019-01-15" |
| `keywords` | array | yes | keywords the maximum number of keywords you can specify: 5 |
| `location_name` | string | no | full name of the location optional field in format "Country" example: United Kingdom |
| `time_range` | string | no | preset time ranges if you specify date_from or date_to parameters, this field will be ignored when setting a task |
| `type` | string | no | dataforseo trends type |

## Output

The run's `result` holds the provider's answer. Signed in, `looot inspect dataforseo-keywords-data-dataforseo-trends-demography-live-ai` prints its fields.

## Run it

Every call needs your API token in `LOOOT_TOKEN`; [Sign in](/get-started/sign-in#use-the-token-in-scripts-and-agents) shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With `wait: 30` the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll `GET /v1/runs/<runId>`.

Example input with placeholder values:

<CodeGroup>

```bash curl
curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"dataforseo-keywords-data-dataforseo-trends-demography-live-ai","input":{"keywords":[]},"wait":30}'
```

```js JavaScript
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "dataforseo-keywords-data-dataforseo-trends-demography-live-ai",
    input: {
      keywords: [],
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
```

```python Python
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "dataforseo-keywords-data-dataforseo-trends-demography-live-ai",
        "input": {
            "keywords": [],
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))
```

</CodeGroup>

To let looot pick among every provider of this job instead, send `job:keywordsdata.dataforseo-trends.demography.live-ai` as `endpointId`; see [the job page](/reference/jobs/keywordsdata-dataforseo-trends-demography-live-ai).
