Receive chart data of search stats in the given date range and filters for the post.
| Permission | Description |
|---|---|
posts.view | View data reports for your own post |
posts.view_all | View data reports for all posts |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| post-id | int | Yes | ID of the post | 42 |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| start_date | string | No | Start of date range (YYYY-MM-DD) | "2024-01-01" |
| end_date | string | No | End of date range (YYYY-MM-DD) | "2024-01-31" |
| group_by | string | No | How to group the chart data: "day", "week", "month" | "day" |
GET /api/v1/posts/42/search-stats?group=day&start_date=2024-01-01&end_date=2024-01-31
Authorization: Bearer {token}
Returns chart data.
{
"labels": ["2025-01", "2025-02", "2025-03"],
"data": {
"views": [1200, 800, 1000],
"clicks": [50, 60, 80],
}
}
| Status | Description | Reference |
|---|---|---|
| 401 | Unauthorized | Authentication error |