User Posts
curl --request GET \
--url https://scrapebadger.com/v1/instagram/users/{username}/posts \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/instagram/users/{username}/posts"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/instagram/users/{username}/posts', 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://scrapebadger.com/v1/instagram/users/{username}/posts",
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: <x-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://scrapebadger.com/v1/instagram/users/{username}/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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://scrapebadger.com/v1/instagram/users/{username}/posts")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/instagram/users/{username}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"count": 123,
"next_cursor": "<string>",
"has_more": true
}Endpoints
User Posts
Paginated posts for a user, wrapped in the standard list envelope.
GET
/
v1
/
instagram
/
users
/
{username}
/
posts
User Posts
curl --request GET \
--url https://scrapebadger.com/v1/instagram/users/{username}/posts \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/instagram/users/{username}/posts"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/instagram/users/{username}/posts', 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://scrapebadger.com/v1/instagram/users/{username}/posts",
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: <x-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://scrapebadger.com/v1/instagram/users/{username}/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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://scrapebadger.com/v1/instagram/users/{username}/posts")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/instagram/users/{username}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"count": 123,
"next_cursor": "<string>",
"has_more": true
}Page through a public user’s
posts.
Credits: 8 per request
Authorization
string
required
Your ScrapeBadger API key.
Path Parameters
string
required
Instagram handle without the
@.Query Parameters
integer
default:"12"
Page size — how many media items to return this page.
string
Opaque next-page token from a previous response’s
next_cursor. Omit for the
first page.Response
Media[]
Media cards — see the Get Media
field reference (
pk, id, code, taken_at/_utc, media_type,
product_type, caption_text, like_count, comment_count, play_count,
thumbnail_url, video_url, url, user, resources, …).integer
Items in this page.
string
Pass back as
cursor for the next page (null when exhausted).boolean
Whether more pages remain.
Example
curl "https://scrapebadger.com/v1/instagram/users/instagram/posts?amount=12" \
-H "X-API-Key: YOUR_API_KEY"
let cursor, all = [];
do {
const res = await fetch(
"https://scrapebadger.com/v1/instagram/users/instagram/posts?" +
new URLSearchParams({ amount: "12", ...(cursor && { cursor }) }),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const page = await res.json();
all.push(...page.items);
cursor = page.has_more ? page.next_cursor : null;
} while (cursor);
import requests
cursor, items = None, []
while True:
res = requests.get(
"https://scrapebadger.com/v1/instagram/users/instagram/posts",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"amount": 12, **({"cursor": cursor} if cursor else {})},
)
page = res.json()
items += page["items"]
if not page["has_more"]:
break
cursor = page["next_cursor"]
Response
{
"items": [
{
"pk": "3401234567890123456",
"id": "3401234567890123456_25025320",
"code": "C8xYzAbCdE1",
"taken_at": "2026-07-30T18:04:11Z",
"taken_at_utc": 1785434651,
"media_type": 8,
"product_type": "carousel_container",
"caption_text": "Summer on Instagram.",
"like_count": 1240553,
"comment_count": 8842,
"play_count": null,
"thumbnail_url": "https://scontent.cdninstagram.com/v/thumb.jpg",
"url": "https://www.instagram.com/p/C8xYzAbCdE1/"
}
],
"count": 1,
"next_cursor": "QVFE...==",
"has_more": true
}
⌘I

