Skip to main content

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

ParameterRequiredDescription
apiKeyYesYour personal API key generated from the API Access page.
filterNoSort order: recent_comment (default), latest, or oldest.
next_idNoOffset for pagination. Omit or 0 for the first page.

Filters

FilterDescription
recent_commentPosts with newest non-owner comments first (excludes posts with only owner comments). Default.
latestPosts ordered by publish date, newest first.
oldestPosts 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

FieldDescription
idInternal post ID.
social_account_idThe social account ID that owns the post.
platformThe platform name (e.g., facebook, instagram).
post_idThe platform-specific post ID.
titleThe post title (if applicable).
contentThe text content of the post.
media_urlURL to the post media (if applicable).
permalink_urlPermanent URL to the post on the platform.
metadataAdditional metadata object.
published_atISO 8601 timestamp of when the post was published.
is_completeWhether the comment is marked as complete in the UI.
is_meta_adsWhether the post is a Meta ads post.

Comment Object

FieldDescription
platformThe platform name.
post_idThe platform-specific post ID.
comment_idThe platform-specific comment ID.
child_countNumber of replies to this comment.
user_idThe commenter's user ID on the platform.
user_nameThe commenter's display name.
profile_pictureURL to the commenter's profile picture.
contentThe comment text.
bg_colorBackground color for the comment.
has_repliedWhether the account has replied to this comment.
metadataAdditional metadata object.
can_commentWhether a reply can be posted to this comment.
published_atISO 8601 timestamp of when the comment was published.
is_completeWhether the comment is marked as complete in the UI.
child_commentsArray of child Comment Objects (replies).

Result: You have successfully retrieved posts with their comments!