
Meta GetInsights
CertifiedCollect Facebook post insights
Meta GetInsights
Collect Facebook post insights
Fetches Graph API insights (reach, impressions, reactions, etc.) for one or more posts. Defaults to lifetime reaction metrics; date_preset is ignored when since/until are provided.
type: io.kestra.plugin.meta.facebook.posts.GetInsightsExamples
Get default reaction insights for posts
id: facebook_get_post_insights
namespace: company.team
tasks:
- id: get_insights
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
- "123456789_987654322"
Add custom metrics to default reactions
id: facebook_post_insights
namespace: company.team
tasks:
- id: get_insights_with_custom_metrics
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
metrics:
- POST_REACTIONS_LIKE_TOTAL
- POST_REACTIONS_LOVE_TOTAL
- POST_REACTIONS_WOW_TOTAL
- POST_REACTIONS_HAHA_TOTAL
- POST_REACTIONS_SORRY_TOTAL
- POST_REACTIONS_ANGER_TOTAL
- POST_IMPRESSIONS
- POST_ENGAGED_USERS
period: "lifetime"
Get insights with date preset
id: facebook_post_insights_preset
namespace: company.team
tasks:
- id: get_insights_last_7_days
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
datePreset: "last_7d"
period: "day"
Get insights with custom date range
id: facebook_post_insights_range
namespace: company.team
tasks:
- id: get_insights_custom_range
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
since: "2025-10-01"
until: "2025-10-15"
period: "day"
Properties
accessToken *Requiredstring
Access Token
Page access token with permissions such as pages_manage_posts and pages_read_engagement.
pageId *Requiredstring
Facebook Page ID
ID of the Page the task operates on; must match the access token scope.
postIds *Requiredarray
Post IDs
Post identifiers in pageId_postId format to retrieve insights for.
apiBaseUrl string
https://graph.facebook.comBase API URL
Base Graph API URL. Defaults to https://graph.facebook.com.
apiVersion string
v24.0API Version
Facebook Graph API version to call. Defaults to v24.0.
datePreset string
TODAYTODAYYESTERDAYTHIS_MONTHLAST_MONTHTHIS_QUARTERMAXIMUMLAST_3DLAST_7DLAST_14DLAST_28DLAST_30DLAST_90DLAST_WEEK_MON_SUNLAST_WEEK_SUN_SATLAST_QUARTERLAST_YEARTHIS_WEEK_MON_TODAYTHIS_WEEK_SUN_TODAYTHIS_YEARDate preset
Preset date range (e.g., last_week, yesterday). Default is TODAY; ignored when since or until are set.
metrics array
["POST_REACTIONS_LIKE_TOTAL","POST_REACTIONS_LOVE_TOTAL","POST_REACTIONS_WOW_TOTAL","POST_REACTIONS_HAHA_TOTAL","POST_REACTIONS_SORRY_TOTAL","POST_REACTIONS_ANGER_TOTAL"]POST_REACTIONS_LIKE_TOTALPOST_REACTIONS_LOVE_TOTALPOST_REACTIONS_WOW_TOTALPOST_REACTIONS_HAHA_TOTALPOST_REACTIONS_SORRY_TOTALPOST_REACTIONS_ANGER_TOTALPOST_IMPRESSIONSPOST_ENGAGED_USERSPOST_CLICKSPOST_REACTIONS_BY_TYPE_TOTALMetrics
Metrics to request. Defaults to reaction totals; add metrics such as POST_IMPRESSIONS or POST_ENGAGED_USERS as needed.
period string
LIFETIMEDAYWEEKDAYS_28MONTHLIFETIMETOTAL_OVER_RANGEPeriod
Aggregation period for insights. Defaults to lifetime.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
since string
2026-08-05Since
Lower bound (datetime string). Overrides date_preset when set. Defaults to today.
until string
2026-08-05Until
Upper bound (datetime string). Overrides date_preset when set. Defaults to today.