您可以使用 Instagram 图谱 API 获取 Instagram 用户及其 Instagram 媒体对象的社交互动指标。每个指标的数量均根据 API 请求计算而得。
Instagram
主题设置 Webhooks,并订阅 story_insights
字段。0
。API 响应中的时间戳使用零偏移量的 UTC,并采用 ISO-8601 格式。例如:2019-04-05T07:56:32+0000
此 API 包含以下端点:
GET /{ig-media-id}/insights
— 获取媒体对象的指标GET /{ig-user-id}/insights
— 获取 Instagram 业务账户或 Instagram 创作者账户的指标。如需了解可用的指标、参数和权限要求,请参阅每个端点的参考文档。
如需获取 Instagram 业务账户或创作者账户的指标,请查询 GET /{ig-user-id}/insights
连线,并指定您希望返回的指标。
GET graph.facebook.com/17841405822304914/insights ?metric=impressions,reach,profile_views &period=day
{ "data": [ { "name": "impressions", "period": "day", "values": [ { "value": 32, "end_time": "2018-01-11T08:00:00+0000" }, { "value": 32, "end_time": "2018-01-12T08:00:00+0000" } ], "title": "Impressions", "description": "Total number of times the Business Account's media objects have been viewed", "id": "instagram_business_account_id/insights/impressions/day" }, { "name": "reach", "period": "day", "values": [ { "value": 12, "end_time": "2018-01-11T08:00:00+0000" }, { "value": 12, "end_time": "2018-01-12T08:00:00+0000" } ], "title": "Reach", "description": "Total number of times the Business Account's media objects have been uniquely viewed", "id": "instagram_business_account_id/insights/reach/day" }, { "name": "profile_views", "period": "day", "values": [ { "value": 15, "end_time": "2018-01-11T08:00:00+0000" }, { "value": 15, "end_time": "2018-01-12T08:00:00+0000" } ], "title": "Profile Views", "description": "Total number of users who have viewed the Business Account's profile within the specified period", "id": "instagram_business_account_id/insights/profile_views/day" } ] }
如需获取媒体对象的指标,请查询 GET /{ig-media-id}/insights
连线,并指定您希望返回的指标。
GET graph.facebook.com/{media-id}/insights ?metric=engagement,impressions,reach
{ "data": [ { "name": "engagement", "period": "lifetime", "values": [ { "value": 8 } ], "title": "Engagement", "description": "Total number of likes and comments on the media object", "id": "media_id/insights/engagement/lifetime" }, { "name": "impressions", "period": "lifetime", "values": [ { "value": 13 } ], "title": "Impressions", "description": "Total number of times the media object has been seen", "id": "media_id/insights/impressions/lifetime" }, { "name": "reach", "period": "lifetime", "values": [ { "value": 13 } ], "title": "Reach", "description": "Total number of unique accounts that have seen the media object", "id": "media_id/insights/reach/lifetime" } ] }