Instagram Comments API
Fetch Instagram comments for multiple post URLs using Apify's Instagram Comment Scraper.
Endpoint
GET https://api.recoupable.com/api/instagram/commentsParameters
| Name | Type | Required | Description |
|---|---|---|---|
| postUrls | array[string] | Yes | Array of Instagram post URLs to fetch comments for |
| resultsLimit | number | No | Maximum number of comments to fetch (default: 10000) |
| isNewestComments | boolean | No | Whether to fetch newest comments first (default: null) |
Request Examples
cURL
curl -X GET "https://api.recoupable.com/api/instagram/comments?postUrls=https://instagram.com/p/abc123&postUrls=https://instagram.com/p/xyz789&resultsLimit=50" \
-H "Content-Type: application/json"Example Response
{
"runId": "abc123xyz",
"datasetId": "def456uvw",
"error": null
}Response Properties
| Property | Type | Description |
|---|---|---|
| runId | string | Unique identifier for the Apify run |
| datasetId | string | Unique identifier for the dataset containing scraped data |
| error | string | Error message if the run failed (null if successful) |
Notes
- This endpoint uses Apify's Instagram Comment Scraper to scrape Instagram comment data
- The actual comment data will be available in the Apify dataset after the run completes
- Use the Apify Scraper Results API to check the status and retrieve the scraped data
- Rate limits may apply based on Instagram's restrictions
- The scraping process may take some time to complete
- Results are not real-time and may be subject to Instagram's rate limiting
- Use
resultsLimitto control how many comments to fetch per post (useful for performance optimization) - Set
isNewestCommentstotrueto retrieve newest comments first,falsefor oldest first, ornull(default) to use platform default sorting