Analytics
Post Analytics
GET /analytics/post/{postId} — Infipost Public API
Get analytics data for a specific published post. Returns metrics like likes, comments, shares, impressions, etc. depending on the platform.
cURL
curl --request GET \
--url 'https://api.infipost.asia/public/v1/analytics/post/{postId}' \
--header 'Authorization: YOUR_API_KEY'Authorization
Authorizationstring · headerrequiredWorkspace API key or OAuth access token. Send the token directly without a Bearer prefix.
Parameters
postIdstring · pathrequiredPost ID
datestring · queryrequiredNumber of days to look back for analytics data (e.g. 7, 30, 90)
Response
Analytics data for the post
application/json
[
{
"label": "Likes",
"data": [
{
"total": "150",
"date": "2025-01-01"
},
{
"total": "175",
"date": "2025-01-02"
}
],
"percentageChange": 16.7
},
{
"label": "Comments",
"data": [
{
"total": "25",
"date": "2025-01-01"
},
{
"total": "30",
"date": "2025-01-02"
}
],
"percentageChange": 20
}
]labelstringMetric label (e.g. Followers, Impressions, Likes)
dataarray[]Show child attributes
totalstringMetric value for this date
datestringDate string (YYYY-MM-DD)
percentageChangenumberPercentage change over the selected period
Bài viết này có hữu ích không?