Analytics
Analytics on a Post by Social ID
Get real-time analytics for posts using the Social Post ID
POST
Retrieve analytics for posts that did not originate via Ayrshare by providing the low-level Social Post ID. This ID is returned in theDocumentation Index
Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
postIds field of the /post endpoint.
The linked account must be the owner of the post to retrieve the analytics (exception: YouTube; see below). Support platforms: Facebook, Instagram, LinkedIn, Threads, TikTok, Twitter, and YouTube.
- The call is the same as the Analytics on a Post endpoint. The key
difference is you use the post id return by the social network instead of the Ayrshare ID. Also
include the
searchPlatformId: trueparameter to notify the endpoint you’re searching by the Social Post ID. - Use the Get All Post History endpoint to retrieve posts and IDs
originating outside of Ayrshare found in the
idfield. - Recommend to only use for posts not sent via Ayrshare. For posts 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.
- If retrieving YouTube analytics for a post that doesn’t belong to your channel using the social ID method, the API will return descriptive metadata about the content while showing zeros for all numerical metrics. Descriptive information such as title, description, tags, channel title, privacy status, and thumbnail URLs will be correctly populated, providing context about the video content. However, all numerical performance metrics including views, likes, comments, shares, subscriber changes, watch time, and playlist additions will return as zero values.
- When using
postIdsfor X/Twitter threads, each tweet’s Social Post ID must be provided individually, thread tweets are not automatically included when querying the parent post.
Header Parameters
Body Parameters
Either
id or postIds must be provided. Use id for a single post or postIds for retrieving analytics on multiple posts in a single request.Social Post ID returned from the /post
endpoint. This is the
id field for an individual social network found in the
postIds array. Either id or postIds is required.Array of Social Post IDs to retrieve analytics for multiple posts in a single request. Maximum of 100 IDs allowed. Either
id or postIds is required.String array of platforms to retrieve analytics. Only one value is allowed.Available values:
Set to
true to search by the Social Post ID.When cumulative metrics (e.g., likes, comments, views) are temporarily unavailable from the social network, the API automatically backfills them from stored data. Two optional fields may appear in the per-platform
analytics object:backfilledFrom(string, ISO 8601) — Present when one or more cumulative metrics were substituted from stored data. The timestamp indicates when the stored data was last updated.recoveredFrom(string, ISO 8601) — Present when the entire analytics response was recovered from stored data due to a complete API failure. The timestamp indicates when the stored data was last updated.
