comments
Comments
This endpoint allows the client to retrieve all comments belonging to an article or podcast episode as threaded conversations.
Threaded Structure & Pagination Tips:
- Threaded Format: Comments are returned as a tree structure (nested arrays of replies). Each top-level comment contains its nested child comments recursively.
- Query Constraints: You must provide either a_id (Article ID) OR p_id (Podcast Episode ID) to fetch comments. Specifying both is not supported.
- Pagination: When paginating, the page parameter filters the top-level comments only. All replies to those top-level comments are returned nested inline, regardless of page index.
- If the page parameter is omitted, the response returns the full comment tree in a single payload.
get/api/comments
Query parameters
pageinteger
Pagination page
per_pageinteger
Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
a_idstring
Article identifier. Provide this to fetch comments belonging to a specific article.
p_idstring
Podcast Episode identifier. Provide this to fetch comments belonging to a specific podcast episode.
pagestring
Pagination page index for top-level comments.
Response
A List of Comments