Skip to main content
GET
/
api
/
businesses
/
{business_id}
/
integrations
/
{integration_id}
/
posts
/
{external_post_id}
/
stats
Get external post stats
curl --request GET \
  --url https://api.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats', 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.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats",
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.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats"

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.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats")

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
{
  "fetched_at": "2023-11-07T05:31:56Z",
  "likes": 123,
  "comment_count": 123,
  "impressions": 123,
  "shares": 123,
  "reach": 123,
  "saves": 123,
  "clicks": 123,
  "views": 123,
  "video_duration_ms": 123,
  "avg_watch_time_ms": 123,
  "total_watch_time_ms": 123,
  "completion_rate": 123,
  "video_views_organic": 123,
  "video_views_paid": 123
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

business_id
string
required

A UUID identifier.

integration_id
string
required

A UUID identifier.

external_post_id
string
required

Query Parameters

metrics
string | null

Comma-separated metric names. Omit for defaults.

Response

Successful Response

Statistics for a single post.

fetched_at
string<date-time>
likes
integer | null
comment_count
integer | null
impressions
integer | null
shares
integer | null
reach
integer | null
saves
integer | null
clicks
integer | null
views
integer | null
video_duration_ms
integer | null
avg_watch_time_ms
integer | null
total_watch_time_ms
integer | null
completion_rate
number | null
video_views_organic
integer | null
video_views_paid
integer | null