Get Comments
curl --request GET \
--url https://api.scraper.creatorlookup.com/v1/instagram/post/comments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraper.creatorlookup.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.scraper.creatorlookup.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.scraper.creatorlookup.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.scraper.creatorlookup.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.scraper.creatorlookup.com/v1/instagram/post/comments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraper.creatorlookup.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": [
{
"id": "<string>",
"text": "<string>",
"username": "<string>",
"timestamp": 123,
"like_count": 123
}
],
"credits_used": 123,
"credits_remaining": 123
}Instagram
Get Comments
Retrieve comments on an Instagram post
GET
/
v1
/
instagram
/
post
/
comments
Get Comments
curl --request GET \
--url https://api.scraper.creatorlookup.com/v1/instagram/post/comments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraper.creatorlookup.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.scraper.creatorlookup.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.scraper.creatorlookup.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.scraper.creatorlookup.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.scraper.creatorlookup.com/v1/instagram/post/comments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraper.creatorlookup.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": [
{
"id": "<string>",
"text": "<string>",
"username": "<string>",
"timestamp": 123,
"like_count": 123
}
],
"credits_used": 123,
"credits_remaining": 123
}Request
Headers
| Name | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Query parameters
string
required
The post shortcode to fetch comments for.
number
default:20
Number of comments to return. Min: 1, max: 200. Defaults to 20.
Response
InstagramComment[]
number
Credits deducted (2)
number
Remaining credit balance
Examples
curl -H "x-api-key: sk-your-api-key" \
"https://api.scraper.creatorlookup.com/v1/instagram/post/comments?shortcode=CxAbCdEfGh&limit=10"
const res = await fetch(
"https://api.scraper.creatorlookup.com/v1/instagram/post/comments?shortcode=CxAbCdEfGh&limit=10",
{ headers: { "x-api-key": "sk-your-api-key" } }
);
const { data } = await res.json();
data.forEach((comment) => {
console.log(`@${comment.username}: ${comment.text}`);
});
import requests
res = requests.get(
"https://api.scraper.creatorlookup.com/v1/instagram/post/comments",
params={"shortcode": "CxAbCdEfGh", "limit": 10},
headers={"x-api-key": "sk-your-api-key"},
)
for comment in res.json()["data"]:
print(f"@{comment['username']}: {comment['text']}")
200 — Success
{
"data": [
{
"id": "17890012345678901",
"text": "Amazing photo! Love the colors",
"username": "photouser",
"timestamp": 1700001000,
"like_count": 42
},
{
"id": "17890012345678902",
"text": "Where was this taken?",
"username": "traveler99",
"timestamp": 1700002000,
"like_count": 5
}
],
"credits_used": 2,
"credits_remaining": 9998
}
402 — Insufficient credits
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This endpoint requires 2 credits, you have 1"
}
}
504 — Timeout
{
"error": {
"code": "TIMEOUT",
"message": "Scraping request timed out"
}
}
⌘I