> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Dataforseo Keywords Data Dataforseo Trends Subregion

> This endpoint will provide you with location-specific keyword popularity data from DataForSEO Trends. Includes inputs, outputs, and CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=dataforseo_keywords_data_dataforseo_trends_subregion_interests_live:{"keywords":"{{keywords}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                    | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.keywords`      | `array`   | Yes      |         | keywords required field the maximum number of keywords you can specify: 5 avoid symbols and special characters (e.g., UTF symbols, emojis); specifying non-Latin characters, you’ll get data for the countries where they are used learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article                                                                                                                                                                                                                                  |
| `payload.location_name` | `string`  | No       |         | full name of search engine location optional field if you don't use this field, you will recieve global results if you use this field, you don't need to specify location\_code you can receive the list of available locations of the search engine with their location\_name by making a separate request to [https://api.dataforseo.com/v3/keywords\_data/dataforseo\_trends/locations](https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations) note that the data will be provided for the country the specified location\_name belongs to; example: United Kingdom |
| `payload.location_code` | `integer` | No       |         | search engine location code optional field if you don't use this field, you will recieve global results if you use this field, you don't need to specify location\_name you can receive the list of available locations of the search engines with their location\_code by making a separate request to [https://api.dataforseo.com/v3/keywords\_data/dataforseo\_trends/locations](https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations) note that the data will be provided for the country the specified location\_code belongs to; example: 2840                  |
| `payload.type`          | `string`  | No       |         | dataforseo trends type optional field if you don't specify this field, the web type will be used by default possible values: web , news , ecommerce                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `payload.date_from`     | `string`  | No       |         | starting date of the time range optional field 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"                                                                                                                                                                                                                                                                                             |
| `payload.date_to`       | `string`  | No       |         | ending date of the time range optional field 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"                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `payload.time_range`    | `string`  | No       |         | preset time ranges optional field if you specify date\_from or date\_to parameters, this field will be ignored when setting a task possible values for all type parameters: past\_4\_hours , past\_day , past\_7\_days , past\_30\_days , past\_90\_days , past\_12\_months , past\_5\_years                                                                                                                                                                                                                                                                                             |
| `payload.tag`           | `string`  | No       |         | user-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response                                                                                                                                                                                                                                                                                                                                                             |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "This endpoint will provide you with location-specific keyword popularity data from DataForSEO Trends. You can check keyword trends for Google Search, Google News, and Google Shopping.",
    "properties": {
      "keywords": {
        "type": "array",
        "description": "keywords required field the maximum number of keywords you can specify: 5 avoid symbols and special characters (e.g., UTF symbols, emojis); specifying non-Latin characters, you’ll get data for the countries where they are used learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article",
        "items": {}
      },
      "location_name": {
        "type": "string",
        "description": "full name of search engine location optional field if you don't use this field, you will recieve global results if you use this field, you don't need to specify location_code you can receive the list of available locations of the search engine with their location_name by making a separate request to https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations note that the data will be provided for the country the specified location_name belongs to; example: United Kingdom"
      },
      "location_code": {
        "type": "integer",
        "description": "search engine location code optional field if you don't use this field, you will recieve global results if you use this field, you don't need to specify location_name you can receive the list of available locations of the search engines with their location_code by making a separate request to https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations note that the data will be provided for the country the specified location_code belongs to; example: 2840"
      },
      "type": {
        "type": "string",
        "description": "dataforseo trends type optional field if you don't specify this field, the web type will be used by default possible values: web , news , ecommerce"
      },
      "date_from": {
        "type": "string",
        "description": "starting date of the time range optional field 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": {
        "type": "string",
        "description": "ending date of the time range optional field 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\""
      },
      "time_range": {
        "type": "string",
        "description": "preset time ranges optional field if you specify date_from or date_to parameters, this field will be ignored when setting a task possible values for all type parameters: past_4_hours , past_day , past_7_days , past_30_days , past_90_days , past_12_months , past_5_years"
      },
      "tag": {
        "type": "string",
        "description": "user-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response"
      }
    },
    "required": [
      "keywords"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name                    | Type      | Required | Default | Description                                                                                                                                                                             |
| ----------------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.version`        | `string`  | Yes      |         | the current version of the API                                                                                                                                                          |
| `result.status_code`    | `integer` | Yes      |         | general status code you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions |
| `result.status_message` | `string`  | Yes      |         | general informational message you can find the full list of general informational messages here                                                                                         |
| `result.time`           | `string`  | Yes      |         | execution time, seconds                                                                                                                                                                 |
| `result.tasks_count`    | `integer` | Yes      |         | the number of tasks in the tasks array                                                                                                                                                  |
| `result.tasks_error`    | `integer` | Yes      |         | the number of tasks in the tasks array returned with an error                                                                                                                           |
| `result.tasks`          | `array`   | Yes      |         | array of tasks                                                                                                                                                                          |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Top-level response envelope for dataforseo_keywords_data_dataforseo_trends_subregion_interests_live.",
    "properties": {
      "version": {
        "type": "string",
        "description": "the current version of the API"
      },
      "status_code": {
        "type": "integer",
        "description": "general status code you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions"
      },
      "status_message": {
        "type": "string",
        "description": "general informational message you can find the full list of general informational messages here"
      },
      "time": {
        "type": "string",
        "description": "execution time, seconds"
      },
      "tasks_count": {
        "type": "integer",
        "description": "the number of tasks in the tasks array"
      },
      "tasks_error": {
        "type": "integer",
        "description": "the number of tasks in the tasks array returned with an error"
      },
      "tasks": {
        "type": "array",
        "description": "array of tasks",
        "items": {}
      }
    },
    "required": [
      "version",
      "status_code",
      "status_message",
      "time",
      "tasks_count",
      "tasks_error",
      "tasks"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute dataforseo_keywords_data_dataforseo_trends_subregion_interests_live --payload '{
  "keywords": "array"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.01` per pricing unit.
* Billing mode: `post_deduct`.
