Analytics
Fetch account-level analytics for Instagram, TikTok, and Meta Ads from the public API.
Instagram analytics
GET
/api/v1/analytics/instagram| Parameter | Type | Required | Description |
|---|---|---|---|
| instagramAccountId | string (UUID) | No | Optional when exactly one Instagram account is connected; required when multiple are connected. |
The response includes the connected account summary, recent media, and audience insights when available.
Response shape
{
"dataLevel": "full",
"account": {
"username": "wonda",
"followerCount": 12000,
"mediaCount": 84
},
"accountMetrics": {
"reach": 54000,
"views": 92000,
"followsAndUnfollows": 126,
"period": "last_30d"
},
"audienceInsights": {
"followerDemographics": {},
"reachedAudienceDemographics": {},
"onlineFollowers": {}
},
"recentMedia": []
}accountMetrics and audienceInsights are nullable — they are null when the account has "dataLevel": "basic".
TikTok analytics
GET
/api/v1/analytics/tiktok| Parameter | Type | Required | Description |
|---|---|---|---|
| tiktokAccountId | string (UUID) | No | Optional when exactly one TikTok account is connected; required when multiple are connected. |
The response includes profile stats and a list of recent videos with view and engagement counts.
Response shape
{
"account": {
"displayName": "Wonda",
"followerCount": 12000,
"followingCount": 42,
"likesCount": 181000,
"videoCount": 84,
"bio": "Creative automation",
"isVerified": false
},
"recentVideos": []
}Meta Ads analytics
GET
/api/v1/analytics/meta-ads| Parameter | Type | Required | Description |
|---|---|---|---|
| metaAdAccountId | string (UUID) | No | Optional selector for one connected Meta ad account. If omitted, a single connected account is used directly or multiple accounts are aggregated. |
| objectId | string | No | Overrides the target Ad Library object id. Defaults to the connected ad account when omitted. |
| datePreset | string | No | One of the supported date presets. Defaults to last_7d. |
| fields | string | No | Comma-separated Meta Insights fields. Defaults to the standard engagement and spend fields. |
| breakdowns | string | No | Comma-separated breakdown values. Invalid combinations return a 400 response. |
Example
curl "https://api.wondercat.ai/api/v1/analytics/meta-ads?datePreset=last_7d" \
-H "Authorization: Bearer YOUR_API_KEY"When one ad account is connected, the endpoint returns a single account payload. When multiple accounts are connected, the response contains per-account rows plus an aggregate summary.
Single-account response
{
"accountName": "Wonda Ads",
"accountId": "act_123",
"datePreset": "last_7d",
"summary": {
"impressions": 12000,
"clicks": 340,
"spend": 92.13,
"reach": 8300,
"cpm": 7.67,
"cpc": 0.27,
"ctr": 2.83
},
"actions": {},
"rows": [],
"deltas": {
"spend": 12.5,
"impressions": -3.2,
"clicks": 8.1,
"ctr": 1.4,
"cpc": -2.0,
"cpm": 0.6
}
}