All endpoints
Instagram Post Comments

Instagram Post Comments API

Get the comments on an Instagram post or reel by URL or shortcode. Returns each comment's text, author details, like and reply counts, date, and link. Sort by popular or recent, and fetch multiple pages in a single call.

Price: $0.006 per page
Free tier: 50 requests/month
Endpoint
GET /v1/instagram/post/comments

Parameters

url
Instagram post or reel URL, e.g. https://www.instagram.com/p/CxYQJO8xuC6/ (max 500 characters). Provide either url or code.
code
The post's shortcode, e.g. CxYQJO8xuC6, or numeric media ID (max 50 characters). Provide either url or code.
pages
Number of pages to fetch, 1-10 (default: 1). Each page returns up to 15 comments.
sort_by
Sort order: popular or recent (default: popular)
get_sentiment
Set to true to add AI emotion analysis (Plutchik's Wheel) to each result. Adds +$0.001 per page to the cost. Returns emotion scores, dominant emotion, intensity, and polarity.

Response fields

comments
Array of top-level comments
comment_id
Unique comment ID
text
Comment text
author
Commenter's Instagram username
author_name
Commenter's display name
author_id
Commenter's Instagram user ID
author_verified
Whether the commenter is verified
author_url
Link to the commenter's profile
author_profile_pic_url
Commenter's profile picture URL
likes
Number of likes
reply_count
Number of replies
is_pinned
Whether the comment is pinned
hashtags
Hashtags used in the comment
mentions
Usernames mentioned in the comment
date
Publication date and time
date_timestamp
Publication date as a Unix timestamp
url
Direct link to the comment (empty when the post was given by media ID)
source
"Instagram"
domain
"instagram.com"
gif_url
GIF URL for GIF comments (null otherwise)
sentiment
Emotion analysis results. Only present when get_sentiment=true. Returns null if analysis fails.
emotions
Plutchik emotion scores (0-100) for: joy, trust, fear, surprise, sadness, disgust, anger, anticipation.
dominant_emotion
The emotion with the highest score.
emotional_intensity
Overall emotional intensity on a scale of 0-10.
polarity
Overall sentiment polarity: positive, negative, or neutral.
code
The post's shortcode (or media ID, if that was passed)
total
Total number of comments on the post
pages
Number of pages fetched
count
Number of comments returned

Example Request

curl "https://apidirect.io/v1/instagram/post/comments?code=CxYQJO8xuC6&pages=2" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "comments": [
    {
      "comment_id": "18058799162049620",
      "text": "Nice post!",
      "author": "garcia99.r",
      "author_name": "Robert Garcia",
      "author_id": "72771312829",
      "author_verified": false,
      "author_url": "https://instagram.com/garcia99.r",
      "author_profile_pic_url": "https://scontent.cdninstagram.com/v/t51.89012-19/photo.jpg",
      "likes": 23,
      "reply_count": 0,
      "is_pinned": false,
      "hashtags": [],
      "mentions": [],
      "date": "2025-03-09 13:20:14",
      "date_timestamp": 1741524014,
      "url": "https://www.instagram.com/p/CxYQJO8xuC6/c/18058799162049620/",
      "source": "Instagram",
      "domain": "instagram.com",
      "gif_url": null
    }
  ],
  "code": "CxYQJO8xuC6",
  "total": 4006,
  "pages": 2,
  "count": 23
}

Frequently asked questions

How do I get a comment's replies?

Pass comment_id to the Comment Replies endpoint. Comments with reply_count: 0 have none.

How many comments can I fetch?

Up to 15 per page and 10 pages per call. total is the post's full comment count.

How does pricing work?

You only pay for successful requests. The Instagram Post Comments API costs $0.006 per page. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 5 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the Instagram Post Comments API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key