analytics

Analytics API Endpoint: Get real-time analytical data for posts and social accounts, such as clicks, likes, shares, followers, and impressions.


POST Analytics on a Post

POST https://app.ayrshare.com/api/analytics/post

Get real-time analytics such as likes, impressions, retweets, etc for a given post that originated via Ayrshare. Will only return the analytics of networks where the post was sent.

For analytics on posts originating outside of Ayrshare see Analytics by Social ID.

Notes

Facebook Pages, Instagram, Twitter, LinkedIn, Pinterest, Reddit, TikTok, and YouTube are currently supported.

You might need to unlink and re-link Facebook and Instagram in the Dashboard's Social Accounts Page to grant the new Analytics permissions.

Twitter Threads returns as an Array of objects, with each object corresponding to a Tweet in the Thread.

YouTube can take up to 24 hours to process analytics for videos with fewer views.

TikTok account owners need to first publish at least one video, then tap the "Turn On" button on the Analytics page of their mobile TikTok app. You will receive more insights about your viewers and the content they've engaged with once you have 100 followers.

If the TikTok fields reach, fullVideoWatchedRate, totalTimeWatched, averageTimeWatched, impressionSources, and audienceCountries are unavailable, the reason is that the video has not had activity on it (comments, likes, views) for more than 7 days. To retrieve the data for these fields, you can view, like, comment, or share the inactive video and retry after 24 ~ 48h. If a video is not returned in the response, the reason is likely to be that the video has been filtered out due to violations, such as music copyright violation.

LinkedIn limits the analytics on posts to personal pages. Please see in the 200 response for more details.

Instagram Story insights are only available for 24 hours, even if the stories are archived or highlighted. Story media metrics with values less than 5 return as 0. For Stories created by users in Europe and Japan, the replies metric return a value of 0.

Facebook Story analytics are not available. Premium or Business Plan required.

Headers

Request Body

{
    // Note: If the FB page has fewer than 100 likes then not all analytics data available.
    "facebook": {
        "id": "1397547544885713_2159201585286968", // Facebook Social ID
        "postUrl": "https://www.facebook.com/1397547544885713_2159201585286968",
        "analytics": {
            "blueReelsPlayCount": 136, // Reels: The number of times your reel starts to play after an impression is already counted. This is defined as reels sessions with 1ms or more of playback and excludes replays.
            "clicksUnique": 2,         // Times people clicked on anywhere in your posts.
            "commentCount": 1,         // Count of comment for the post
            "engagedUsers": 63,        // The number of people who clicked anywhere in your posts.
            "impressions": 23,         // The number of times your Page's post entered a person's screen. Posts include statuses, photos, links, videos and more.
            "impressionsFanPaidUnique": 3, // The number of people who have like your Page and saw your Page post in an Ad or Sponsored Story.
            "impressionsFanUnique": 1, // The number of people who have like your Page who saw your Page post.
            
            "impressionsOrganicUnique": 4, // The number of people who had your Page's post enter their screen through unpaid distribution.
            "impressionsPaidUnique": 2, // The number of people who had your Page's post enter their screen through paid distribution such as an ad.
            "impressionsUnique": 12,   // The number of people who had your Page's post enter their screen. Posts include statuses, photos, links, videos and more.
            "likeCount": 23,           // Count of likes for the post
            "negativeFeedback": 1,     // Times people took a negative action in your post (e.g. hid it).
            "negativeFeedbackUnique": 1, // Unique times people took a negative action in your post (e.g. hid it).
            "postImpressionsUnique": 126, // Reels: The number of people who saw your reel at least once, whether or not your reel was played. People reached is different from impressions, which may include multiple views of your reel by the same people
            "postVideoAvgTimeWatched": 4470, // Reels: The average time (in ms) your reel was played, including any time spent replaying the reel during a single instance of it playing. Because this metric includes replays, this number could be greater than the total length of the reel
            "postVideoSocialActions": { // Reels: The number of comments, shares, and reactions on your reel
                "share": 1
            },
            "postVideoViewTime": 608011, // Reels: Total time (in ms) your reel was played, including any time spent replaying your reel.
            "reactions": {
                "like": 1,         // Like reactions - The "like" reaction counts include both "like" and "care" reactions.
                "love": 1,         // Love reactions
                "anger": 1,        // Anger reactions
                "haha": 1,         // Haha reactions
                "wow": 1,          // Wow reactions
                "sorry": 1,        // Sorry reactions
                "total": 6         // Total number of reactions
            },
            "sharesCount": 34,     // Total number of times post shared
            
            /** The following fields are available for videos */
            "totalVideo10SViews": 621,             // Total number of times your video was viewed for 10 seconds or viewed to the end, whichever came first.
            "totalVideo10SViewsAutoPlayed": 564,   // Number of times people clicked to play your video and viewed it for 10 seconds or viewed it to the end, whichever came first.
            "totalVideo10SViewsClickedToPlay": 46, // Number of times your video started automatically playing and people viewed it for 10 seconds, or viewed it to the end, whichever came first.
            "totalVideo10SViewsOrganic": 621,      // Number of times your video was viewed for 10 seconds or viewed to the end, whichever came first, without a paid promotion.
            "totalVideo10SViewsPaid": 0,           // Number of times your video was viewed for 10 seconds or viewed to the end, whichever came first, after a paid promotion.
            "totalVideo10SViewsSoundOn": 380,      // Number of times your video sound was turned on and was viewed for 10 seconds or viewed to the end, whichever came first.
            "totalVideo10SViewsUnique": 621,       // Number of unique people who viewed your video for 10 seconds or viewed to the end, whichever came first.
            "totalVideo15SViews": 525,             // Total number of times your video was viewed for at least 15 seconds.
            "totalVideo60SExcludesShorterViews": 0, // Total number of times your video was viewed for 60 seconds only if the video is 60 seconds or longer.
            "totalVideoAvgTimeWatched": 8494,      // Lifetime: Average time video viewed
            "totalVideoCompleteViews": 430,        // Total number of times your video was watched at 95% of its length, including watches that skipped to this point.
            "totalVideoCompleteViewsAutoPlayed": 374,     // Number of times your video started automatically playing and people watched it at 95% of its length, including watches that skipped to this point.
            "totalVideoCompleteViewsClickedToPlay": 56,   // Number of times people clicked to play your video and watched it at 95% of its length, including watches that skipped to this point.
            "totalVideoCompleteViewsOrganic": 430,       // Number of times your video was watches at 95% of its length without any paid promotion, including watches that skipped to this point.
            "totalVideoCompleteViewsOrganicUnique": 430, // The number of unique people who watched your video at 95% of its length without any paid promotion, including people that skipped to this point
            "totalVideoCompleteViewsPaid": 0,      // Number of times your video was watched at 95% of its length after paid promotion, including watches that skipped to this point.
            "totalVideoCompleteViewsPaidUnique": 0,     // The number of unique people who watched your video at 95% of its length after paid promotion, including people that skipped to this point.
            "totalVideoCompleteViewsUnique": 430, // Total number of unique people who watched your video at 95% of its length or more, including people that skipped to this point.
            "totalVideoImpressions": 3163,        // The number of impressions of the video.
            "totalVideoImpressionsFan": 0,        // Number of impressions of your Page Video to people who have liked your Page.
            "totalVideoImpressionsFanPaid": 0,    // Number of paid impressions of your Page Video Asset to people who have liked your Page.
            "totalVideoImpressionsFanPaidUnique": 0,     // Number of people who like your Page and who saw your Page Video in an ad or sponsored story.
            "totalVideoImpressionsFanUnique": 0,         // Number of people who saw your Page video because they've liked your Page 
            "totalVideoImpressionsOrganic": 3163,        // The number of impressions of your Video in Feed or ticker or on your Page's Timeline
            "totalVideoImpressionsOrganicUnique": 3131, // Number of people who saw your Page Video in Feed or ticker, or on your Page's timeline.
            "totalVideoImpressionsPaid": 0,        // Number of impressions of your Page Video in an Ad or Sponsored Story.
            "totalVideoImpressionsPaidUnique": 0, // Number of people your advertised Page Video was served to.
            "totalVideoImpressionsUnique": 3131, // The total number of people your video was served to.
            "totalVideoImpressionsViral": 0,     //  The number of impressions of your Page Video in a story generated by a friend.
            "totalVideoImpressionsViralUnique": 0, //  Number of people who saw your Page Video in a story from a friend.
            "totalVideoReactionsByTypeTotal": {    // The total number of reactions to your post by type.
                "like": 13,
                "haha": 2
            },
            "totalVideoStoriesByActionType": {    // Number of stories created about your Page Video, by action type.
                "like": 15
            },
            "totalVideoViewTimeByAgeBucketAndGender": { // Video view time (in ms) by age bucket and gender.
                "f1317": 23521,
                "m1317": 184052,
                "u1824": 2774,
                "f1824": 118193,
                "m1824": 1340281,
                "u2534": 11975,
                "f2534": 407006,
                "m2534": 3960750,
                "u3544": 27054,
                "f3544": 332576,
                "m3544": 5477331,
                "u4554": 41804,
                "f4554": 375449,
                "m4554": 3794202,
                "u5564": 35717,
                "f5564": 159041,
                "m5564": 3582574,
                "u65+": 8245,
                "f65+": 423739,
                "m65+": 2866201
            },
            "totalVideoViewTimeByDistributionType": { // Video view time (in ms) by distribution type. On asset level, there are three possible distribution types: (page_owned/shared/crossposted)
                "pageOwned": 23172485
            },
            "totalVideoViewTimeByRegionId": {    // Video view time (in ms) by region ID.
                "californiaUnitedStates": 791788,
                "texasUnitedStates": 480891,
                "karnatakaIndia": 390297,
                "uttarPradeshIndia": 368698,
                "tamilNaduIndia": 359103,
                "queenslandAustralia": 295491,
                "newSouthWalesAustralia": 284222,
                "newYorkUnitedStates": 250035,
                "maharashtraIndia": 248465,
                "washingtonUnitedStates": 237430,
                "floridaUnitedStates": 214026,
                "sãoPaulo (state)Brazil": 209241,
                "pennsylvaniaUnitedStates": 195319,
                "wisconsinUnitedStates": 183331,
                "kosovoKosovo": 182307,
                "bayernGermany": 180409,
                "gujaratIndia": 166175,
                "virginiaUnitedStates": 160769,
                "britishColumbiaCanada": 159124,
                "calabarzonPhilippines": 155737,
                "ulanBatorMongolia": 155298,
                "southMoravianRegionCzechRepublic": 154481,
                "englandUnitedKingdom": 153681,
                "massachusettsUnitedStates": 152783,
                "bangkokThailand": 146875,
                "buenosAiresArgentina": 146560,
                "delhiIndia": 144147,
                "flemishRegionBelgium": 143057,
                "albertaCanada": 140184,
                "victoriaAustralia": 139255,
                "westBengalIndia": 138875,
                "santiagoMetropolitanRegionChile": 138850,
                "ontarioCanada": 137343,
                "masovianVoivodeshipPoland": 136393,
                "styriaAustria": 134681,
                "westernAustraliaAustralia": 132538,
                "oklahomaUnitedStates": 128642,
                "attica (region)Greece": 127111,
                "tennesseeUnitedStates": 126148,
                "hoChiMinhCityVietnam": 125896,
                "metroManilaPhilippines": 124469,
                "yangonMyanmar": 124365,
                "paysDeLaLoireFrance": 122309,
                "idahoUnitedStates": 121923,
                "coloradoUnitedStates": 121812
            },
            "totalVideoViewTotalTime": 23172485, // Total time (in ms) video has been viewed.
            "totalVideoViewTotalTimeOrganic": 23172485, // Total time (in ms) video has been viewed in Feed or ticker or on your Page's Timeline.
            "totalVideoViewTotalTimePaid": 0, // Total time (in ms) video has been viewed after paid promotion.
            "totalVideoViews": 1283,
            "totalVideoViewsAutoplayed": 1237, // Number of times your video started automatically playing and people viewed it for 3 seconds or viewed it to the end, whichever came first.
            "totalVideoViewsByDistributionType": { // Video views by distribution type. On asset level, there are three possible distribution types: (page_owned/shared/crossposted)
                "pageOwned": 1283
            },
            "totalVideoViewsClickedToPlay": 46, // Number of times people clicked to play your video and viewed it for 3 seconds or viewed it to the end, whichever came first.
            "totalVideoViewsOrganic": 1283, // Number of times your video was viewed for 3 seconds or viewed to the end, whichever came first, without any paid promotion.
            "totalVideoViewsOrganicUnique": 1283, // Number unique viewers who viewed for 3 seconds or viewed to the end, whichever came first, without any paid promotion.
            "totalVideoViewsPaid": 0, // Number of times your video was viewed for 3 seconds or viewed to the end, whichever came first, after paid promotion.
            "totalVideoViewsPaidUnique": 0, // Number of unique viewers who viewed for 3 seconds or viewed to the end, whichever came first, after paid promotion.
            "totalVideoViewsSoundOn": 743, // Number of times your video sound was turned on and was viewed for 3 seconds or viewed to the end, whichever came first.
            "totalVideoViewsUnique": 1283,
            "videoViews": 0,       // Times your videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. This includes live views.
            "videoViewsUnique": 0, // Unique times your videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video. This includes live views.
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    "instagram": {
        "id": "17856916804532520",    // Instagram Social ID
        "postUrl": "https://www.instagram.com/p/ChALNdaOT3G/",
        "analytics": {
            // FEED Data
            "caption": "It always seems impossible until it’s done. - Nelson Mandela",
            "commentsCount": 1        // Comments total
            "created": "2022-09-07T22:39:06Z",    // Time post was created
            "engagementCount": 3,     // Likes, comments, and saves
            "impressionsCount": 73,   // Times the post has been seen
            "likeCount": 1,           // Likes total - organic likes, promoted post likes not included
            "mediaProductType": "FEED",    // Type of IG Share: AD, FEED, STORY or REELS
            "mediaType": "IMAGE",     // Media type: CAROUSEL_ALBUM, IMAGE, or VIDEO
            "reachCount": 71,         // Unique accounts that have seen the post
            "savedCount": 1,          // Unique accounts have saved the post
            "videoViews": 23,         // Times the video has been seen id mediaType VIDEO
            "username": "jackthegiant"
            
            // REELS Data
            "caption": "Gorgeous gifts for new Mum & Bub \n\n@mikimoocreations @romperandco @obdesigns @salusbody @enaproducts",
            "commentsCount": 1,             // Comments total
            "created": "2022-09-15T06:58:55Z",
            "igReelsAvgWatchTimeCount": 23, // The average amount of time spent playing the reel. This is calculated by the watch time divided by the number of plays.
            "igReelsVideoViewTotalTimeCount": 21, // The total amount of time the reel was played, including any time spent replaying the reel.
            "likeCount": 21,                // Likes total on the reel
            "mediaProductType": "REELS",    // Type of IG Share: AD, FEED, STORY or REELS
            "mediaType": "VIDEO",           // Always "VIDEO"
            "playsCount": 680,              // Number of times the reels starts to play after an impression is already counted. This is defined as video sessions with 1 ms or more of playback and excludes replays
            "reachCount": 689,              // Number of unique accounts that have seen the reel at least once. Reach is different from impressions, which can include multiple views of a reel by the same account.
            "savedCount": 0,                // Number of saves of the reel.
            "sharesCount": 2,               // Number of shares of the reel.
            "totalInteractionsCount": 27,   // Number of likes, saves, comments, and shares on the reel, minus the number of unlikes, unsaves, and deleted comments.
            "username": "mordiallocflorist"
            
            // STORY Data
            "commentsCount": 10,
            "created": "2024-04-25T23:17:37Z",
            "exists": true,
            "impressions": 353,
            "likeCount": 45,
            "mediaProductType": "STORY",
            "mediaType": "IMAGE",
            "notEnoughViews": true,  // True if fewer than 5 insights. If fewer than 5 insights metric data not available.
            "reach": 34,
            "replies": 4,
            "tapsForward": 21,
            "tapsBack": 12,
            "username": "wynncokelowna"
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    // Past 12 months, using a rolling 12-month window.
    // LinkedIn Personal Pages only return like, comment, and reaction counts if available.
    "linkedin": { 
        "id": "6783586276949000192",     // LinkedIn Social ID
        "postUrl": "https://www.linkedin.com/feed/update/urn:li:share:6783586276949000192"
        "analytics": {
            "clickCount": 0,        // Clicks on a post
            "commentCount": 0,      // Comments count
            "engagement": 0,        // Organic clicks, likes, comments, and shares over impressions
            "impressionCount": 0,   // Impressions on a post
            "likeCount": 1,         // Likes on a count
            "reactions": {          // Get reactions on a LinkedIn share
                "like": 1,        // "Like in the UI      
                "praise": 2,      // "Celebrate" in the UI
                "maybe": 3,       // "Curious" in the UI
                "empathy": 3,     // "Love" in the UI
                "interest": 2     // "Insightful" in the UI
                "appreciation": 5 // "Support" in the UI
            },
            "shareCount": 0,        // Shares on a post
            "uniqueImpressionsCount": 0,    // Unique impressions for a post
            "videoViews": 1         // Number of times video viewed
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    "pinterest": {
        "id": "718464946813167315",    // Pinterest Social ID
        "postUrl": "https://www.pinterest.com/pin/718464946813167315/",
        "analytics": {
            "impression": 34,
            "save": 3,
            "pinClick": 123,
            "outboundClick": 2,
            "videoMrcView": 5,
            "videoAvgWatchTime": 12,
            "videoV50WatchTime": 1,
            "quartile95PercentView": 30
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    "reddit": {
        "id": "182zitr",
        "postUrl": "https://www.reddit.com/r/test/comments/182zitr/reddit_post_title/",
        "analytics": {
            "author": "ayrshare",
            "created": "2023-11-24T19:10:06.000Z",
            "permalink": "/r/test/comments/182zitr/reddit_post_title/",
            "subreddit": "test",
            "title": "Reddit Post Title",
            "ups": 2,
            "upvoteRatio": 1,
            "url": "https://www.reddit.com/r/test/comments/182zitr/reddit_post_title/"
        },
        "lastUpdated": "2023-11-24T19:10:41.635Z",
        "nextUpdate": "2023-11-24T19:21:41.635Z"
    },
    "tiktok": {
        "id": "7034682002927550598",    // TikTok Social ID
        "postUrl": "https://www.tiktok.com/@borneild/video/7034682002927550598?utm_campaign=tt4d_open_api&utm_source=awawnhyictaos7o",
        "analytics": {
            "audienceCountries": [ // Available 24-48 hours after posting. Must be an active post. See endpoint details.
                {
                    "country": "BM",
                    "percentage": 0.0036
                },
                {
                    "country": "MX",
                    "percentage": 0.0072
                },
                {
                    "country": "PH",
                    "percentage": 0.0036
                },
                {
                    "country": "US",
                    "percentage": 0.9819
                },
                {
                    "country": "VN",
                    "percentage": 0.0036
                }
            ],
            "averageTimeWatched": 5.6679,    // Available 24-48 hours after posting.
            "caption": "Scramble up ur name & I’ll try to guess it😍❤️ #foryoupage #petsoftiktok #aesthetic",
            "comments": 23,
            "created": "2022-08-09T15:08:22Z",
            "embedUrl": "https://www.tiktok.com/embed/v2/7129893524253756713",
            "fullVideoWatchedRate": 0.0866, // Percentage of views that completed watching the full video. Available 24-48 hours after posting.
            "impressionSources": [ // Different sources for the impressions, ranked from the largest contribution to the smallest. Available 24-48 hours after posting.
                {
                    "impression_source": "Search",
                    "percentage": 0.0217
                },
                {
                    "impression_source": "Sound",
                    "percentage": 0
                },
                {
                    "impression_source": "Follow",
                    "percentage": 0
                },
                {
                    "impression_source": "For You",
                    "percentage": 0.917
                },
                {
                    "impression_source": "Hashtag",
                    "percentage": 0
                },
                {
                    "impression_source": "Personal Profile",
                    "percentage": 0
                }
            ],
            "likes": 22,
            "mediaType": "video",
            "musicTitle": "♬ original sound - tiff",    // If available
            "musicUrl": "https://www.tiktok.com/music/original-sound-6689804660171082501?refer=embed", // if available
            "name": "Mackly",
            "postUrl": "https://www.tiktok.com/@tiktoktime/video/7129893524253756713?utm_campaign=tt4d_open_api&utm_source=awawnhyictaos7o7",
            "reach": 252, // Total number of unique users who viewed the video. Available 24-48 hours after posting.
            "shares": 0,
            "shareUrl": "https://www.tiktok.com/@tiktoktime/video/7129893524253756713?utm_campaign=tt4d_open_api&utm_source=awawnhyictaos7o7", // Deprecated, user postUrl
            "tags": [    // Tags included in the description
                {
                    "tag": "#foryoupage",
                    "url": "https://www.tiktok.com/tag/foryoupage"
                },
                {
                    "tag": "#petsoftiktok",
                    "url": "https://www.tiktok.com/tag/petsoftiktok"
                },
                {
                    "tag": "#aesthetic",
                    "url": "https://www.tiktok.com/tag/aesthetic"
                }
            ],
            "thumbnailHeight": 576,
            "thumbnailUrl": "https://p16-sign.tiktokcdn-us.com/obj/tos-useast5-p-0068-tx",
            "thumbnailWidth": 1006,
            "url": "https://www.tiktok.com/@tiktoktime",
            "videoDuration": 13.984,
            "videoViews": 34
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    // Note: if the post was sent as a Twitter Thread, the return will be an array, "twitter": []
    "twitter": {
        "id": "1313589441919827982",    // Twitter Social ID
        "postUrl": "https://www.twitter.com/myaccount/1313589441919827982",
        "analytics": {
            "created": "2022-09-07T22:12:10.000Z",
            "media": [
                {
                    "width": 1920,
                    "durationMs": 28240,
                    "height": 1080,
                    "mediaKey": "7_1739849636389814272",
                    "previewImageUrl": "https://pbs.twimg.com/ext_tw_video_thumb/1739849636389814272/pu/img/bCkAdkD0R00-ZlkY.jpg",
                    "type": "video",
                    "mediaUrls": [ // available for videos and gifs
                        {
                            "bitRate": 256000,
                            "contentType": "video/mp4",
                            "mediaUrl": "https://video.twimg.com/ext_tw_video/1739849636389814272/pu/vid/avc1/480x270/4RoZCqynednVMFgy.mp4?tag=12"
                        },
                        {
                            "bitRate": 832000,
                            "contentType": "video/mp4",
                            "mediaUrl": "https://video.twimg.com/ext_tw_video/1739849636389814272/pu/vid/avc1/640x360/RYy5iHTIxu7_iyZm.mp4?tag=12"
                        },
                        {
                            "bitRate": 2176000,
                            "contentType": "video/mp4",
                            "mediaUrl": "https://video.twimg.com/ext_tw_video/1739849636389814272/pu/vid/avc1/1280x720/9UpR90ekFA-9Ucxo.mp4?tag=12"
                        },
                        {
                            "contentType": "application/x-mpegURL",
                            "mediaUrl": "https://video.twimg.com/ext_tw_video/1739849636389814272/pu/pl/0AVy2xIOLQcsrEZG.m3u8?tag=12&container=fmp4"
                        }
                    ]
                }
            ],
            "name": "Wonder World",
            "post": "Today is a great day!",
            "publicMetrics": {              // Organic and paid metrics available publicly. Use this to measure Tweet engagement.
                "retweetCount": 0,          // Retweets count
                "quoteCount": 0,            // Times the Tweet was quoted count
                "likeCount": 0,             // Likes for the Tweet count
                "replyCount": 0             // Replies count
            },
            "nonPublicMetrics": {          // Organic and paid metrics not available publicly. Not available for Tweets older than 30 days. Use this to determine the total number of impressions generated for the Tweet.
                "userProfileClicks": 1,    // User profile clicks
                "impressionCount": 5,      // How many times the Tweet has been viewed (not unique by user). A view is counted if any part of the Tweet is visible on the screen.
                "video": {                 // Users who played through to each quartile in a video. This reflects the number of quartile views across all Tweets in which the given video has been posted.
                    "playback25Count": 4,
                    "playback50Count": 2,
                    "playback75Count": 1,
                    "playback0Count": 4,
                    "playback100Count": 1
                }
            },
            "organicMetrics": {            // Non-paid metrics.  Not available for Tweets older than 30 days. Use this to measure organic engagement for the Tweet.
                "likeCount": 0,            // Tweet likes
                "impressionCount": 5,      // How many times the Tweet has been viewed (not unique by user). A view is counted if any part of the Tweet is visible on the screen.
                "replyCount": 0,           // Replies count
                "retweetCount": 0,         // R countetweets
                "userProfileClicks": 1,    // User profile clicks
                "video": {                 // Users who played through to each quartile in a video. This reflects the number of quartile views across all Tweets in which the given video has been posted. 
                    "playback25Count": 4,
                    "playback0Count": 4,
                    "playback100Count": 1,
                    "viewCount": 4,
                    "playback50Count": 2,
                    "playback75Count": 1
                }
            },
            "poll": {                    // Present if Tweet has a poll
                "durationMinutes": 5,    // Duration in minutes
                "endDatetime": "2023-05-29T17:28:05.000Z",
                "votingStatus": "open", // "open" or "closed"
                "id": "1663234520718371960",
                "options": [
                    {
                        "position": 1,
                        "label": "yes",
                        "votes": 3
                    },
                    {
                        "position": 2,
                        "label": "maybe",
                        "votes": 1
                    },
                    {
                        "position": 3,
                        "label": "no",
                        "votes": 0
                    }
                ]
            },
            "username": "wondrous"
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    "youtube": {
        "id": "RWJMpOUGicU",            // YouTube Social ID
        "postUrl": "https://youtu.be/RWJMpOUGicU",
        "analytics": {
            "averageViewDuration": 6,          // The average length, in seconds, of video playbacks. 
            "averageViewPercentage": 92.01,    // The average percentage of a video watched during a video playback.
            "channelTitle": "youtubeHandle",
            "comments": 22,
            "created": "2022-08-15T19:14:44Z",
            "description": "Doubt is not a pleasant condition, but certainty is absurd. - Voltaire",
            "dislikes": 3,
            "estimatedMinutesWatched": 23,    // The number of minutes that users watched videos for the specified channel, content owner, video, or playlist.
            "likes": 54,
            "liveBoardcastDetails": {.         // Only present if liveBroadcast is "live" or "upcoming"
                "activeLiveChatId": "Cg0KC3Ez" // The ID of the currently active live chat attached to this video. Not present if broadcast complete and chat no longer live
                "actualStartTime": "2023-05-04T10:14:56Z",   // The time that the broadcast actually started.
                "actualEndTime": "2023-05-04T10:15:15Z",     // The time that the broadcast actually ended.
                "concurrentViewers": 384343,                 // The number of viewers currently watching the broadcast. Not present if the broadcast has ended.
                "scheduledEndTime": "2023-05-04T10:15:00Z",  // The time that the broadcast is scheduled to end if a scheduled end time was set.
                "scheduledStartTime": "2023-05-04T10:15:00Z" // The time that the broadcast is scheduled to begin.
            },
            "liveBroadcast": "live",          // Values: "none", "live", "upcoming"
            "madeForKids": false,
            "privacyStatus": "public",
            "publishedAt": "2023-05-08T12:30:26Z",
            "subscribersGained": 23,        // The number of times that users subscribed to a channel.
            "subscribersLost": 1,           // The number of times that users unsubscribed from a channel. 
            "tags": ["sweet", "sour"],      // Tags assigned to video
            "thumbnailUrl": "https://i.ytimg.com/vi/RWJMpOUGicU/default.jpg",
            "title": "Yo time",
            "videosAddedToPlaylists": 2,    // The number of times that videos were added to any YouTube playlists. The videos could have been added to the video owner's playlist or to other channels' playlists.
            "views": 153
        },
        "lastUpdated": "2022-04-23T18:44:29.778Z",
        "nextUpdate": "2022-04-23T19:19:29.778Z"
    },
    "status": "success",
    "code": 200,
    "id": "IHvCLacgPc6hMU9IQ6oK"
}

Request Examples

curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "Post ID", "platforms": ["facebook", "instagram", "twitter", "youtube", "tiktok", "linkedin", "pinterest"]}' \
-X POST https://app.ayrshare.com/api/analytics/post

POST Analytics on a Social Network

POST https://app.ayrshare.com/api/analytics/social

Get analytics and demographics on a user's social profile, such as impressions, views, and followers.

Currently available for Facebook Pages, Instagram Accounts, Twitter handles, LinkedIn Company Pages, YouTube Channels, Google My Business accounts, TikTok accounts, Reddit, and Pinterest Users.

Facebook Page analytics is generally only available on Pages with 100 or more likes, such as demographics. Facebook typically updates their metrics once every 24 hours.

LinkedIn only supports Company Page analytics. LinkedIn count totals are eventually consistent, but not immediately consistent, and can take up to 24-48 hours in some cases.

Please see the post analytics endpoint for additional info.

Headers

Request Body

{
    "status": "success",
    "facebook": {
        // See specific time ranges - Lifetime unless otherwise noted
        "analytics": {
            "about": "What to watch next? Create private groups with your friends to get recommendations on the next movie or show to watch.",
            "birthday": "11/20/1985",       // Applicable to Pages representing people
            "caterory": "Movie",            // The Page's category. e.g. Product/Service, Computers/Technology.
            "emails": ["support@ayrshare.com"],
            "engagement": {                // If available, otherwise use fanCount
                "count": 587,              // Page like count, same as fanCount
                "socialSentence": "587 people like this."
            },
            "fanCount": 587,
            "followersCount": 587,
            "id": "102619320979033",
            "instagramBusinessAccount": {
                "id": "17841452212707498" // Present if an Instagram account is linked with the Facebook page
            },
            "isPublished": true,          // If the FB Page is publicly visable.
            "link": "https://www.facebook.com/102619320979033",
            "location": {                // If a location is set
                "street": "142 W 57th St",
                "zip": "10019"
            }
            "name": "theGoodone",
            "pageConsumptionsByConsumptionType": {
                "linkClicks": 3,
                "otherClicks": 4,
                "videoPlay": 4
            },
            "pageConsumptionsByConsumptionTypeUnique": {
                "linkClicks": 2,
                "otherClicks": 3,
                "videoPlay": 3
            },
            "pageFansAdds": 23,                  // The number of new people who have liked your Page.
            "pageFanAddsByPaidNonPaidUnique": {
                "total": 0,
                "paid": 0,
                "unpaid": 0
            },
            "pageFanAddsUnique": 0,
            "pageFanRemoves": 1,                 // Unlikes of your Page.
            "pageFanRemovesUnique": 0,
            "pageFans": 556,                     // The total number of people who have liked your Page.
            "pageFansCity": {                    // Aggregated Facebook location data, sorted by city (top 50), about the people who like your Page. (Unique Users)
                "Seattle, United States of America": 1,
                "Ras al-Khaimah, United Arab Emirates": 1,
                "Mexico City, Mexica": 1,
                ...
            },
            "pageFansCountry": {        // Aggregated Facebook location data, sorted by country (top 50), about the people who like your Page. (Unique Users)
                "BD": 1,
                "EG": 1,
                 ...
            },
            "pageFansGenderAge": {     // Aggregated demographic data about the people who like your Page based on the age and gender information they provide in their user profiles. (Unique Users)
                "M.25-34": 92,
                "F.13-17": 1,
                "M.55-64": 1,
                ...
            },
            "pageFansLocale": {        // Aggregated language data about the people who like your Page based on the default language setting selected when accessing Facebook. (Unique Users)
                "bn_IN": 3,
                "es_LA": 6,
                "pa_IN": 1,
                ...
            },
            "pageFansOnlinePerDay": 214,      // The number of your fans who saw any posts on Facebook on a given day.
            "pageImpressionsByStoryType": {   // Total impressions of posts published by a friend about your Page by type.
                "checkin": 2,
                "coupon": 3,
                "event": 2,
                "fan": 9,
                "mention"; 5,
                "pagePost": 5,
                "quetion": 3,
                "userPost": 2,
                "other": 0
            },
            "pageImpressionsByStoryTypeUnique": {},
            "pageImpressionsFrequencyDistribution": {},
            "pageImpressionsNonviral": 1,    // The number of times any content from your Page entered a person's screen. This does not include content created about your Page with social information attached. Social information displays when a person's friend interacted with your Page, post or story. This includes when someone's friend likes or follows your Page, engages with a post, shares a photo of your Page and checks into your Page.
            "pageImpressionsNonviralUnique": 1,
            "pageImpressionsOrganicUniqueV2": 3, // The unique number of times any post or story content from your Page or about your Page entered a person's screen through unpaid distribution.
            "pageImpressionsOrganicV2": 2,    // The number of times any post or story content from your Page or about your Page entered a person's screen through unpaid distribution.
            "pageImpressions": 160,           // The number of times any content from your Page or about your Page entered a person's screen. This includes posts, stories, ads, as well other content or information on your Page.
            "pageImpressionsPaidUnique": 0,   // The number of times any post or story content from your Page or about your Page entered a person's screen through paid distribution such as an ad.
            "pageImpressionsUnique": 0,       // Unique number of impressions.
            "pageImpressionsViral": 0,        // The number of times any content from your Page or about your Page entered a person's screen with social information attached. Social information displays when a person's friend interacted with your Page, post or story. This includes when someone's friend likes or follows your Page, engages with a post, shares a photo of your Page and checks into your Page.
            "pageImpressionsPaid": 23,        // The number of times any post or story content from your Page or about your Page entered a person's screen through paid distribution such as an ad.
            "pageNegativeFeedback": 0,        // The number of times people took a negative action in your post (e.g. hid it).
            "pageNegativeFeedbackByType": {}, // The number of times people took a negative action in your post broken down by type.
            "pagePostEngagements": 20,        // The number of times people have engaged with your posts through reactions, comments, shares and more.
            "pagePostsImpressions": 124,      // The number of times your Page's posts entered a person's screen. Posts include statuses, photos, links, videos and more.
            "pagePostsImpressionsPaid": 34,   // The number of times your Page's posts entered a person's screen through paid distribution such as an ad.
            "pagePostsImpressionsPaidUnique": 22, // The number of unqiue paid post impressions
            "pagePostsImpressionsUnique": 23, // The number of unique impressions.
            
            // --- Page Video Data ---
            "pageVideoCompleteViews30s": 32,  // The number of times your Page's videos played for at least 30 seconds, or for nearly their total length if they're shorter than 30 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video.
            "pageVideoCompleteViews30sAutoplayed": 19, // Autoplayed 30s complete.
            "pageVideoCompleteViews30sClickToPlay": 5, // Click to play 30s complete.
            "pageVideoCompleteViews30sOrganic": 23, // Organic 30s complete.
            "pageVideoCompleteViews30sPaid": 2,     // Paid 30s complete.
            "pageVideoCompleteViews30sRepeatViews": 3, // Repeat 30s complete.
            "pageVideoCompleteViews30sUnique": 3,   // Unique 30s complete.
            "pageVideoRepeatViews": 4,        // The number times of repeat views.
            "pageVideoViewTime": 10232,       // The total time, in milliseconds, people viewed your Page's video.
            "pageVideoViews": 31,             // The number of times your Page's videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. During a single instance of a video playing, we'll exclude any time spent replaying the video.
            "pageVideoViewsOrganic": 32,      // The number of organic video views.
            "pageVideoViewsPaid": 6,          // The number of times your Page's promoted videos played for at least 3 seconds, or for nearly their total length if they're shorter than 3 seconds. For each impression of a video, we'll count video views separately and exclude any time spent replaying the video.
            
            "pageVideoViewsByPaidNonPaid": {  // Breakdown of view views by paid and non-paid
                "total": 32,
                "unpaid": 5,
                "paid": 27
            },
            "reactions": {                    // Total over past 180 days
                "like": 1,         // Like reactions - The "like" reaction counts include both "like" and "care" reactions.
                "love": 1,         // Love reactions
                "anger": 1,        // Anger reactions
                "haha": 1,         // Haha reactions
                "wow": 1,          // Wow reactions
                "sorry": 1,        // Sorry reactions
                "total": 6         // Total number of reactions
            },
            "unreadMessageCount": 12 // Total unread FB Messages - if applicable
            "username": "ayrshare",
            "verified": true,      // verified Facebook Page
            "website": "https://www.theGoodone.com"
        },
        "quarters": 4,
        "lastUpdated": "2024-04-25T21:28:10.877Z",
        "nextUpdate": "2024-04-25T21:39:10.877Z"
    },
    // See deprecated fields https://docs.ayrshare.com/additional-info/upcoming-api-changes#changes-in-effect-february-17-2023
    "gmb": {
        "analytics":
        {
            "businessBookings": 0,                    // The number of bookings received from the business profile.
            "businessConversations": 0,               // The number of message conversations received on the business profile.
            "businessDirectionRequests": 328,         // The number of times a direction request was requested to the business location.
            "businessFoodOrders": 0,                  // The number of food orders received from the business profile.
            "businessImpressionsDesktopMaps": 153,    // Business impressions on Google Maps on Desktop devices. Multiple impressions by a unique user within a single day are counted as a single impression.
            "businessImpressionsDesktopSearch": 9675, // Business impressions on Google Search on Desktop devices. Multiple impressions by a unique user within a single day are counted as a single impression.
            "businessImpressionsMobileMaps": 65,      // Business impressions on Google Maps on Mobile devices. Multiple impressions by a unique user within a single day are counted as a single impression.
            "businessImpressionsMobileSearch": 2070,  // Business impressions on Google Search on Mobile devices. Multiple impressions by a unique user within a single day are counted as a single impression.
            "callClicks": 2,                          // The number of times the business profile call button was clicked.
            "websiteClicks": 134                      // The number of times the business profile website was clicked.
        },
        "lastUpdated": "2024-04-25T21:28:10.877Z",
        "nextUpdate": "2024-04-25T21:39:10.877Z"
    },
    "instagram": {
        // See specific time ranges
        "analytics": {
            "audienceCity": {        // The cities of this profile's followers. Not available on IG Users with fewer than 100 followers.
                "Sydney, New South Wales": 2,
                "London, England": 2,
                "Bridgewater, New Jersey": 1,
                "Puli, Nantou": 1,
                ...
            },
            "audienceCountry": {    // The countries of this profile's followers. Not available on IG Users with fewer than 100 followers.
                "TW": 1,
                "HK": 5,
                "SG": 1,
                "AU": 2,
                ...
            },
            "audienceGenderAge": {  // The gender and age distribution of this profile's followers. Not available on IG Users with fewer than 100 followers.
                "F.18-24": 1,
                "F.25-34": 6,
                "F.35-44": 13,
                "F.45-54": 16,
                ...
            },
            "biography": "What to watch next? Get recommendations from your friends.",
            "commentsCount": 6,             // Total comments of the past 500 posts
            "emailContactsCount": 2,
            "followersCount": 2,            // Current total of followers - must have at least 100 followers to show
            "followsCount": 19,             // Current total of users followed
            "id": "17941424040207809",
            "igId": 24372260340,
            "impressionsCount": 1,          // 180 day period - Total number of times the IG User's media have been viewed
            "likeCount": 116,               // Total like of the past 500 posts
            "mediaCount": 266,              // Current total of media posted
            "name": "theGoodone",
            "phoneCallClicksCount": 4,      // 180 day period - Total number of taps on the call link in the IG user's profile
            "profilePictureUrl": "https://scontent.fphl1-1.fna.fbcdn.net/v/t51.2885-15/74638883_536953567098493_7984001172816003072_n.jpg?_nc_cat=102&ccb=1-5&_nc_sid=86c713&_nc_ohc=krzDDPMjIZQAX-m1PsT&_nc_ht=scontent.fphl1-1.fna&edm=AL-3X8kEAAAA&oh=00_AT9uZhfkQyHWuThTgktvXxB8XEK_xV1_z72frRwtyGwHTA&oe=6246E46D",
            "profileViewsCount": 102,       // 180 day period - Total number of users who have viewed the IG user's profile
            "reachCount": 1,                // 180 day period - Total number of unique users who have viewed at least one media
            "textMessageClicks": 5,         // 180 day period - Total number of taps on the text message link in the IG user's profile
            "username": "thegoodone",
            "website": "https://www.mywebsite.com/",
            "websiteClicksCount": 101       // 180 day period - Total number of taps on the website link in the IG User's profile
        },
        "lastUpdated": "2022-05-09T00:52:30.530Z",
        "nextUpdate": "2022-05-09T02:07:30.530Z"
    },
    "linkedin": {
        // Lifetime analytics since start of account
        // The likeCount and commentCount fields do not count likes or comments made by companies, including the company that authored the share and are not decremented when a like or comment is deleted.
        "analytics": {
            "clickCount": 10,
            "clicks": {                        // Only available for organizations that have career pages. This is a paid product.
                "mobileCareersPageClicks": {
                    "careersPageJobsClicks": 2,
                    "careersPagePromoLinksClicks": 0,
                    "careersPageEmployeesClicks": 0
                },
                "careersPageClicks": {
                    "careersPagePromoLinksClicks": 5,
                    "careersPageBannerPromoClicks": 0,
                    "careersPageJobsClicks": 0,
                    "careersPageEmployeesClicks": 3
                }
            },
            "commentCount": 12,
            "commentMentionsCount": 2,         // Number of mentions of the company in a comment across LinkedIn.
            "engagement": 0.06060606060606061, // Number of organic clicks, likes, comments, and shares over impressions.
            "followers": {
                "organicFollowerCount": 7,
                "paidFollowerCount": 2,
                "totalFollowerCount": 12 // Total numuber might be higher than organic + paid. For total use this field.
            },
            "impressionCount": 264,
            "likeCount": 6,                    // Number of likes. This field can become negative when members who liked a sponsored share later unlike it. 
            "shareCount": 3,                   // Number of mentions of the company in a share across LinkedIn
            "shareMentionsCount": 3,
            "uniqueImpressionsCount": 51,
            "views": {
                "aboutPageViews": 2,
                "allDesktopPageViews": 8,
                "allMobilePageViews": 8,
                "allPageViews": 16,
                "careersPageViews": 0,        // Only available for organizations that have career pages
                "desktopAboutPageViews": 0,
                "desktopCareersPageViews": 0,
                "desktopInsightsPageViews": 0,
                "desktopJobsPageViews": 0,
                "desktopLifeAtPageViews": 0,
                "desktopOverviewPageViews": 8,
                "desktopPeoplePageViews": 0,
                "desktopProductsPageViews": 0,
                "insightsPageViews": 0,
                "jobsPageViews": 0,
                "lifeAtPageViews": 0,
                "mobileAboutPageViews": 2,
                "mobileCareersPageViews": 0,
                "mobileInsightsPageViews": 0,
                "mobileJobsPageViews": 0,
                "mobileLifeAtPageViews": 0,
                "mobileOverviewPageViews": 6,
                "mobilePeoplePageViews": 0,
                "mobileProductsPageViews": 0,
                "overviewPageViews": 14,
                "peoplePageViews": 0,
                "productsPageViews": 0
            }
        },
        "lastUpdated": "2022-05-09T00:52:30.530Z",
        "nextUpdate": "2022-05-09T02:07:30.530Z"
    },
    "pinterest": {
        // 90 days summary and daily details, board analytics full history
        "analytics": {
            "board": {
                "boardPinsModifiedAt": "2023-03-14T22:32:06Z",
                "collaboratorCount": 0,
                "createdAt": "2019-03-07T22:02:22Z",
                "description": "",
                "followerCount": 24,
                "id": "4299544013183293",
                "media": {
                    "pinThumbnailUrls": [
                        "https://i.pinimg.com/150x150/62/08/8b/62088b44a6152de7198efd3c2bc5c0.jpg",
                        "https://i.pinimg.com/150x150/ac/b7/c9/acb7c9f8096317180c20022e9b9b8a.jpg",
                        "https://i.pinimg.com/150x150/5a/d7/56/5ad756fb64a688934bd06853dff3a2.jpg",
                        "https://i.pinimg.com/150x150/5a/d7/56/5ad755db64a688934bd06853dff3a2.jpg",
                        "https://i.pinimg.com/150x150/a9/22/b6/a922ef5289639b617c24704d806998.jpg"
                    ],
                    "imageCoverUrl": "https://i.pinimg.com/400x300/f8/ec/14/f8ec14e7770a53b2e3595773564950.jpg"
                },
                "name": "Places to Retire",
                "pinCount": 64,
                "privacy": "PUBLIC",
                "username": "glueUp"
            },
            "clickthrough": 23,
            "clickthroughRate": 0.34,
            "closeup": 3,
            "closeupRate": 0.43,
            "engagement": 54,
            "engagementRate": 0.43,
            "fullScreenPlay": 23,
            "fullScreenPlaytime": 42,
            "impression": 12231,
            "outboundClick": 256,
            "outboundClickRate": 0.0.23,
            "pinClick": 32,
            "pinClickRate": 0.23,
            "quartile95PercentView": 42,
            "save": 45,
            "saveRate": 23,
            "video10sView": 902,
            "videoAvgWatchTime": 234,
            "videoMrcView": 23,
            "videoStart": 34,
            "videoV50WatchTime": 343,
            "daily": [
                {
                    "date": "2021-09-28",
                    "metrics": {
                        "SAVE_RATE": 0,
                        "OUTBOUND_CLICK_RATE": 0,
                        "IMPRESSION": 0,
                        "CLOSEUP_RATE": 0,
                        "ENGAGEMENT_RATE": 0,
                        "VIDEO_10S_VIEW": 0,
                        "VIDEO_AVG_WATCH_TIME": 0,
                        "ENGAGEMENT": 0,
                        "CLOSEUP": 0,
                        "FULL_SCREEN_PLAY": 0,
                        "SAVE": 0,
                        "PIN_CLICK_RATE": 0,
                        "OUTBOUND_CLICK": 0,
                        "VIDEO_MRC_VIEW": 0,
                        "VIDEO_V50_WATCH_TIME": 0,
                        "QUARTILE_95_PERCENT_VIEW": 0,
                        "VIDEO_START": 0,
                        "CLICKTHROUGH": 0,
                        "PIN_CLICK": 0,
                        "CLICKTHROUGH_RATE": 0,
                        "FULL_SCREEN_PLAYTIME": 0
                    }
                },
                ...
            ]
        },
        "lastUpdated": "2022-05-09T00:52:30.530Z",
        "nextUpdate": "2022-05-09T02:07:30.530Z"
    },
    "reddit": {
        // Lifetime analytics since start of account
        "analytics": {
            "acceptFollowers": true,
            "awardeeKarma": 20,
            "awarderKarma": 0,
            "commentKarma": 233,
            "created": "2010-04-04T15:21:45.000Z",
            "hasSubscribed": true,
            "hasVerifiedEmail": true,
            "hideFromRobots": false,
            "iconImg": "https://styles.redditmedia.com/t5_emxgy/styles/",
            "id": "3zaxa",
            "isBlocked": false,
            "isEmployee": false,
            "isFriend": false,
            "isGold": false,
            "isMod": false,
            "linkKarma": 2989,
            "name": "ayrshare",
            "profileImageSize": [
                380,
                600
            ],
            "profileImageUrl": "https://i.redd.it/snoovatar/avatars/25fc-4186--fa8bd6ac94a2.png",
            "totalKarma": 3242,
            "url": "https://www.reddit.com/user/ayrshare",
            "verified": true
        },
        "lastUpdated": "2022-11-09T04:14:46.985Z",
        "nextUpdate": "2022-11-09T04:25:46.985Z"
    },
    "tiktok": {
        "analytics": {
            "audienceCountries": [    // Available 24-48 hours after posting. Must be an active post. See endpoint details.
                {
                    "percentage": 0.25,
                    "country": "NG"
                },
                {
                    "percentage": 0.75,
                    "country": "US"
                }
            ],
            "audienceGenders": [    // Available 24-48 hours after posting. Must be an active post. See endpoint details.
                {
                    "percentage": 0.25,
                    "gender": "Female"
                },
                {
                    "percentage": 0.5,
                    "gender": "Male"
                },
                {
                    "percentage": 0.25,
                    "gender": "Other"
                }
            ],
            "bio": "My tiktok account",
            "commentCountTotal": 33,        // Total comment count
            "displayName": "Me and You",
            "durationAverage": "10.72",     // Average video duration
            "followerCount": 34,            // Current follower count
            "followingCount": 39,           // Current following count
            "isVerified": false,            // Whether TikTok has provided a verified badge to the account after confirming that it belongs to the user it represents
            "likeCountTotal": 2,            // Current like count
            "shareCountTotal": 4,           // Total share count of posts
            "url": "https://vm.tiktok.com/ZTRuw5kM6/",
            "userImage": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f123c4b57351e266540b93baf07971fd~c5_168x168.jpeg?x-expires=1665860400&x-signature=CZlTZ2pEwcRzZnLorXCYunlKEWM%3D",
            "username": "@funnyone",
            "videoCountTotal": 18,           // Video total video count
            "viewCountTotal": 149            // Total views of videos
        },
        "lastUpdated": "2022-05-09T00:52:30.530Z",
        "nextUpdate": "2022-05-09T02:07:30.530Z"
    },
    "twitter": {
        // Lifetime analytics since start of handle
        "analytics": {
            "created": "2019-11-12T15:22:57Z",
            "description": "Tired of those frozen waffles for the kids? We're parents too and they just need to go! Wondrous Waffles are healthy, delicious, and take 1 minute to make.",
            "displayName": "wafflestime",
            "followersCount": 53,
            "friendsCount": 442,
            "id": 1184274338799881501,
            "location": "NYC",
            "name": "wafflestime",
            "profileImageUrl": "http://pbs.twimg.com/profile_images/1184274338799881501/lvQZPpt4_normal.png",
            "protected": false,
            "tweetCount": 290,           // The number of Tweets (including retweets) issued by the user
            "url": "https://t.co/2XqeJiBa1y",
            "username": "wafflestime",
            "verified": true,         // When true, indicates that the user has a verified account
            "verifiedType": "none",
            "website": "https://www.wondrouswaffles.com/"
        },
        "lastUpdated": "2022-05-09T00:52:30.530Z",
        "nextUpdate": "2022-05-09T02:07:30.530Z"
    },
    "youtube": {
        // Lifetime analytics since start of channel
        "analytics": {
            "averageViewDuration": 99,        // The average length, in seconds, of video playbacks. 
            "averageViewPercentage": 127.06,  // The average percentage of a video watched during a video playback.
            "comments": 8,
            "created": "2010-01-10T15:30:57Z",
            "description": "This is the channel you want",
            "dislikes": 1,                    // The number of times that users indicated that they disliked a video by giving it a negative rating.
            "estimatedMinutesWatched": 72,    // The number of minutes that users watched videos for the specified channel, content owner, video, or playlist.
            "hiddenSubscriberCount": false,   // Indicates whether the channel's subscriber count is publicly visible.
            "isLinked": true,
            "likes": 3,                       // The number of times that users indicated that they liked a video by giving it a positive rating
            "longUploadsStatus": "allowed",
            "playlistId": "UUsp6CnxiNbUUYKZwXQ",    // Primary playlist
            "playlists": [                          // All playlists associated with the connected channel
                {
                    "description": "Playlist 1",
                    "id": "PLcLpmVOb3fDaf7",
                    "publishedAt": "2022-10-21T21:05:55Z",
                    "title": "Super Playlist",
                    "url": "https://www.youtube.com/playlist?list=PLcLpmVOb3fDaf7"
                },
                {
                    "description": "Playlist 2",
                    "id": "FLsp6CnxiNbU",
                    "publishedAt": "2012-02-26T19:16:55Z",
                    "title": "Favorites",
                    "url": "https://www.youtube.com/playlist?list=FLsp6CnxiNbU"
                }
            ],
            "privacyStatus": "public",        // "public", "private", or "unlisted"
            "shares": 34,                     // The number of times that users shared a video through the Share button
            "subscriberCount": "67",          // The number of subscribers that the channel has.
            "subscribersGained": 34,          // The number of times that users subscribed to a channel.
            "subscribersLost": 2,             // The number of times that users unsubscribed from a channel.
            "thumbnailUrl": "https://yt3.ggpht.com/ytc/AMLnZu_lgyzY2EFDAP-no-rj",
            "title": "The Best Channel",
            "url": "https://www.youtube.com/@youtube53",    // The Channel URL using the custom handle
            "videoCount": "202",
            "videosAddedToPlaylists": 23,
            "videosRemovedFromPlaylists": 2,
            "viewCount": "5",                // The number of times the channel has been viewed.
            "views": 44                      // The number of video views
        },
        "quarters": 4,
        "lastUpdated": "2022-05-09T00:52:30.530Z",
        "nextUpdate": "2022-05-09T02:07:30.530Z"
    }
}

Request Examples

curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"platforms": ["facebook", "instagram", "twitter", "linkedin", "pinterest", "youtube", "tiktok"]}' \
-X POST https://app.ayrshare.com/api/analytics/social

User Profile Analytics

Get post analytics for a particular user profile by adding the PROFILE_KEY in the header.

Analytics Overview Video


POST Analytics by Social ID

POST https://app.ayrshare.com/api/analytics/post

Retrieve analytics for posts that did not originate via Ayrshare by providing the low-level social ID. This ID is returned in the postIds field of the /post endpoint.

Use the Get All Post History endpoint to retrieve posts and IDs originating outside of Ayrshare found in the id field.

The linked account must the owner of the post to retrieve the analytics. Support platforms: Facebook, Instagram, LinkedIn, TikTok, Twitter, and YouTube.

Recommend to only use for posts not sent via Ayrshare. Post post sent via Ayrshare, use the analytics endpoint.

Analytics on Instagram posts that were published before the user's account was converted to a business account from a personal account have limited analytics.

Available for Business Plan users only.

Headers

Request Body

{
    // See analytics response endpoint https://docs.ayrshare.com/rest-api/endpoints/analytics#analytics-on-a-post 

    // Note: Some metrics are not available for posts not owned by the authorized account.
    // For example: Twitter does not return non-public metrics or organic metrics for Tweets not sent by the authorized user.
}

Available for Business Plan users only.

Request JSON Example

{
    "id": "104923907983682_108329000309742", // Facebook Social ID
    "platforms": [
        "facebook"   // Select only one platform at a time: facebook, instagram, youtube, or twitter
    ],
    "searchPlatformId": true
}

Please see the /post endpoint Response 200 for an example of the Facebook ID 104923907983682_108329000309742


GET YouTube Playlists

GET https://app.ayrshare.com/api/analytics/youTubePlaylists

Get the YouTube playlists for the connected YouTube channel.

Headers

{
    "status": "success",
    "channelId": "UCsp6CnxiNbUU0AJtuYKZw",
    "playLists": [
        {
            "averageTimeInPlaylist": 2.2,
            "averageViewDuration": 3.1,
            "description": "A great list",
            "estimatedMinutesWatched": 21,
            "estimatedRedMinutesWatched": 23,
            "id": "PLcLpmVOb3fDaf7Mps",
            "playlistStarts": 23,
            "thumbNail": {
                "url": "https://i.ytimg.com/vi/default.jpg",
                "width": 120,
                "height": 90
            },
            "title": "Super Playlist",
            "views": 55,
            "viewsPerPlaylistStart": 32
        },
        {
            "averageTimeInPlaylist": 2,
            "averageViewDuration": 4.5,
            "description": "A great list 2",
            "estimatedMinutesWatched": 2,
            "estimatedRedMinutesWatched": 3,
            "id": "FLsp6CnxiNbUU0AJtu",
            "playlistStarts": 23,
            "thumbNail": {
                "url": "https://i.ytimg.com/vi/default.jpg",
                "width": 120,
                "height": 90
            },
            "title": "Favorites",
            "views": 20,
            "viewsPerPlaylistStart": 23
        }
    ],
    "lastUpdated": "2023-01-18T03:09:59.757Z",
    "nextUpdate": "2023-01-18T03:42:29.757Z"
}

Request Examples

curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/analytics/youTubePlaylists

GET Count of Instagram Followers Online

GET https://app.ayrshare.com/api/analytics/getInstagramOnlineFollowers

Retrieve the total historical count of your Instagram followers online per hour, which allows you to optimize posting for maximum engagement.

Not available on IG Users with fewer than 100 followers.

Analytics data only available for the last 30 days.

The time period for a requested day is the previous day at T07:00:00.000Z until the current day at T06:59:59.999Z in UTC. For example the input date of 2024-03-19 is 2024-03-18T07:00:00.000Z start and 2024-03-19T06:59:59.999Z end.

Query Parameters

Headers

{
    "status": "success",
    "onlineFollowersByHour": {
        "0": 120, // 12 AM
        "1": 113, // 1 AM
        "2": 117, // 2 AM
        "3": 110, // 3 AM
        "4": 129, // 4 AM
        "5": 170, // 5 AM
        "6": 166, // 6 AM
        "7": 173, // 7 AM
        "8": 177, // 8 AM
        "9": 168, // 9 AM
        "10": 178, // 10 AM
        "11": 160, // 11 AM
        "12": 154, // 12 PM
        "13": 153, // 1 PM
        "14": 131, // 2 PM
        "15": 118, // 3 PM
        "16": 109, // 4 PM
        "17": 128, // 5 PM
        "18": 129, // 6 PM
        "19": 134, // 7 PM
        "20": 123, // 8 PM
        "21": 111, // 9 PM
        "22": 102, // 10 PM
        "23": 98 // 11 PM
    },
    "startTime": "2024-03-29T07:00:00.000Z",
    "endTime": "2024-03-30T07:00:00.000Z"
}

Request Examples

curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03

GET https://app.ayrshare.com/api/analytics/links

Get shortened link analytics. Note, click counts could take up to an hour to reflect in the analytics data. Premium or Business Plan required.

Query Parameters

Headers

[
    {
        "linkEventStats": [
            {
                "count": "6",
                "event": "CLICK",
                "platform": "OTHER"
            },
            {
                "count": "1",
                "event": "CLICK",
                "platform": "IOS"
            }
        ],
        "link": "https://bookriot.com/book-riots-deals-of-the-day-for-september-27-2020/",
        "shortLink": "https://ayr.app/l/Nz3L",
        "created": {
            "_seconds": 1601215211,
            "_nanoseconds": 413000000
        },
        "clicks": 7        // Total click across platforms
    },
    {
        "linkEventStats": [
            {
                "count": "11",
                "event": "CLICK",
                "platform": "OTHER"
            },
            {
                "count": "2",
                "event": "CLICK",
                "platform": "IOS"
            }
        ],
        "link": "https://neilpatel.com/blog/reputation-management-agency/",
        "shortLink": "https://ayr.app/l/TSdN",
        "created": {
            "_seconds": 1601223003,
            "_nanoseconds": 7000000
        },
        "clicks": 13        // Total click across platforms
    }
]

Request Examples

curl \
-H "Authorization: Bearer API_Key" \
-H 'Content-Type: application/json' \
-X GET https://app.ayrshare.com/api/analytics/links?lastDays=2

Last updated