Fetch Top Comments
warning
Comment management is not available on the Starter plan. Upgrade to Intermediate, Growth or Business plan to access this endpoint.
Overview
The Fetch Top Comments endpoint returns posts with their comments and child comments, sorted by the specified filter. This is useful for retrieving recent activity and engaging with your audience.
Base URL:
https://feed.oneupapp.io
Endpoint
GET /api/fetch-top-comments
Request Parameters
| Parameter | Required | Description |
|---|---|---|
apiKey | Yes | Your personal API key generated from the API Access page. |
filter | No | Sort order: recent_comment (default), latest, or oldest. |
next_id | No | Offset for pagination. Omit or 0 for the first page. |
Filters
| Filter | Description |
|---|---|
recent_comment | Posts with newest non-owner comments first (excludes posts with only owner comments). Default. |
latest | Posts ordered by publish date, newest first. |
oldest | Posts ordered by publish date, oldest first. |
Sample Request
curl --location --request GET \
"https://feed.oneupapp.io/api/fetch-top-comments?apiKey=YOUR_API_KEY"
With filter:
curl --location --request GET \
"https://feed.oneupapp.io/api/fetch-top-comments?apiKey=YOUR_API_KEY&filter=latest"
With pagination:
curl --location --request GET \
"https://feed.oneupapp.io/api/fetch-top-comments?apiKey=YOUR_API_KEY&filter=oldest&next_id=5"
Sample Response
{
"message": "OK",
"error": false,
"data": [
{
"post": {
"id": 1,
"social_account_id": "104040148726689",
"platform": "facebook",
"post_id": "104040148726689_123456",
"title": null,
"content": "Post content...",
"media_url": null,
"permalink_url": "https://...",
"metadata": {},
"published_at": "2025-01-01T00:00:00.000000Z",
"is_complete": false,
"is_meta_ads": false
},
"comments": [
{
"platform": "facebook",
"post_id": "104040148726689_123456",
"comment_id": "123",
"child_count": 2,
"user_id": "456",
"user_name": "John Doe",
"profile_picture": "https://...",
"content": "Comment text...",
"bg_color": "#000000",
"has_replied": false,
"metadata": {},
"can_comment": true,
"published_at": "2025-01-01T12:00:00.000000Z",
"is_complete": false,
"child_comments": [
{
"platform": "facebook",
"post_id": "104040148726689_123456",
"comment_id": "789",
"child_count": 0,
"user_id": "104040148726689",
"user_name": "My Page",
"profile_picture": "https://...",
"content": "Reply text...",
"bg_color": "#ffffff",
"has_replied": false,
"metadata": {},
"can_comment": true,
"published_at": "2025-01-01T12:05:00.000000Z",
"is_complete": false
}
]
}
]
}
],
"next_id": 5
}
Pagination
Use the next_id value from the response as the next request's next_id parameter. Returns null when there are no more results.
Response Fields
Post Object
| Field | Description |
|---|---|
id | Internal post ID. |
social_account_id | The social account ID that owns the post. |
platform | The platform name (e.g., facebook, instagram). |
post_id | The platform-specific post ID. |
title | The post title (if applicable). |
content | The text content of the post. |
media_url | URL to the post media (if applicable). |
permalink_url | Permanent URL to the post on the platform. |
metadata | Additional metadata object. |
published_at | ISO 8601 timestamp of when the post was published. |
is_complete | Whether the comment is marked as complete in the UI. |
is_meta_ads | Whether the post is a Meta ads post. |
Comment Object
| Field | Description |
|---|---|
platform | The platform name. |
post_id | The platform-specific post ID. |
comment_id | The platform-specific comment ID. |
child_count | Number of replies to this comment. |
user_id | The commenter's user ID on the platform. |
user_name | The commenter's display name. |
profile_picture | URL to the commenter's profile picture. |
content | The comment text. |
bg_color | Background color for the comment. |
has_replied | Whether the account has replied to this comment. |
metadata | Additional metadata object. |
can_comment | Whether a reply can be posted to this comment. |
published_at | ISO 8601 timestamp of when the comment was published. |
is_complete | Whether the comment is marked as complete in the UI. |
child_comments | Array of child Comment Objects (replies). |
✅ Result: You have successfully retrieved posts with their comments!