Instagram Comments
POST /api/v1/instagram/comments
Get the public comments on an Instagram post or reel.
Overview
Get the public comments on an Instagram post or reel.
POST /api/v1/instagram/comments
Method: POST Path: /api/v1/instagram/comments Category: Social Media
Request Parameters
Endpoint Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| max_comments | integer | Optional | Maximum number of comments to return (1-500). |
| post_url | string | Required | Public post or reel URL, e.g. https://www.instagram.com/p/SHORTCODE/ |
Request Example
Instagram Comments Request Examples
curl -X POST "https://api.dataguru.cc/api/v1/instagram/comments" \ -H "Authorization: Api-Key YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"max_comments": "50", "post_url": "example"}'
Response Example
200 OK
Typical 200 OK JSON response structure with envelope metadata.
{ "post": { "url": "https://example.com/...", "shortcode": "string", "caption": "string", "mediaId": "1234567890", "like_count": 0, "comment_count": 0, "media_type": 0, "taken_at": 0, "taken_at_iso": "string" }, "account": { "username": "string", "userId": "1234567890", "profileUrl": "https://example.com/...", "profilePic": "string", "is_verified": false }, "comments": [ { "id": "1234567890", "text": "string", "created_at": 0, "created_at_iso": "string", "like_count": 0, "reply_count": 0, "parent_comment_id": "1234567890", "user": { "id": "1234567890", "username": "string", "full_name": "string", "profile_pic_url": "https://example.com/...", "is_verified": false } } ], "comments_count": 0, "_metadata": { "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e", "execution_time_ms": 842, "endpoint": "Instagram Comments", "mode": "live", "format": "json", "timestamp": "2026-01-01T12:00:00+00:00" } }
Response Schema
Fields returned in a successful response. Nested fields use dot notation and `[]` marks items of a list. Fields that are not required can be missing or `null` when the source does not provide them. Every response also includes a `_metadata` block.
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
| post | object | Yes | Information about the parent post or reel being commented on. |
| post.url | string | Yes | Full canonical post URL. |
| post.shortcode | string | Yes | Instagram shortcode identifier. |
| post.caption | string | null | Yes | Post caption text. |
| post.mediaId | string | Yes | Instagram media ID. |
| post.like_count | integer | null | Yes | Post like count. |
| post.comment_count | integer | null | Yes | Total number of comments on the post. |
| post.media_type | integer | Yes | Media type (1 for photo, 2 for video/reel). |
| post.taken_at | integer | null | Yes | Unix timestamp of post publication. |
| post.taken_at_iso | string | null | Yes | ISO-8601 formatted publication timestamp. |
| account | object | Yes | Author of the parent post. |
| account.username | string | Yes | Author username handle. |
| account.userId | string | Yes | Author user ID. |
| account.profileUrl | string | Yes | Author profile URL link. |
| account.profilePic | string | Yes | Author profile avatar picture URL. |
| account.is_verified | boolean | Yes | Whether the author account is verified. |
| comments | array<object> | Yes | List of parsed comments up to the requested max_comments limit. |
| comments[].id | string | Yes | Unique comment identifier. |
| comments[].text | string | Yes | Comment content text. |
| comments[].created_at | integer | null | Yes | Unix timestamp of comment creation. |
| comments[].created_at_iso | string | null | Yes | ISO-8601 UTC formatted comment creation timestamp. |
| comments[].like_count | integer | Yes | Number of likes on this comment. |
| comments[].reply_count | integer | null | Yes | Count of nested comment replies. |
| comments[].parent_comment_id | string | null | Yes | Parent comment ID if this comment is a reply, or null if top-level. |
| comments[].user | object | Yes | |
| comments[].user.id | string | null | Yes | Commenter numeric user ID. |
| comments[].user.username | string | null | Yes | Commenter username handle. |
| comments[].user.full_name | string | null | Yes | Commenter display name. |
| comments[].user.profile_pic_url | string | null | Yes | Commenter profile avatar picture URL. |
| comments[].user.is_verified | boolean | Yes | Whether commenter has a verified badge. |
| comments_count | integer | Yes | Total number of comments extracted in this response. |
Asynchronous Requests
Long-running requests can be processed in the background. Add `?async=true` (or the `Prefer: respond-async` header) to receive a `job_id` immediately, then poll the job until its status is `COMPLETED`.
Async Workflow
curl -X POST "https://api.dataguru.cc/api/v1/instagram/comments?async=true" \ -H "Authorization: Api-Key YOUR_API_KEY" # 202 Accepted { "success": true, "status": "SUBMITTED", "job_id": "0ca215ce-244f-4b28-b481-dc1b551983c8", "status_url": "/api/v1/jobs/0ca215ce-244f-4b28-b481-dc1b551983c8/" }
Batch Processing
To run many requests at half price, upload them as a CSV file: one row per request, with the parameter names above as the header row. Rows run in the background within 24 hours (up to 7 days for large files) and each successful row costs 50% of the price below. Poll /api/v1/batches/{batch_id}/ for progress and download results.json when it has finished. See the Batch Processing guide for details.
Batch Workflow
post_url,max_comments example,50
Pricing & Rate Limits
Endpoint Pricing
$0.001 / per successful request (USD)
Consumed per successful call: 1 request unit(s), 1 credit(s).
Endpoint Rate Limits
Common Errors
Common HTTP Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | A required parameter is missing or malformed. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | INSUFFICIENT_BALANCE | Your balance cannot cover this request. |
| 403 | ENDPOINT_DISABLED | This endpoint is currently unavailable. |
| 405 | METHOD_NOT_ALLOWED | The endpoint was called with the wrong HTTP method. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. See the Retry-After header. |
| 502 | PROVIDER_ERROR | The upstream data source failed. Retry with exponential backoff. |