Social Media

Posts

Requests to this endpoint are free and do not consume any API units.

get/social-media/posts

Request

  • Base URL
    https://api.ahrefs.com/v3
  • URL
    https://api.ahrefs.com/v3/social-media/posts
  • Auth
    HTTP bearer

Query parameters

status'published' | 'scheduled' | 'draft' | 'failed' | 'deleted' required

The publishing lifecycle stage of the post.

channel_idsstring

Comma-separated list of channel IDs to filter by.

author_idsstring

Comma-separated list of author user IDs to filter by.

search_querystring

Text search query to filter posts by content.

date_fromstring date

The start date of the historical period in YYYY-MM-DD format.

date_tostring date

The end date of the historical period in YYYY-MM-DD format.

order_by'date' | 'views' | 'unique_views' | 'comments' | 'likes'

Sort field for posts. Metric-based sorting only applies to published posts.

order_direction'asc' | 'desc'

The order in which results are returned, ascending or descending.

limitinteger

The number of results to return.

offsetinteger

The number of results to skip.

output'json' | 'php'

The output format.

Response

OK

Changes

No recorded changes to this operation across all 26 revisions of this API.