Ads Connections API
Ads Connections API
The Ads Connections API exposes read-only access to Meta Ads accounts connected through the Humblytics dashboard. Use it to inspect connected accounts, pull campaign metadata, and fetch daily insights. Google Ads endpoints are documented below for the forthcoming connector but are not yet available in the public product.
Base URL:
https://app.humblytics.com/apiNote: these endpoints sit under
/api, not/api/external/v1like the External Analytics API or/api/v1like the Ads Attribution API. All three bases accept the same property-scoped Bearer API key.
Authentication
Same property-scoped API key as the rest of the public API. Generate one at Utilities → API in the dashboard.
Authorization: Bearer <your_api_key>Read-only by design
These endpoints expose GETs only. Connecting, refreshing, and disconnecting ad accounts is done through the Connectors page in the dashboard — not via the API. If you need to programmatically manage (not just read) Meta or Google Ads campaigns, use the official Meta CLI or Google Ads API directly with your own credentials. Never route production ad-platform traffic through an unapproved Meta developer app — that is the documented pattern Meta is actively banning, regardless of how the access token was issued.
Prerequisites
Before the live Meta endpoints return data, the user must connect the relevant account in the Humblytics dashboard at Connectors → Meta Ads. Empty connections arrays mean nothing is connected for that property. Google Ads is live and connects from Connectors → Google Ads; this page covers the Meta endpoints only.
Google Ads (Forthcoming)
List Google Ads Connections
Lists all Google Ads connections for a property.
Query Parameters
propertyId
string
Yes
The property to scope to.
Sample Request
Sample Response
Notes
customerAccounts[].idis thecustomerIdyou'll need for the/campaignsendpoint below.tokenExpiresAtpast now does not mean the connection is broken — Humblytics handles token refresh server-side.syncState.statuscan beidle,syncing, orerror.
Get a Single Google Ads Connection
Returns a single connection by ID. Same shape as one entry in the list response above.
Sample Request
List Campaigns for a Google Ads Customer Account
Lists campaigns for a specific Google Ads customer account.
Query Parameters
customerId
string
Yes
Google Ads customer account ID. Get this from customerAccounts[].id in the connection response.
Sample Request
Sample Response
Notes
statusis one ofENABLED,PAUSED,REMOVED.channelTypemirrors Google's value (SEARCH,DISPLAY,SHOPPING,VIDEO,PERFORMANCE_MAX,DEMAND_GEN).For revenue-attached performance metrics (spend, ROAS, conversions), use the Ads Attribution API — it joins this campaign data with on-site session and revenue data.
Meta Ads
List Meta Ads Connections
Lists all Meta Ads connections for a property.
Query Parameters
propertyId
string
Yes
The property to scope to.
Sample Request
Sample Response
Notes
adAccounts[].idis theaccountIdyou'll need for account-scoped endpoints below. It includes theact_prefix.Meta connections are typically system-user-based (
metaUserName: "Humblytics System User"), sotokenExpiresAtis oftennull(no expiry).
Get a Single Meta Connection
Returns a single connection by ID. Same shape as one entry in the list response above.
Connection Status
Lightweight health check. Useful before running expensive insight queries.
Sample Response
status values: "connected", "expired", "error".
List All Campaigns Across the Connection
Returns campaigns grouped by ad account, across every account on the connection. Use this when you need a "show me everything" view; use the per-account endpoint below when you need performance metrics.
Sample Response
List Campaigns for a Specific Ad Account (with Metrics)
Returns campaigns for one ad account, including performance metrics for the requested date range (when supplied).
Query Parameters
since
string
No
Start date (ISO date, YYYY-MM-DD).
until
string
No
End date (ISO date, YYYY-MM-DD).
If since/until are omitted, returns campaigns without performance metrics attached.
Sample Request
Daily Insights for an Ad Account
Day-by-day campaign performance breakdown for a specific ad account. The primary endpoint for spend reconciliation.
Query Parameters
since
string
Yes
Start date (YYYY-MM-DD).
until
string
Yes
End date (YYYY-MM-DD).
Sample Request
Sample Response
insights is empty when no spend ran in the date range. When data exists, each row includes per-day campaign-level spend, impressions, clicks, and conversion metrics from Meta's Insights API.
List Ads Within a Campaign
Returns the ads inside a campaign — creative metadata, destination URLs, and ad-level performance (when applicable). Use this for creative inspection workflows ("which ads are driving spend without revenue?").
Sample Request
Detailed Ad Creative
Full creative metadata for a single ad — image/video URLs, copy variations, landing URL, status. Pair with the campaign-level endpoint above to drill into specific creative.
Sample Request
Related Endpoints
Ads Attribution API — joins this connector data with on-site session and revenue data for full-funnel ROAS reporting. This is what you want for "which campaigns are paying back?" rather than raw spend.
External Analytics API — UTM-based traffic and form data; pair with these endpoints for campaigns where ad-platform attribution is incomplete.
Connectors — how to set up the live Meta Ads connection and check connector availability.
Last updated