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

# Add Keywords To Ad Group

> Add keywords (with match type, status, and optional bid) to a Microsoft Ads ad group

Add keywords (with match type, status, and optional bid) to a Microsoft Ads ad group.

|                       |                                          |
| --------------------- | ---------------------------------------- |
| **App**               | Microsoft Ads                            |
| **Operation ID**      | `microsoft_ads_add_keywords_to_ad_group` |
| **Type**              | Action                                   |
| **Connection**        | `microsoft_ads` (required)               |
| **Credits per run**   | 1                                        |
| **Agent / MCP tool**  | Yes                                      |
| **Requires approval** | Yes (write operation)                    |

## Inputs

| Field             | Type                                                                      | Required | Default | Description                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`         | object or array of object or MicrosoftAdsAccountItem or string or integer | Yes      | -       | Select the Microsoft Ads account that owns the ad group.                                                                                            |
| `update_type`     | string or SelectableOption                                                | Yes      | -       | Choose whether to add a single keyword or multiple keywords at once. Options: 'single' or 'bulk'.                                                   |
| `ad_group_id`     | string or SelectItem                                                      | No       | -       | Enter the ad group ID to add the keyword to. Required for single add.                                                                               |
| `keyword`         | string                                                                    | No       | -       | The keyword text to add. Required for single add.                                                                                                   |
| `match_type`      | string or SelectableOption                                                | No       | -       | Keyword match type. Options: Broad, Phrase, or Exact. Required for single add.                                                                      |
| `status`          | string or SelectableOption                                                | No       | -       | Initial keyword status. Options: Active or Paused. Required for single add.                                                                         |
| `bid`             | number or string                                                          | No       | -       | Optional max CPC bid for the keyword in the account currency. If omitted, the keyword uses the ad group default bid.                                |
| `structured_data` | array (also accepts a comma-separated string)                             | No       | -       | Structured data for bulk add. Required columns: 'ad\_group\_id', 'keyword', 'match\_type', 'status'. Optional column: 'bid'. Required for bulk add. |

### MicrosoftAdsAccountItem

| Field        | Type   | Required | Default | Description                                                                                                     |
| ------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `value`      | string | Yes      | -       |                                                                                                                 |
| `label`      | string | Yes      | -       |                                                                                                                 |
| `customerId` | string | No       | -       | The Microsoft Ads customer ID used for REST CustomerId headers. If omitted, it is resolved from the account ID. |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

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

## Output

**Type**: `Dict`

Returns Microsoft Ads added keyword results including created keyword IDs.

**Fields**: `message`, `created_count`, `results`
