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

# Get Keyword Insights

> Returns X post volume for a set of keywords plus 30 related keyword suggestions, for planning keyword targeting

Returns X post volume for a set of keywords plus 30 related keyword suggestions, for planning keyword targeting. Maximum window is 7 days. Note that X's keyword insights service often responds with a temporary server error; retry later when that happens.

|                      |                              |
| -------------------- | ---------------------------- |
| **App**              | X Ads                        |
| **Operation ID**     | `x_ads_get_keyword_insights` |
| **Type**             | Action                       |
| **Connection**       | `x_ads` (required)           |
| **Credits per run**  | 1                            |
| **Agent / MCP tool** | Yes                          |

## Inputs

| Field               | Type                       | Required | Default                                            | Description                                                                                                                                    |
| ------------------- | -------------------------- | -------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `keywords`          | string or array of string  | Yes      | -                                                  | Keywords to look up post volume for (list or comma-separated). All keywords are OR'ed together. X also returns 30 related keyword suggestions. |
| `granularity`       | enum (`DAY`, `HOUR`)       | No       | `DAY`                                              | Data point granularity: DAY (default) or HOUR.                                                                                                 |
| `time_range`        | string or SelectableOption | No       | `{'value': 'last_7_days', 'label': 'Last 7 days'}` | Period to measure: 'last\_7\_days' (default, X's maximum window), 'last\_3\_days', 'today', or 'yesterday'.                                    |
| `negative_keywords` | string or array of string  | No       | -                                                  | Keywords to exclude from the search (list or comma-separated).                                                                                 |
| `location`          | string                     | No       | -                                                  | A location targeting value from x\_ads\_search\_targeting (LOCATION) to scope results to one country.                                          |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns keyword volume data points and related keyword suggestions.

**Fields**: dynamic (depend on the inputs)
