> ## 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.

# Search Targeting

> Searches X Ads targeting values (locations, interests, events, conversation topics, app store categories, network operators, devices, platforms, languages, TV markets and shows) and returns their i...

Searches X Ads targeting values (locations, interests, events, conversation topics, app store categories, network operators, devices, platforms, languages, TV markets and shows) and returns their ids for use in x\_ads\_set\_targeting.

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

## Inputs

| Field               | Type                                                                                                                        | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target_type`       | enum (`LOCATION`, `INTEREST`, `EVENT`, `CONVERSATION`, `APP_STORE_CATEGORY`, `NETWORK_OPERATOR`, `DEVICE`, `PLATFORM`, ...) | Yes      | -       | What to look up. The returned targeting\_value ids go into x\_ads\_set\_targeting: LOCATION (countries/regions/metros/cities/postal codes), INTEREST, EVENT, CONVERSATION (topics), APP\_STORE\_CATEGORY, NETWORK\_OPERATOR, DEVICE, PLATFORM, PLATFORM\_VERSION, LANGUAGE, TV\_MARKET (locales for TV\_SHOW), or TV\_SHOW. IAB\_CATEGORY is the one extra lookup, feeding the categories field the PUBLISHER\_NETWORK placement requires on ad groups. Keywords and follower lookalikes need no lookup: keywords are free text and FOLLOWERS\_OF\_USER / SIMILAR\_TO\_FOLLOWERS\_OF\_USER take user ids (use x\_ads\_get\_targeting\_suggestions to discover either). |
| `query`             | string                                                                                                                      | No       | -       | Keyword to search by. Returns everything available when omitted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `location_type`     | enum (`COUNTRIES`, `REGIONS`, `METROS`, `CITIES`, `POSTAL_CODES`)                                                           | No       | -       | LOCATION only: restrict results to one location granularity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `country_code`      | string                                                                                                                      | No       | -       | ISO alpha-2 country code. LOCATION: scope results to the country; NETWORK\_OPERATOR: which country's carriers (default US); EVENT: comma country codes are accepted via this field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `event_types`       | string or array of string                                                                                                   | No       | -       | EVENT only: event types to include (list or comma-separated): CONFERENCE, HOLIDAY, MUSIC\_AND\_ENTERTAINMENT, OTHER, POLITICS, RECURRING, SPORTS. All types are searched when omitted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `conversation_type` | string                                                                                                                      | No       | -       | CONVERSATION only: restrict to one conversation type, e.g. BRANDS, SPORTS, MUSIC\_GENRES, TV\_SHOWS, POLITICIANS (see X's conversation type list).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `os_type`           | enum (`ANDROID`, `IOS`)                                                                                                     | No       | -       | APP\_STORE\_CATEGORY only: which store, ANDROID or IOS.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `locale`            | string                                                                                                                      | No       | -       | TV\_SHOW only (required): a locale from TV\_MARKET results, e.g. en-US.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `limit`             | integer                                                                                                                     | No       | `100`   | Maximum number of targeting values to return. Default: 100.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## Output

**Type**: `List[Dict]`

Returns matching targeting values with their targeting\_value ids and names.

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