askill
meta-ads

meta-adsSafety 90Repository

Manage Meta/Facebook ad campaigns — create, edit, and check performance.

1 stars
1.2k downloads
Updated 3/2/2026

Package Files

Loading files...
SKILL.md

Meta Ads API

Setup

  • META_ACCESS_TOKEN - Meta access token (User or System User Token)
  • META_AD_ACCOUNT_ID - Ad account ID (numeric, without act_ prefix)

Base URL: https://graph.facebook.com/v25.0/

Important: Ad account IDs must be prefixed with act_ in API calls.


Campaigns

# List
curl "https://graph.facebook.com/v25.0/act_$META_AD_ACCOUNT_ID/campaigns?fields=id,name,status,objective,daily_budget" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN"

# Create
curl -X POST "https://graph.facebook.com/v25.0/act_$META_AD_ACCOUNT_ID/campaigns" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Campaign","objective":"OUTCOME_TRAFFIC","status":"PAUSED","special_ad_categories":[]}'

# Pause
curl -X POST "https://graph.facebook.com/v25.0/{CAMPAIGN_ID}" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status":"PAUSED"}'

Ad Sets

# Create with targeting
curl -X POST "https://graph.facebook.com/v25.0/act_$META_AD_ACCOUNT_ID/adsets" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Ad Set","campaign_id":"{CAMPAIGN_ID}","daily_budget":5000,"billing_event":"IMPRESSIONS","optimization_goal":"LINK_CLICKS","targeting":{"geo_locations":{"countries":["US"]},"age_min":18,"age_max":65},"status":"PAUSED"}'

Note: Budget values are in cents (5000 = $50.00).

Insights (Performance Metrics)

# Account-level (last 30 days)
curl "https://graph.facebook.com/v25.0/act_$META_AD_ACCOUNT_ID/insights?fields=spend,impressions,clicks,reach,cpc,cpm,ctr&date_preset=last_30d" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN"

# Campaign-level with breakdowns
curl "https://graph.facebook.com/v25.0/{CAMPAIGN_ID}/insights?fields=spend,impressions,clicks,actions&breakdowns=age,gender&date_preset=last_7d" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN"

# Custom date range
curl "https://graph.facebook.com/v25.0/act_$META_AD_ACCOUNT_ID/insights?fields=spend,impressions,clicks&time_range={\"since\":\"2026-01-01\",\"until\":\"2026-01-31\"}" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN"

Campaign Objectives

ObjectiveDescription
OUTCOME_AWARENESSBrand awareness and reach
OUTCOME_ENGAGEMENTPost engagement, page likes
OUTCOME_TRAFFICDrive traffic to website/app
OUTCOME_LEADSLead generation
OUTCOME_APP_PROMOTIONApp installs
OUTCOME_SALESConversions and catalog sales

Key Metrics

MetricDescription
spendTotal amount spent
impressionsTimes ads were shown
clicksClicks on ads
reachUnique people who saw ads
cpc / cpm / ctrCost per click / per 1K impressions / click-through rate
actionsConversions broken down by type

Attribution Windows

1d_click, 7d_click (default), 28d_click, 1d_view

Date Presets

today, yesterday, last_7d, last_14d, last_30d, last_90d, this_month, last_month

Breakdowns

age, gender, placement, device_platform, publisher_platform, country

Rate Limits

Call Limit = 60 + (400 x Active Ads) - (0.001 x API Errors)

Minimum 60 calls/hour. Check X-Business-Use-Case-Usage header.

Token Management

System User tokens (recommended, no expiration) via Business Manager. User tokens can be extended to 60-90 days via:

curl "https://graph.facebook.com/v25.0/oauth/access_token?grant_type=fb_exchange_token&client_id={APP_ID}&client_secret={APP_SECRET}&fb_exchange_token={SHORT_LIVED_TOKEN}"

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

83/100Analyzed 3/8/2026

High-quality technical reference for Meta Ads API management. Provides executable curl commands for campaign management, ad sets, and insights retrieval. Well-structured with reference tables for objectives, metrics, and rate limits. Includes practical notes on budget formatting and API prefixes. Missing advanced features but covers core functionality well. Located in proper skills folder with metadata, tags, and homepage link. Public API skill with broad applicability.

90
85
80
75
85

Metadata

Licenseunknown
Version-
Updated3/2/2026
Publisherrustykuntz

Tags

apiobservability