---
title: "Activity history"
method: GET
path: "/social-media/activity-history"
tags: ["Social Media"]
---

# Activity history

`GET /social-media/activity-history`

## Request

- Base URL: `https://api.ahrefs.com/v3`
- URL: `https://api.ahrefs.com/v3/social-media/activity-history`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ahrefs/apis/ahrefs-api/docs/social-media/activity-history/get.ts> (a function with typed inputs; its response is checked against the schema)

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

## Query parameters

- `post_id` integer, required
- `output` 'json' | 'csv' | 'xml' | 'php'

## Response `200`

OK

- SocialMediaActivityHistory
  - `activities` object[]
    - `action_type` string: The action that was performed on the post.
    - `activity_id` integer: Unique identifier for the activity history record.
    - `channel_id` string, nullable: Unique identifier for the social media channel.
    - `channel_kind` string, nullable: Social media platform and account type.
    - `created_at` string, date-time: Timestamp when the activity was recorded.
    - `user_name` string, nullable: Name of the user who performed the action.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Error

---

[API](https://skmtc.dev/ahrefs/apis/ahrefs-api.md) - [All operations](https://skmtc.dev/ahrefs/apis/ahrefs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ahrefs/apis/ahrefs-api/revisions/8fa3f7d9e40d?raw)
