Something went wrong!
Hang in there while we get back on track
Meta Ads Campaign Manager
Create, analyze, and optimize Meta (Facebook/Instagram) advertising campaigns through the Marketing API
Requires Claude Code CLI
This skill integrates with Meta Marketing API through Claude Code. Install Claude Code and add this skill to use it.
Available Actions
Create Campaign
Create a new advertising campaign with specified objective and settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Campaign name |
| objective | string | Required | Campaign objective |
| status | string | Optional | Initial campaign status |
| special_ad_categories | string[] | Optional | Special ad categories if applicable |
Returns
object Created campaign with ID
Try saying...
- "Create a new sales campaign called 'Holiday Promotion'"
- "Set up a lead generation campaign"
- "Create awareness campaign for brand launch"
Create Ad Set
Create an ad set with targeting, budget, and schedule
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Ad set name |
| campaign_id | string | Required | Parent campaign ID |
| daily_budget | integer | Required | Daily budget in cents (5000 = $50) |
| targeting | object | Required | Targeting specification (geo, demographics, interests) |
| optimization_goal | string | Required | What to optimize for |
| bid_strategy | string | Optional | Bidding strategy |
Returns
object Created ad set with ID
Try saying...
- "Create ad set targeting US adults aged 25-54 with $50 daily budget"
- "Set up targeting for women in California interested in fitness"
- "Create ad set with cost cap bidding"
Create Ad
Create an ad with creative content
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Ad name |
| adset_id | string | Required | Parent ad set ID |
| creative_id | string | Required | Ad creative ID |
| status | string | Optional | Initial ad status |
Returns
object Created ad with ID
Try saying...
- "Create an ad using creative ID 123456"
- "Add a new ad to ad set with existing creative"
Get Campaign Insights
Retrieve performance metrics for campaigns
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| campaign_id | string | Required | Campaign ID to analyze |
| date_preset | string | Optional | Predefined date range |
| fields | string[] | Optional | Metrics to retrieve |
| breakdowns | string[] | Optional | Breakdown dimensions |
Returns
object Performance metrics
Try saying...
- "Show me performance for campaign 123456 last 30 days"
- "Get insights broken down by age and gender"
- "What's the ROAS for my summer campaign?"
Get Account Insights
Retrieve aggregated performance metrics across all campaigns
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| level | string | Optional | Aggregation level |
| date_preset | string | Optional | Predefined date range |
| fields | string[] | Optional | Metrics to retrieve |
Returns
object Account-level performance metrics
Try saying...
- "Show all campaign performance for my ad account"
- "Get ad-level insights across all campaigns"
- "What's my total spend this month?"
Update Campaign Status
Activate or pause campaigns, ad sets, or ads
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| object_id | string | Required | Campaign, ad set, or ad ID to update |
| status | string | Required | New status |
Returns
object Update success confirmation
Try saying...
- "Pause campaign 123456"
- "Activate all ads in ad set"
- "Archive old campaigns"
Update Budget
Modify campaign or ad set budget
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| object_id | string | Required | Campaign or ad set ID |
| daily_budget | integer | Optional | New daily budget in cents |
| lifetime_budget | integer | Optional | New lifetime budget in cents |
Returns
object Update success confirmation
Try saying...
- "Increase daily budget to $100 for ad set 123"
- "Set lifetime budget of $5000 for campaign"
- "Scale budget by 25%"
Create Automated Rule
Set up automated optimization rules
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Rule name |
| execution_type | string | Required | Action to take when triggered |
| trigger_field | string | Required | Metric to monitor |
| trigger_value | integer | Required | Threshold value (in cents for costs) |
| operator | string | Required | Comparison operator |
Returns
object Created rule with ID
Try saying...
- "Create rule to pause ads when CPA exceeds $50"
- "Set up alert when CTR drops below 1%"
- "Auto-increase budget when ROAS is above 3x"
List Campaigns
Get all campaigns in the ad account
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| status | string[] | Optional | Filter by status |
| fields | string[] | Optional | Fields to return |
Returns
array List of campaigns
Try saying...
- "List all active campaigns"
- "Show me paused campaigns"
- "Get all campaigns with their budgets"
Upload Image
Upload an image for ad creative
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| file_path | string | Required | Path to image file (JPG/PNG) |
Returns
object Image hash for use in creatives
Try saying...
- "Upload product image for ad"
- "Add new creative image"
Getting Started
- 1 Go to Meta for Developers (developers.facebook.com)
- 2 Create a new app with Business type
- 3 Add Marketing API product to your app
- 4 Go to Graph API Explorer to generate access token
- 5 Select your app and grant ads_management, ads_read, business_management permissions
- 6 Generate Long-Lived Token for 60-day validity
- 7 Add credentials to shell config: export META_ACCESS_TOKEN="YOUR_TOKEN"
- 8 Add ad account ID: export META_AD_ACCOUNT_ID="act_XXXXXXXXX"
- 9 Restart terminal or run: source ~/.zshrc
Verify Setup
curl -s "https://graph.facebook.com/v21.0/me?access_token=$META_ACCESS_TOKEN" | grep -q 'id' && echo 'Auth successful' || echo 'Auth failed'
Success: Auth successful
Security & Access
Access Scope
Full read/write access to Meta Ads account including campaign management, budget control, and performance data
- Access tokens grant full control over your ad spend - store securely
- Never commit tokens to version control
- Use System User tokens for production (they don't expire)
- Rotate user access tokens before 60-day expiry
- Review and audit automated rules regularly
- Budget changes take effect immediately - double-check values
Limitations
- Historical insight data limited to 37 months
- Age/gender breakdowns limited to past 13 months (as of June 2025)
- Campaign Budget Optimization may override ad set budgets
- Learning phase requires 50+ conversion events (typically 7 days)
- Creative cannot be modified once created - must create new
- Some features require completed App Review
Get This Skill
Requires Pro subscription ($9/month)
Quick Reference
- Type
- REST API
- Auth
- OAuth 2.0
- Setup
- Advanced Setup
- Tools Required
- Bash Read Write
- CLI Dependencies
- curl jq
- Python Dependencies
- facebook-business
Documentation
Have Feedback?
Help us improve this skill by sharing your ideas and suggestions.
Request Improvements