Meta Ads Analytics
warning
Analytics endpoints are not available on the Starter plan. Upgrade to Intermediate, Growth or Business plan to access these endpoints.
Meta Ads analytics endpoints provide insights for your connected Meta Ads accounts.
1. GET /api/meta-ads/overview
Returns account-level metrics with current vs. previous period comparison.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/meta-ads/overview?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": {
"metrics": [
{
"key": "impressions",
"name": "Impressions",
"value_current_period": 1250000,
"value_last_period": 1000000,
"percentage_change": "+25.0%",
"description": "Total number of times your ads were displayed"
},
{
"key": "reach",
"name": "Reach",
"value_current_period": 450000,
"value_last_period": 380000,
"percentage_change": "+18.4%",
"description": "Number of unique people who saw your ads"
},
{
"key": "clicks",
"name": "Clicks",
"value_current_period": 25000,
"value_last_period": 21000,
"percentage_change": "+19.0%",
"description": "Total number of clicks on your ads"
},
{
"key": "spend",
"name": "Spend",
"value_current_period": 5250.5,
"value_last_period": 4410,
"percentage_change": "+19.1%",
"description": "Total amount spent on ads"
},
{
"key": "cpc",
"name": "Cost Per Click",
"value_current_period": 0.21,
"value_last_period": 0.21,
"percentage_change": "+0.0%",
"description": "Average cost per click"
},
{
"key": "ctr",
"name": "Click Through Rate",
"value_current_period": 2.0,
"value_last_period": 2.1,
"percentage_change": "-4.8%",
"description": "Percentage of people who clicked after seeing your ad"
}
],
"account_name": "My Business Ad Account"
}
}
Metrics
| Key | Name | Description |
|---|---|---|
impressions | Impressions | Total number of times your ads were displayed |
reach | Reach | Number of unique people who saw your ads |
clicks | Clicks | Total number of clicks on your ads |
spend | Spend | Total amount spent on ads |
cpc | Cost Per Click | Average cost per click |
ctr | Click Through Rate | Percentage of people who clicked after seeing your ad |
2. GET /api/meta-ads/campaigns
Returns analytics for campaigns.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/meta-ads/campaigns?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": {
"stats": [
{
"key": "campaigns",
"name": "Campaigns",
"value_current_period": 12,
"value_last_period": 10,
"percentage_change": "+20.0%",
"description": "Total number of campaigns in this period"
},
{
"key": "impressions",
"name": "Impressions",
"value_current_period": 1250000,
"value_last_period": 1000000,
"percentage_change": "+25.0%",
"description": "Total number of times your ads were displayed"
},
{
"key": "clicks",
"name": "Clicks",
"value_current_period": 25000,
"value_last_period": 21000,
"percentage_change": "+19.0%",
"description": "Total number of clicks on your ads"
},
{
"key": "spend",
"name": "Spend",
"value_current_period": 5250.5,
"value_last_period": 4410,
"percentage_change": "+19.1%",
"description": "Total amount spent on campaigns"
}
],
"campaigns": [
{
"id": "camp_238423842",
"name": "Summer Sale 2025",
"status": "ACTIVE",
"stats": {
"impressions": 104167,
"reach": 37500,
"clicks": 2083,
"spend": 437.54,
"cpc": 0.21,
"ctr": 2.0
}
}
]
}
}
Campaign Stats
| Field | Description |
|---|---|
impressions | Number of impressions |
reach | Number of unique people reached |
clicks | Number of clicks |
spend | Amount spent |
cpc | Cost per click |
ctr | Click through rate |
3. GET /api/meta-ads/ad-sets
Returns analytics for ad sets.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/meta-ads/ad-sets?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": {
"stats": [
{
"key": "ad_sets",
"name": "Ad Sets",
"value_current_period": 25,
"value_last_period": 20,
"percentage_change": "+25.0%",
"description": "Total number of ad sets in this period"
},
{
"key": "impressions",
"name": "Impressions",
"value_current_period": 1250000,
"value_last_period": 1000000,
"percentage_change": "+25.0%",
"description": "Total number of times your ads were displayed"
},
{
"key": "clicks",
"name": "Clicks",
"value_current_period": 25000,
"value_last_period": 21000,
"percentage_change": "+19.0%",
"description": "Total number of clicks on your ads"
},
{
"key": "spend",
"name": "Spend",
"value_current_period": 5250.5,
"value_last_period": 4410,
"percentage_change": "+19.1%",
"description": "Total amount spent on ad sets"
}
],
"ad_sets": [
{
"id": "adset_238423842384",
"name": "US - Interest - 18-34",
"campaign_id": "camp_238423842",
"campaign_name": "Summer Sale 2025",
"status": "ACTIVE",
"stats": {
"impressions": 50000,
"reach": 18000,
"clicks": 1000,
"spend": 210.02,
"cpc": 0.21,
"ctr": 2.0
}
}
]
}
}
Ad Set Stats
| Field | Description |
|---|---|
impressions | Number of impressions |
reach | Number of unique people reached |
clicks | Number of clicks |
spend | Amount spent |
cpc | Cost per click |
ctr | Click through rate |
4. GET /api/meta-ads/ads
Returns analytics for individual ads.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/meta-ads/ads?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": {
"stats": [
{
"key": "ads",
"name": "Ads",
"value_current_period": 40,
"value_last_period": 32,
"percentage_change": "+25.0%",
"description": "Total number of ads in this period"
},
{
"key": "impressions",
"name": "Impressions",
"value_current_period": 1250000,
"value_last_period": 1000000,
"percentage_change": "+25.0%",
"description": "Total number of times your ads were displayed"
},
{
"key": "clicks",
"name": "Clicks",
"value_current_period": 25000,
"value_last_period": 21000,
"percentage_change": "+19.0%",
"description": "Total number of clicks on your ads"
},
{
"key": "spend",
"name": "Spend",
"value_current_period": 5250.5,
"value_last_period": 4410,
"percentage_change": "+19.1%",
"description": "Total amount spent on ads"
}
],
"ads": [
{
"id": "ad_23842384238423",
"name": "Summer Sale - Video Ad 1",
"ad_set_id": "adset_238423842384",
"ad_set_name": "US - Interest - 18-34",
"campaign_id": "camp_238423842",
"campaign_name": "Summer Sale 2025",
"status": "ACTIVE",
"format": "video",
"stats": {
"impressions": 31250,
"reach": 11250,
"clicks": 625,
"spend": 131.26,
"cpc": 0.21,
"ctr": 2.0
}
}
]
}
}
Ad Stats
| Field | Description |
|---|---|
impressions | Number of impressions |
reach | Number of unique people reached |
clicks | Number of clicks |
spend | Amount spent |
cpc | Cost per click |
ctr | Click through rate |
✅ Result: You have successfully retrieved Meta Ads analytics data!