curl --request GET \
--url https://api.scraperize.com/v1/instagram/post/comments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/instagram/post/comments"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/instagram/post/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/instagram/post/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/instagram/post/comments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/instagram/post/comments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/instagram/post/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"post": {
"id": "3983118388705688735",
"code": "DdG4RIxIPyf",
"url": "https://www.instagram.com/p/DdG4RIxIPyf/"
},
"comments": [
{
"id": "18627640678004801",
"text": "🔥🔥🔥🔥🔥",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-12T07:05:05.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "33402776402",
"handle": "seetheworld3000",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/780593730_18093068459112403_8813944285625000079_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=101&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=OZS2hJwTGugQ7kNvwEfeK1K&_nc_oc=AdpPDLTwLya1EtrgLXDKWjMqvrbPFdbL7EjqCqMaJJdnE7p8ya7akM10TsGjWlPuAqY&_nc_zt=24&_nc_ht=scontent-los4-1.cdninstagram.com&_nc_gid=rBG53-vS573gmNhtq4TkoQ&_nc_ss=7a289&oh=00_AQPiBRJ-9K9wV85IXT4Sd5jxFBcHFNNMrW1Tjhc50_BPJQ&oe=6AD277C4",
"url": "https://www.instagram.com/seetheworld3000/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
},
{
"id": "18131045659749445",
"text": "🔥🔥🔥🔥🔥🔥",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-12T07:04:48.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "33402776402",
"handle": "seetheworld3000",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/780593730_18093068459112403_8813944285625000079_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=101&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=OZS2hJwTGugQ7kNvwEfeK1K&_nc_oc=AdpPDLTwLya1EtrgLXDKWjMqvrbPFdbL7EjqCqMaJJdnE7p8ya7akM10TsGjWlPuAqY&_nc_zt=24&_nc_ht=scontent-los4-1.cdninstagram.com&_nc_gid=rBG53-vS573gmNhtq4TkoQ&_nc_ss=7a289&oh=00_AQPiBRJ-9K9wV85IXT4Sd5jxFBcHFNNMrW1Tjhc50_BPJQ&oe=6AD277C4",
"url": "https://www.instagram.com/seetheworld3000/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
},
{
"id": "17910787941514768",
"text": "Nature never stops surprising me. Incredible capture! 🌍",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-11T13:23:01.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "77484032089",
"handle": "ikram.rehman300",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/567476387_17849722161576090_7062417739127258235_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=110&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=qMFBATMHkasQ7kNvwEGWtBk&_nc_oc=AdpmWCcrGdw6HHyaU0hpOsUVmdeXQQXm88munieRrt07DJ8oy7DZXAJPGhUD5faTVb4&_nc_zt=24&_nc_ht=scontent-los4-1.cdninstagram.com&_nc_gid=rBG53-vS573gmNhtq4TkoQ&_nc_ss=7a289&oh=00_AQOk8KP53SclwqGCyzyNzAjvrJHRyyqMsSsMtGwDTB9k-Q&oe=6AD29520",
"url": "https://www.instagram.com/ikram.rehman300/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
}
],
"count": 13,
"cursor": "eyJpbnYiOiJ0cnVlIiwiaCI6Im1lZGlhOjM5ODMxMTgzODg3MDU2ODg3MzUiLCJjIjoiQVFIVGoxNzBNUkFBRS1FQ1pJZ1RhaXNVU19IT2MxMEtpR0hwOGZmX0dqNmxabU9HdE10bmc2aHJtOUNXS1R5aGRtVnF1TUdtZVRDcEJSMzM2MDd6dnVfUXBBIn0",
"hasMore": true,
"geoblockedComments": [],
"fetchedAt": "2026-10-12T09:30:17.319Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request was invalid.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}Post comments
Fetches the comments on a public Instagram post or Reel by its URL, newest first, about 12–15 per page with a cursor. Each comment has its id, text with hashtags and mentions, posted date, like count, the author (id, handle, verified, profile picture, profile URL), the GIF for GIF comments, and hidden / restricted / translation flags. Top-level comments only: Instagram does not make comment replies (or reply counts) available without logging in, so replies can’t be returned. Also lists comments Instagram withholds in the requester’s country. A post with comments turned off returns an empty list; a private or missing post returns 404. Only publicly available data is returned.
curl --request GET \
--url https://api.scraperize.com/v1/instagram/post/comments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/instagram/post/comments"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/instagram/post/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/instagram/post/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/instagram/post/comments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/instagram/post/comments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/instagram/post/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"post": {
"id": "3983118388705688735",
"code": "DdG4RIxIPyf",
"url": "https://www.instagram.com/p/DdG4RIxIPyf/"
},
"comments": [
{
"id": "18627640678004801",
"text": "🔥🔥🔥🔥🔥",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-12T07:05:05.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "33402776402",
"handle": "seetheworld3000",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/780593730_18093068459112403_8813944285625000079_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=101&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=OZS2hJwTGugQ7kNvwEfeK1K&_nc_oc=AdpPDLTwLya1EtrgLXDKWjMqvrbPFdbL7EjqCqMaJJdnE7p8ya7akM10TsGjWlPuAqY&_nc_zt=24&_nc_ht=scontent-los4-1.cdninstagram.com&_nc_gid=rBG53-vS573gmNhtq4TkoQ&_nc_ss=7a289&oh=00_AQPiBRJ-9K9wV85IXT4Sd5jxFBcHFNNMrW1Tjhc50_BPJQ&oe=6AD277C4",
"url": "https://www.instagram.com/seetheworld3000/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
},
{
"id": "18131045659749445",
"text": "🔥🔥🔥🔥🔥🔥",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-12T07:04:48.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "33402776402",
"handle": "seetheworld3000",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/780593730_18093068459112403_8813944285625000079_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=101&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=OZS2hJwTGugQ7kNvwEfeK1K&_nc_oc=AdpPDLTwLya1EtrgLXDKWjMqvrbPFdbL7EjqCqMaJJdnE7p8ya7akM10TsGjWlPuAqY&_nc_zt=24&_nc_ht=scontent-los4-1.cdninstagram.com&_nc_gid=rBG53-vS573gmNhtq4TkoQ&_nc_ss=7a289&oh=00_AQPiBRJ-9K9wV85IXT4Sd5jxFBcHFNNMrW1Tjhc50_BPJQ&oe=6AD277C4",
"url": "https://www.instagram.com/seetheworld3000/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
},
{
"id": "17910787941514768",
"text": "Nature never stops surprising me. Incredible capture! 🌍",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-11T13:23:01.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "77484032089",
"handle": "ikram.rehman300",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/567476387_17849722161576090_7062417739127258235_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=110&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=qMFBATMHkasQ7kNvwEGWtBk&_nc_oc=AdpmWCcrGdw6HHyaU0hpOsUVmdeXQQXm88munieRrt07DJ8oy7DZXAJPGhUD5faTVb4&_nc_zt=24&_nc_ht=scontent-los4-1.cdninstagram.com&_nc_gid=rBG53-vS573gmNhtq4TkoQ&_nc_ss=7a289&oh=00_AQOk8KP53SclwqGCyzyNzAjvrJHRyyqMsSsMtGwDTB9k-Q&oe=6AD29520",
"url": "https://www.instagram.com/ikram.rehman300/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
}
],
"count": 13,
"cursor": "eyJpbnYiOiJ0cnVlIiwiaCI6Im1lZGlhOjM5ODMxMTgzODg3MDU2ODg3MzUiLCJjIjoiQVFIVGoxNzBNUkFBRS1FQ1pJZ1RhaXNVU19IT2MxMEtpR0hwOGZmX0dqNmxabU9HdE10bmc2aHJtOUNXS1R5aGRtVnF1TUdtZVRDcEJSMzM2MDd6dnVfUXBBIn0",
"hasMore": true,
"geoblockedComments": [],
"fetchedAt": "2026-10-12T09:30:17.319Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request was invalid.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}cache_max_age) are free.Copy for AI assistant
Copy for AI assistant
I want to make an API call to /v1/instagram/post/comments. Here are the details:
Endpoint: GET https://api.scraperize.com/v1/instagram/post/comments
Description: Fetches the comments on a public Instagram post or Reel by its URL, newest first, about 12–15 per page with a cursor. Each comment has its id, text with hashtags and mentions, posted date, like count, the author (id, handle, verified, profile picture, profile URL), the GIF for GIF comments, and hidden / restricted / translation flags. Top-level comments only: Instagram does not make comment replies (or reply counts) available without logging in, so replies can't be returned. Also lists comments Instagram withholds in the requester's country. A post with comments turned off returns an empty list; a private or missing post returns 404. Only publicly available data is returned.
Required Headers:
- x-api-key: Your API key
Parameters:
- url (string) [required]: The Instagram post or Reel URL, e.g. `https://www.instagram.com/reel/DdG4RIxIPyf/`.
- cursor (string): The `cursor` from a previous response (same `url`) to fetch the next page. Omit for the first page.
- cache_max_age (select): Optional. Return a cached result if one this age or newer exists — served for **0 credits** with `meta.cached=true` and `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and refreshes the cache. Omit to always scrape fresh.
Example Response:
{
"data": {
"post": {
"id": "3983118388705688735",
"code": "DdG4RIxIPyf",
"url": "https://www.instagram.com/p/DdG4RIxIPyf/"
},
"comments": [
{
"id": "18627640678004801",
"text": "🔥🔥🔥🔥🔥",
"hashtags": [],
"mentions": [],
"createdAt": "2026-10-12T07:05:05.000Z",
"likeCount": 0,
"replyCount": null,
"author": {
"id": "33402776402",
"handle": "seetheworld3000",
"fullName": null,
"isVerified": false,
"profilePicUrl": "https://scontent-los4-1.cdninstagram.com/v/t51.82787-19/780593730_18093068459112403_8813944285625000079_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=101&ccb=7-5&_nc_s…",
"url": "https://www.instagram.com/seetheworld3000/"
},
"gif": null,
"isHidden": false,
"restrictedStatus": null,
"hasTranslation": null
}
],
"count": 13,
"cursor": "eyJpbnYiOiJ0cnVlIiwiaCI6Im1lZGlhOjM5ODMxMTgzODg3MDU2ODg3MzUiLCJjIjoiQVFIVGoxNzBNUkFBRS1FQ1pJZ1RhaXNVU19IT2MxMEtpR0hwOGZmX0dqNmxabU9HdE10bmc2aHJtOUNXS1R5aGRtVnF1…",
"hasMore": true,
"geoblockedComments": [],
"fetchedAt": "2026-10-12T09:30:17.319Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}
Please help me write code in my preferred programming language to make this API call and handle the response appropriately. Include error handling and best practices.
Authorizations
Your API key. Send it in the x-api-key header (or Authorization: Bearer <key>). Create and manage keys from your dashboard.
Query Parameters
The Instagram post or Reel URL, e.g. https://www.instagram.com/reel/DdG4RIxIPyf/.
The cursor from a previous response (same url) to fetch the next page. Omit for the first page.
Optional. Return a cached result if one this age or newer exists — served for 0 credits with meta.cached=true and meta.cachedAt. Otherwise a fresh scrape runs (1 credit) and refreshes the cache. Omit to always scrape fresh.
1d, 3d, 7d, 14d, 30d