Stats API

General Report

GET /core/stats/v4/posts/<post_id>/reports/general?period=custom&min_date=2019-01-01&max_date=2019-05-01&until_now=0

Parameter

Type

Description

post_id

Integer

Required

auth_token_type

String

Required; values: jwt

auth_token

String

Required; values: {“user_id”: <admin_id>}

period

String

Required; values: 1h, 6h, 12h, 24h, 1d, 7d, 30d, 1m, 6m, 12m, lifetime, custom

until_now

Integer

Optional; values: 0, 1; default: 0

min_ts

Integer

Required when period=custom; values: unix timestamps

max_ts

Integer

Required when period=custom; values: unix timestamps

min_date

String

Required when period=custom; format: YYYY-MM-DD

max_date

String

Required when period=custom; format: YYYY-MM-DD

200 OK

{
  "report": {
    "total": {
      "page_seed_view_count": 224,
      "page_viral_view_count": 0,

      "page_view_duration_value": 3035100,

      "desktop_page_view_count": 203,
      "mobile_page_view_count": 0,
      "amp_page_view_count": 21,
      "iphone_page_view_count": 0,
      "android_page_view_count": 0,
      "instant_article_view_count": 0,

      "card_view_count": 162,
      "card_click_count": 3,
      "page_click_count": 249,
      "mouse_over_count": 643,

      "page_outreach_driven_view_count": 0,

      "signup_count": 0,
      "email_subscribe_count": 0,

      "internal_like_count": 0,
      "internal_comment_count": 41,

      "twitter_retweet_count": 0,
      "twitter_favorite_count": 0,

      "facebook_like_count": 0,
      "facebook_comment_count": 0,

      "instagram_like_count": 0,
      "instagram_comment_count": 0,

      "top_reference_provider": null,
      "top_reference_count": 0,

      "tumblr_reference_count": 0,
      "reddit_reference_count": 0,
      "google_reference_count": 0,
      "twitter_reference_count": 0,
      "facebook_reference_count": 0,
      "linkedin_reference_count": 0,
      "instagram_reference_count": 0,
      "pinterest_reference_count": 0,
      "stumbleupon_reference_count": 0,

      "external_share_count": 0,
      "email_share_count": 0,
      "reddit_share_count": 0,
      "tumblr_share_count": 0,
      "google_share_count": 0,
      "twitter_share_count": 0,
      "facebook_share_count": 0,
      "linkedin_share_count": 0,
      "instagram_share_count": 0,
      "pinterest_share_count": 0,
      "stumbleupon_share_count": 0

      "cta_click_count": 0,
      "quiz_cta_click_count": 0,

      "cta_external_share_count": 0,
      "cta_email_share_count": 0,
      "cta_reddit_share_count": 0,
      "cta_tumblr_share_count": 0,
      "cta_google_share_count": 0,
      "cta_twitter_share_count": 0,
      "cta_facebook_share_count": 0,
      "cta_linkedin_share_count": 0,
      "cta_instagram_share_count": 0,
      "cta_pinterest_share_count": 0,
      "cta_stumbleupon_share_count": 0,
    }
  }
}

Timeline Report

GET /core/stats/v4/posts/<post_id>/reports/general?period=custom&min_date=2019-01-01&max_date=2019-05-01&until_now=0

Parameter

Type

Description

post_id

Integer

Required

auth_token_type

String

Required; values: jwt

auth_token

String

Required; values: {“user_id”: <admin_id>}

period

String

Required; values: 1h, 6h, 12h, 24h, 1d, 7d, 30d, 1m, 6m, 12m, lifetime, custom

until_now

Integer

Optional; values: 0, 1; default: 0

min_ts

Integer

Required when period=custom; values: unix timestamps

max_ts

Integer

Required when period=custom; values: unix timestamps

min_date

String

Required when period=custom; format: YYYY-MM-DD

max_date

String

Required when period=custom; format: YYYY-MM-DD

200 OK

 {
   "report": {
     "precision": "month",  // day, hour
     "current_timeline": [
       {
         "timestamp": 1560211200,
         ... // See "General Report"
       },
       ...
     ]
   }
 }