Get Post Comments
Retrieves comments from a specific Instagram post with optional limits. Returns comment text, author information, timestamps, likes, and reply counts.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Session ID - The session identifier from the Login node.
- Post Shortcode - The post shortcode (e.g., "CxYz123") or full Instagram post URL.
- Max Comments - Maximum number of comments to retrieve. Set to
0to retrieve all comments.
Output
-
Comments - Array of comment objects, each containing:
comment_id- Unique comment identifiertext- Comment text contentauthor- Username of the comment authorauthor_id- User ID of the comment authorauthor_verified- Boolean indicating if author is verifiedlikes- Number of likes on the commentcreated_at- When the comment was posted (UTC)answers_count- Number of replies to this comment
-
Comment Count - Total number of comments retrieved.
How It Works
The Get Post Comments node fetches comments from a specific post. When executed, it:
- Validates the Session ID and Post Shortcode/URL
- Extracts the shortcode from the URL if a full URL was provided
- Retrieves the post using the Instagram API
- Iterates through the post's comments
- Extracts comment data including author details and engagement metrics
- Stops when Max Comments limit is reached or all comments are retrieved
- Returns the comments array and count
Requirements
- An active Instagram session (from Login node)
- A valid post shortcode or Instagram post URL
- The post must exist and have comments enabled
- Appropriate permissions to view the post
Error Handling
The node will return specific errors in the following cases:
- ErrInvalidArg - Post shortcode/URL is missing or empty
- ErrNotFound - Post does not exist or was deleted
- ErrRuntime - General failure to retrieve comments
Common Errors
Post Not Found:
Post with shortcode 'CxYz123' not found
Solution: Verify the shortcode is correct and the post still exists.
No Comments: If a post has no comments, the node returns an empty array (not an error).
Usage Notes
- Comments are typically returned in chronological order
- The node retrieves top-level comments; replies are indicated by
answers_count - Setting Max Comments to 0 retrieves all comments (may be slow for viral posts)
- Verified authors are marked with the
author_verifiedflag - Comment likes provide engagement insights
- Posts with thousands of comments may take time to process
- Some posts have comments disabled; this returns an empty array
Example: Sentiment Analysis
Inputs:
- Session ID: (from Login node)
- Post Shortcode: "CxYz123"
- Max Comments: 100
Output Sample:
{
"comments": [
{
"comment_id": "17901234567890123",
"text": "This is amazing! 😍",
"author": "user_fan",
"author_id": "123456789",
"author_verified": false,
"likes": 42,
"created_at": "2024-01-15T15:30:00+00:00",
"answers_count": 3
},
{
"comment_id": "17901234567890124",
"text": "Great content as always! Keep it up 👏",
"author": "influencer_pro",
"author_id": "987654321",
"author_verified": true,
"likes": 156,
"created_at": "2024-01-15T15:45:00+00:00",
"answers_count": 0
}
],
"comments_count": 100
}
Example: Audience Analysis
Workflow:
Get Post Comments (max: 500)
↓
Analyze comments:
- Count verified vs non-verified authors
- Calculate average likes per comment
- Extract common keywords
- Identify top commenters
↓
Generate engagement report
Example: Brand Mention Tracking
Workflow:
Get Profile Posts (competitor)
↓
For each post:
Get Post Comments (max: 100)
↓
Filter comments containing "@yourbrand" or "yourbrand"
↓
If brand mentioned:
Send notification
Log comment details
Example: User Engagement Detection
Workflow:
Get Post Comments (your_post, max: 0)
↓
For each comment:
If answers_count > 0:
Mark as conversation starter
If author_verified:
Prioritize for response
If likes > 10:
Mark as popular opinion
Best Practices
- Use reasonable Max Comments limits to balance data collection and performance
- For viral posts (1000+ comments), use pagination or limits
- Check
author_verifiedto identify influential commenters - Monitor
answers_countto find conversation threads - Track comment
likesto identify popular opinions - Extract keywords from comment text for sentiment analysis
- Store comment data to track engagement over time
- Handle posts with comments disabled (empty array) gracefully
Tips for Effective Use
- Engagement Quality: High-like comments often represent popular opinions
- Influencer Engagement:
author_verifiedhelps identify celebrity/influencer interactions - Conversation Threads:
answers_count > 0indicates active discussions - Sentiment Analysis: Process comment text to gauge audience sentiment
- Spam Detection: Look for repetitive text or suspicious patterns
- Response Priority: Sort by likes or verified status to prioritize responses
- Keyword Extraction: Mine comments for product feedback and suggestions
- Timing Analysis: Use
created_atto study comment timing patterns
Common Use Cases
- Sentiment Analysis - Gauge audience reaction to posts
- Customer Feedback - Collect product opinions and suggestions
- Brand Monitoring - Track brand mentions in comments
- Influencer Identification - Find verified users engaging with content
- Crisis Management - Monitor negative comments in real-time
- Engagement Research - Study comment patterns and conversation starters
- Competitor Analysis - Analyze competitor audience sentiment
- User-Generated Content - Find customers sharing experiences
Comment Analysis Metrics
Key Metrics to Calculate:
- Comment Rate:
comments_count / post_likes(shows discussion level) - Average Comment Likes: Sum of
likes/comments_count - Verified Engagement: Count of
author_verified == true - Conversation Rate: Count of
answers_count > 0/ total comments - Top Commenters: Group by
authorand count frequency
Example: Comprehensive Comment Analysis
Workflow:
Get Post Comments (max: 0)
↓
Calculate:
- Total comment count
- Average likes per comment
- Verified commenter percentage
- Comments with replies percentage
↓
Text Analysis:
- Extract emojis and frequency
- Identify positive/negative keywords
- Find brand/product mentions
↓
Author Analysis:
- List top commenters by frequency
- Identify verified contributors
- Find potential brand advocates
Performance Considerations
- Retrieving all comments from viral posts (10,000+ comments) can take several minutes
- Use Max Comments to limit processing time
- Popular posts may have thousands of comments
- Consider processing comments in batches for large volumes
- Add delays when processing comments from multiple posts
- Cache comment data to avoid repeated API calls
Working with Comment Replies
The answers_count field indicates how many replies a comment has received. To retrieve comment replies, you would need to:
- Identify comments with
answers_count > 0 - Use a separate API call to fetch replies (not included in this node)
- Note that this node retrieves top-level comments only
Important Notes
- Top-Level Only: This node retrieves main comments, not nested replies
- Comment Order: Comments are typically in chronological or relevance order
- Deleted Comments: Deleted comments won't appear in results
- Disabled Comments: Posts with disabled comments return empty arrays
- Rate Limiting: Large comment volumes may trigger rate limits
- Author Privacy: Private account authors may have limited information
- Real-Time: Comments reflect the state at the time of request