Get aggregate stats
get_post_aggregate_statsRetrieve aggregate post statistics for a Beehiiv publication, filtered by status, audience, platform, authors, content tags, or feed visibility.
Instructions
Get aggregate stats. Reads account data. OAuth integrations require posts:read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Optionally filter the results by the status of the post. `draft` - not been scheduled. `confirmed` - The post will be active after the `scheduled_at`. `archived` - The post is no longer active. `all` - Does not restrict results by status. | all |
| account | No | Named private account from BEEHIIV_ACCOUNTS. Defaults to BEEHIIV_DEFAULT_ACCOUNT or the first configured account. | |
| authors | No | Optionally filter posts by their authors. Adding an author name will return any post with that author associated to it (case-insensitive). Example: Filtering for `authors: ["John Doe","Jane Smith"]` will return results of posts that have *either* John Doe or Jane Smith as authors. | |
| audience | No | Optionally filter the results by audience | all |
| platform | No | Optionally filter the results by platform. `web` - Posts only published to web. `email` - Posts only published to email. `both` - Posts published to email and web. `all` - Does not restrict results by platform. | all |
| content_tags | No | Optionally filter posts by content_tags. Adding a content tag will return any post with that content tag associated to it. Example: Filtering for `content_tags: ["sales","closing"]` will return results of posts that have *either* sales or closing content_tags. | |
| publication_id | Yes | The prefixed ID of the publication object | |
| hidden_from_feed | No | Optionally filter the results by the `hidden_from_feed` attribute of the post. `all` - Does not restrict results by `hidden_from_feed`. `true` - Only return posts hidden from the feed. `false` - Only return posts that are visible on the feed. | all |