Facebook Ads Insights
Authentication
Facebook Ads Insights uses OAuth 2.0 for authentication. hibase handles the authorization flow automatically.
- Go to the Connections page and create a New Connection
- Select Facebook Ads Insights API from the Connector dropdown
- Enter a Connection name
- Click Authenticate with OAuth — you will be redirected to Facebook Ads Insights's authorization page
- Grant the requested permissions and you will be redirected back to hibase
- Click Save
hibase stores the access token securely and refreshes it automatically when it expires.
Endpoints
Ads (API docs)
Retrieve ad objects (ads, ad sets, campaigns, or ad accounts) from the Facebook Marketing API.
| Parameter | Description | Required |
|---|---|---|
ad_object_type |
The type of ad object to retrieve. Values: ad, adset, campaign, adaccount |
✅ |
ad_object_id |
The Facebook ID of the ad object to query. | ✅ |
fields |
Comma-separated list of fields to return (e.g. name, status, created_time). | — |
filtering |
JSON-encoded array of filter objects to narrow results. | — |
effective_status |
Filter by effective status. Values: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES |
— |
date_preset |
Predefined date range for the query. Values: today, yesterday, last_7d, last_30d, this_month, last_month |
— |
Returned Data: All fields from the API response are automatically flattened into columns.
Insights (API docs)
Retrieve performance insights and analytics for ad objects from the Facebook Marketing API.
| Parameter | Description | Required |
|---|---|---|
ad_object_type |
The type of ad object to get insights for. Values: ad, adset, campaign, adaccount |
✅ |
ad_object_id |
The Facebook ID of the ad object. | ✅ |
start_date |
Start date for the insights query (format: YYYY-MM-DD). | ✅ |
end_date |
End date for the insights query (format: YYYY-MM-DD). | ✅ |
level |
The level of aggregation for the results. Values: ad, adset, campaign, account |
✅ |
fields |
Comma-separated list of metrics to retrieve (e.g. impressions, clicks, spend, ctr, cpc). | — |
action_attribution_windows |
Attribution window for conversions. Values: 1d_click, 7d_click, 28d_click, 1d_view, 7d_view, 28d_view |
— |
sort |
Field and direction to sort results by (e.g. impressions_descending). | — |
filtering |
JSON array of filter objects to narrow the insights query (e.g. [{"field":"spend","operator":"GREATER_THAN","value":0}]). | — |
breakdowns |
Comma-separated list of breakdown dimensions. Values: age, gender, country, region, device_platform, publisher_platform, placement |
— |
time_increment |
Number of days to aggregate per data point, or 'monthly' / 'all_days'. | — |
Returned Data: All fields from the API response are automatically flattened into columns.