|
| 1 | +--- |
| 2 | +title: Meta Ads |
| 3 | +description: Query campaigns, ad sets, ads, and performance insights |
| 4 | +--- |
| 5 | + |
| 6 | +import { BlockInfoCard } from "@/components/ui/block-info-card" |
| 7 | + |
| 8 | +<BlockInfoCard |
| 9 | + type="meta_ads" |
| 10 | + color="#1877F2" |
| 11 | +/> |
| 12 | + |
| 13 | +## Usage Instructions |
| 14 | + |
| 15 | +Connect to Meta Ads to view account info, list campaigns, ad sets, and ads, and get performance insights and metrics. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Tools |
| 20 | + |
| 21 | +### `meta_ads_get_account` |
| 22 | + |
| 23 | +Get information about a Meta Ads account |
| 24 | + |
| 25 | +#### Input |
| 26 | + |
| 27 | +| Parameter | Type | Required | Description | |
| 28 | +| --------- | ---- | -------- | ----------- | |
| 29 | +| `accountId` | string | Yes | Meta Ads account ID \(numeric, without act_ prefix\) | |
| 30 | + |
| 31 | +#### Output |
| 32 | + |
| 33 | +| Parameter | Type | Description | |
| 34 | +| --------- | ---- | ----------- | |
| 35 | +| `id` | string | Ad account ID | |
| 36 | +| `name` | string | Ad account name | |
| 37 | +| `accountStatus` | number | Account status code | |
| 38 | +| `currency` | string | Account currency \(e.g., USD\) | |
| 39 | +| `timezone` | string | Account timezone | |
| 40 | +| `amountSpent` | string | Total amount spent | |
| 41 | +| `spendCap` | string | Spending limit for the account | |
| 42 | +| `businessCountryCode` | string | Country code for the business | |
| 43 | + |
| 44 | +### `meta_ads_list_campaigns` |
| 45 | + |
| 46 | +List campaigns in a Meta Ads account with optional status filtering |
| 47 | + |
| 48 | +#### Input |
| 49 | + |
| 50 | +| Parameter | Type | Required | Description | |
| 51 | +| --------- | ---- | -------- | ----------- | |
| 52 | +| `accountId` | string | Yes | Meta Ads account ID \(numeric, without act_ prefix\) | |
| 53 | +| `status` | string | No | Filter by campaign status \(ACTIVE, PAUSED, ARCHIVED, DELETED\) | |
| 54 | +| `limit` | number | No | Maximum number of campaigns to return | |
| 55 | + |
| 56 | +#### Output |
| 57 | + |
| 58 | +| Parameter | Type | Description | |
| 59 | +| --------- | ---- | ----------- | |
| 60 | +| `campaigns` | array | List of campaigns in the account | |
| 61 | +| ↳ `id` | string | Campaign ID | |
| 62 | +| ↳ `name` | string | Campaign name | |
| 63 | +| ↳ `status` | string | Campaign status \(ACTIVE, PAUSED, etc.\) | |
| 64 | +| ↳ `objective` | string | Campaign objective | |
| 65 | +| ↳ `dailyBudget` | string | Daily budget in account currency cents | |
| 66 | +| ↳ `lifetimeBudget` | string | Lifetime budget in account currency cents | |
| 67 | +| ↳ `createdTime` | string | Campaign creation time \(ISO 8601\) | |
| 68 | +| ↳ `updatedTime` | string | Campaign last update time \(ISO 8601\) | |
| 69 | +| `totalCount` | number | Total number of campaigns returned | |
| 70 | + |
| 71 | +### `meta_ads_list_ad_sets` |
| 72 | + |
| 73 | +List ad sets in a Meta Ads account or campaign |
| 74 | + |
| 75 | +#### Input |
| 76 | + |
| 77 | +| Parameter | Type | Required | Description | |
| 78 | +| --------- | ---- | -------- | ----------- | |
| 79 | +| `accountId` | string | Yes | Meta Ads account ID \(numeric, without act_ prefix\) | |
| 80 | +| `campaignId` | string | No | Filter ad sets by campaign ID | |
| 81 | +| `status` | string | No | Filter by ad set status \(ACTIVE, PAUSED, ARCHIVED, DELETED\) | |
| 82 | +| `limit` | number | No | Maximum number of ad sets to return | |
| 83 | + |
| 84 | +#### Output |
| 85 | + |
| 86 | +| Parameter | Type | Description | |
| 87 | +| --------- | ---- | ----------- | |
| 88 | +| `adSets` | array | List of ad sets | |
| 89 | +| ↳ `id` | string | Ad set ID | |
| 90 | +| ↳ `name` | string | Ad set name | |
| 91 | +| ↳ `status` | string | Ad set status | |
| 92 | +| ↳ `campaignId` | string | Parent campaign ID | |
| 93 | +| ↳ `dailyBudget` | string | Daily budget in account currency cents | |
| 94 | +| ↳ `lifetimeBudget` | string | Lifetime budget in account currency cents | |
| 95 | +| ↳ `startTime` | string | Ad set start time \(ISO 8601\) | |
| 96 | +| ↳ `endTime` | string | Ad set end time \(ISO 8601\) | |
| 97 | +| `totalCount` | number | Total number of ad sets returned | |
| 98 | + |
| 99 | +### `meta_ads_list_ads` |
| 100 | + |
| 101 | +List ads in a Meta Ads account, campaign, or ad set |
| 102 | + |
| 103 | +#### Input |
| 104 | + |
| 105 | +| Parameter | Type | Required | Description | |
| 106 | +| --------- | ---- | -------- | ----------- | |
| 107 | +| `accountId` | string | Yes | Meta Ads account ID \(numeric, without act_ prefix\) | |
| 108 | +| `campaignId` | string | No | Filter ads by campaign ID | |
| 109 | +| `adSetId` | string | No | Filter ads by ad set ID | |
| 110 | +| `status` | string | No | Filter by ad status \(ACTIVE, PAUSED, ARCHIVED, DELETED\) | |
| 111 | +| `limit` | number | No | Maximum number of ads to return | |
| 112 | + |
| 113 | +#### Output |
| 114 | + |
| 115 | +| Parameter | Type | Description | |
| 116 | +| --------- | ---- | ----------- | |
| 117 | +| `ads` | array | List of ads | |
| 118 | +| ↳ `id` | string | Ad ID | |
| 119 | +| ↳ `name` | string | Ad name | |
| 120 | +| ↳ `status` | string | Ad status | |
| 121 | +| ↳ `adSetId` | string | Parent ad set ID | |
| 122 | +| ↳ `campaignId` | string | Parent campaign ID | |
| 123 | +| ↳ `createdTime` | string | Ad creation time \(ISO 8601\) | |
| 124 | +| ↳ `updatedTime` | string | Ad last update time \(ISO 8601\) | |
| 125 | +| `totalCount` | number | Total number of ads returned | |
| 126 | + |
| 127 | +### `meta_ads_get_insights` |
| 128 | + |
| 129 | +Get performance insights and metrics for Meta Ads campaigns, ad sets, or ads |
| 130 | + |
| 131 | +#### Input |
| 132 | + |
| 133 | +| Parameter | Type | Required | Description | |
| 134 | +| --------- | ---- | -------- | ----------- | |
| 135 | +| `accountId` | string | Yes | Meta Ads account ID \(numeric, without act_ prefix\) | |
| 136 | +| `level` | string | Yes | Aggregation level for insights \(account, campaign, adset, ad\) | |
| 137 | +| `campaignId` | string | No | Filter insights by campaign ID | |
| 138 | +| `adSetId` | string | No | Filter insights by ad set ID | |
| 139 | +| `datePreset` | string | No | Predefined date range \(today, yesterday, last_7d, last_14d, last_28d, last_30d, last_90d, this_month, last_month\) | |
| 140 | +| `startDate` | string | No | Custom start date in YYYY-MM-DD format | |
| 141 | +| `endDate` | string | No | Custom end date in YYYY-MM-DD format | |
| 142 | +| `limit` | number | No | Maximum number of insight rows to return | |
| 143 | + |
| 144 | +#### Output |
| 145 | + |
| 146 | +| Parameter | Type | Description | |
| 147 | +| --------- | ---- | ----------- | |
| 148 | +| `insights` | array | Performance insight rows | |
| 149 | +| ↳ `accountId` | string | Ad account ID | |
| 150 | +| ↳ `campaignId` | string | Campaign ID | |
| 151 | +| ↳ `campaignName` | string | Campaign name | |
| 152 | +| ↳ `adSetId` | string | Ad set ID | |
| 153 | +| ↳ `adSetName` | string | Ad set name | |
| 154 | +| ↳ `adId` | string | Ad ID | |
| 155 | +| ↳ `adName` | string | Ad name | |
| 156 | +| ↳ `impressions` | string | Number of impressions | |
| 157 | +| ↳ `clicks` | string | Number of clicks | |
| 158 | +| ↳ `spend` | string | Amount spent in account currency | |
| 159 | +| ↳ `ctr` | string | Click-through rate | |
| 160 | +| ↳ `cpc` | string | Cost per click | |
| 161 | +| ↳ `cpm` | string | Cost per 1,000 impressions | |
| 162 | +| ↳ `reach` | string | Number of unique users reached | |
| 163 | +| ↳ `frequency` | string | Average number of times each person saw the ad | |
| 164 | +| ↳ `conversions` | number | Total conversions from actions | |
| 165 | +| ↳ `dateStart` | string | Start date of the reporting period | |
| 166 | +| ↳ `dateStop` | string | End date of the reporting period | |
| 167 | +| `totalCount` | number | Total number of insight rows returned | |
| 168 | + |
| 169 | + |
0 commit comments