> ## 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 Microsoft Ads ad groups

Add keywords with match type, status, and optional bid to Microsoft Ads ad groups. Bulk adds return per-row outcomes and continue after duplicates or other row-level errors. Retry only failed rows; check unknown outcomes before retrying.

| | |
| - | - |
| **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 created\_count, failed\_count, and results with keyword IDs, action (added, failed, or unknown), per-row errors, and original bulk row\_number. An optional top-level error explains interrupted batches; results retain completed batches. Keyword status is the requested Active/Paused status, not the row outcome.

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.