Posts analytics
curl --request GET \
--url https://api.postflow.app/v1/analytics/content/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.postflow.app/v1/analytics/content/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postflow.app/v1/analytics/content/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.postflow.app/v1/analytics/content/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.postflow.app/v1/analytics/content/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.postflow.app/v1/analytics/content/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.postflow.app/v1/analytics/content/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"postTitle": "<string>",
"content": "<string>",
"postLink": "<string>",
"mediaCount": 123,
"firstMedia": {
"id": "<string>",
"organization_id": "<string>",
"user_id": "<string>",
"media_folder_id": "<string>",
"is_media_library": true,
"url": "<string>",
"client_name": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"extension": "<string>",
"size": 123,
"thumbnail": "<string>",
"preview": "<string>",
"width": 123,
"height": 123,
"aspect_ratio": 123,
"duration": 123,
"fps": 123,
"video_thumbnail_frame": "<string>",
"video_thumbnail_custom": "<string>",
"video_thumbnail_time": 123,
"page_count": 123,
"page_previews": [
"<string>"
],
"conversions": [
"<string>"
],
"alt_text": "<string>",
"pivot_alt_text": [
"<string>"
],
"note": "<string>",
"is_processing": true,
"is_converted": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"postMetric": {
"id": "<string>",
"post_id": "<string>",
"post_detail_id": "<string>",
"social_account_id": "<string>",
"social_post_id": "<string>",
"score": 123,
"views": 123,
"reach": 123,
"likes": 123,
"dislikes": 123,
"shares": 123,
"quotes": 123,
"replies": 123,
"saves": 123,
"follows": 123,
"user_profile_clicks": 123,
"post_link_clicks": 123,
"post_other_clicks": 123,
"engagements": 123,
"engagement_rate_impressions": 123,
"engagement_rate_reach": 123,
"video_views": 123,
"video_watch_time_total": 123,
"video_watch_time_avg": 123,
"score_1": 123,
"score_2": 123,
"score_3": 123,
"score_4": 123,
"score_5": 123,
"score_6": 123,
"score_7": 123,
"score_8": 123,
"score_9": 123,
"score_10": 123,
"updated_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"poll_results": [
"<string>"
],
"poll_votes": 123,
"postDetail": {
"id": "<string>",
"post_id": "<string>",
"social_account_id": "<string>",
"enabled": true,
"is_customized": true,
"stories": [
"<string>"
],
"is_story": true,
"published_at": "2023-11-07T05:31:56Z",
"user_error_message": "<string>",
"content": "<string>",
"link_preview": {
"url": "<string>",
"host": "<string>",
"title": "<string>",
"description": "<string>",
"image_url": "<string>"
},
"post_link": "<string>",
"firstComment": {
"id": "<string>",
"condition_value": 123,
"publishing_failed": true,
"user_error_message": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
},
"items": []
}
}
],
"links": [
"<unknown>"
],
"meta": {
"current_page": 123,
"first_page_url": "<string>",
"from": 123,
"last_page": 123,
"last_page_url": "<string>",
"next_page_url": "<string>",
"path": "<string>",
"per_page": 123,
"prev_page_url": "<string>",
"to": 123,
"total": 123
},
"sum": {
"score": 123,
"views": 123,
"reach": 123,
"likes": 123,
"dislikes": 123,
"shares": 123,
"quotes": 123,
"replies": 123,
"saves": 123,
"follows": 123,
"user_profile_clicks": 123,
"post_link_clicks": 123,
"post_other_clicks": 123,
"engagements": 123,
"engagement_rate_impressions": 123,
"engagement_rate_reach": 123,
"video_views": 123,
"video_watch_time_total": 123,
"video_watch_time_avg": 123,
"poll_votes": 123
},
"avg": {
"score": 123,
"views": 123,
"reach": 123,
"likes": 123,
"dislikes": 123,
"shares": 123,
"quotes": 123,
"replies": 123,
"saves": 123,
"follows": 123,
"user_profile_clicks": 123,
"post_link_clicks": 123,
"post_other_clicks": 123,
"engagements": 123,
"engagement_rate_impressions": 123,
"engagement_rate_reach": 123,
"video_views": 123,
"video_watch_time_total": 123,
"video_watch_time_avg": 123,
"poll_votes": 123
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Analytics
Posts analytics
Returns paginated performance metrics for individual posts within the specified date range. Includes aggregate sums and averages.
GET
/
analytics
/
content
/
posts
Posts analytics
curl --request GET \
--url https://api.postflow.app/v1/analytics/content/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.postflow.app/v1/analytics/content/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postflow.app/v1/analytics/content/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.postflow.app/v1/analytics/content/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.postflow.app/v1/analytics/content/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.postflow.app/v1/analytics/content/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.postflow.app/v1/analytics/content/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"postTitle": "<string>",
"content": "<string>",
"postLink": "<string>",
"mediaCount": 123,
"firstMedia": {
"id": "<string>",
"organization_id": "<string>",
"user_id": "<string>",
"media_folder_id": "<string>",
"is_media_library": true,
"url": "<string>",
"client_name": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"extension": "<string>",
"size": 123,
"thumbnail": "<string>",
"preview": "<string>",
"width": 123,
"height": 123,
"aspect_ratio": 123,
"duration": 123,
"fps": 123,
"video_thumbnail_frame": "<string>",
"video_thumbnail_custom": "<string>",
"video_thumbnail_time": 123,
"page_count": 123,
"page_previews": [
"<string>"
],
"conversions": [
"<string>"
],
"alt_text": "<string>",
"pivot_alt_text": [
"<string>"
],
"note": "<string>",
"is_processing": true,
"is_converted": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"postMetric": {
"id": "<string>",
"post_id": "<string>",
"post_detail_id": "<string>",
"social_account_id": "<string>",
"social_post_id": "<string>",
"score": 123,
"views": 123,
"reach": 123,
"likes": 123,
"dislikes": 123,
"shares": 123,
"quotes": 123,
"replies": 123,
"saves": 123,
"follows": 123,
"user_profile_clicks": 123,
"post_link_clicks": 123,
"post_other_clicks": 123,
"engagements": 123,
"engagement_rate_impressions": 123,
"engagement_rate_reach": 123,
"video_views": 123,
"video_watch_time_total": 123,
"video_watch_time_avg": 123,
"score_1": 123,
"score_2": 123,
"score_3": 123,
"score_4": 123,
"score_5": 123,
"score_6": 123,
"score_7": 123,
"score_8": 123,
"score_9": 123,
"score_10": 123,
"updated_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"poll_results": [
"<string>"
],
"poll_votes": 123,
"postDetail": {
"id": "<string>",
"post_id": "<string>",
"social_account_id": "<string>",
"enabled": true,
"is_customized": true,
"stories": [
"<string>"
],
"is_story": true,
"published_at": "2023-11-07T05:31:56Z",
"user_error_message": "<string>",
"content": "<string>",
"link_preview": {
"url": "<string>",
"host": "<string>",
"title": "<string>",
"description": "<string>",
"image_url": "<string>"
},
"post_link": "<string>",
"firstComment": {
"id": "<string>",
"condition_value": 123,
"publishing_failed": true,
"user_error_message": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
},
"items": []
}
}
],
"links": [
"<unknown>"
],
"meta": {
"current_page": 123,
"first_page_url": "<string>",
"from": 123,
"last_page": 123,
"last_page_url": "<string>",
"next_page_url": "<string>",
"path": "<string>",
"per_page": 123,
"prev_page_url": "<string>",
"to": 123,
"total": 123
},
"sum": {
"score": 123,
"views": 123,
"reach": 123,
"likes": 123,
"dislikes": 123,
"shares": 123,
"quotes": 123,
"replies": 123,
"saves": 123,
"follows": 123,
"user_profile_clicks": 123,
"post_link_clicks": 123,
"post_other_clicks": 123,
"engagements": 123,
"engagement_rate_impressions": 123,
"engagement_rate_reach": 123,
"video_views": 123,
"video_watch_time_total": 123,
"video_watch_time_avg": 123,
"poll_votes": 123
},
"avg": {
"score": 123,
"views": 123,
"reach": 123,
"likes": 123,
"dislikes": 123,
"shares": 123,
"quotes": 123,
"replies": 123,
"saves": 123,
"follows": 123,
"user_profile_clicks": 123,
"post_link_clicks": 123,
"post_other_clicks": 123,
"engagements": 123,
"engagement_rate_impressions": 123,
"engagement_rate_reach": 123,
"video_views": 123,
"video_watch_time_total": 123,
"video_watch_time_avg": 123,
"poll_votes": 123
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
period, year, null Omit to get them all.
Available options:
text, link, image, video, short, carousel, poll, story, audio, document, gallery ⌘I