Posts History for a Platform
History of Sent Posts for a Platform, including posts that did not originate via Ayrshare
You can retrieve posts and analytics from social media platforms (Facebook, Instagram, LinkedIn, Pinterest, TikTok, X/Twitter, and YouTube), regardless of whether they were originally created through Ayrshare or posted directly on the platforms. More detailed analytics are available with the analytics endpoint.
The IDs returned in from this endpoint are the social networks’ native social post ID and not the Ayrshare post ID. This allows you to get details for any post on a social network, even if it was not created through Ayrshare. For example, you can retrieve a post that was manually published on facebook.com and use the social post Facebook ID returned to get comments or analytics.
If you do not need posts that originated outside of Ayrshare, simply use the Ayrshare post ID returned in a post with the comment, analytics, or history endpoints.
:platform
= facebook
, instagram
, linkedin
, pinterest
, tiktok
, twitter
, youtube
.
Example: https://api.ayrshare.com/api/history/instagram
The Instagram mediaUrl
field is omitted from response if the media contains copyrighted material
or has been flagged for a copyright violation. Examples of copyrighted material can include audio
on reels. You can check in the Instagram app under Settings -> Account Status.
Header Parameters
Path Parameters
The platform of the posts to retrieve. Values: facebook
, instagram
,
linkedin
, pinterest
, tiktok
, twitter
,
youtube
Query Parameters
Number of history records to return. Max: 300.
Skip gathering full analytics for Facebook Pages and Instagram. Returns only the social ID. Should be used if analytics aren’t needed, for a faster return, or errors occur when limit > 100.
Facebook only. By default the posts returned are from the Facebook Page feed. You may also choose to only return posts published by the page.
Use feed (default) when you want a more comprehensive view of all content associated with the page, including interactions from other users. Use pagePublished
when you only want to retrieve posts made by the page itself.