Skip to main content

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.
info

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 0 to retrieve all comments.

Output

  • Comments - Array of comment objects, each containing:

    • comment_id - Unique comment identifier
    • text - Comment text content
    • author - Username of the comment author
    • author_id - User ID of the comment author
    • author_verified - Boolean indicating if author is verified
    • likes - Number of likes on the comment
    • created_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:

  1. Validates the Session ID and Post Shortcode/URL
  2. Extracts the shortcode from the URL if a full URL was provided
  3. Retrieves the post using the Instagram API
  4. Iterates through the post's comments
  5. Extracts comment data including author details and engagement metrics
  6. Stops when Max Comments limit is reached or all comments are retrieved
  7. 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_verified flag
  • 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_verified to identify influential commenters
  • Monitor answers_count to find conversation threads
  • Track comment likes to 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_verified helps identify celebrity/influencer interactions
  • Conversation Threads: answers_count > 0 indicates 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_at to study comment timing patterns

Common Use Cases

  1. Sentiment Analysis - Gauge audience reaction to posts
  2. Customer Feedback - Collect product opinions and suggestions
  3. Brand Monitoring - Track brand mentions in comments
  4. Influencer Identification - Find verified users engaging with content
  5. Crisis Management - Monitor negative comments in real-time
  6. Engagement Research - Study comment patterns and conversation starters
  7. Competitor Analysis - Analyze competitor audience sentiment
  8. 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 author and 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:

  1. Identify comments with answers_count > 0
  2. Use a separate API call to fetch replies (not included in this node)
  3. 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