Instagram — profile posts
curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/instagram/timeline \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"handle": "nasa"
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/instagram/timeline"
payload = { "handle": "nasa" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({handle: 'nasa'})
};
fetch('https://app.sideshift.app/api/v1/scrape/instagram/timeline', 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://app.sideshift.app/api/v1/scrape/instagram/timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'handle' => 'nasa'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/v1/scrape/instagram/timeline"
payload := strings.NewReader("{\n \"handle\": \"nasa\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/v1/scrape/instagram/timeline")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"handle\": \"nasa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/instagram/timeline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"handle\": \"nasa\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"user": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"pk": "528817151",
"pk_id": "528817151",
"profile_grid_display_type": "default",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"is_active_on_text_post_app": true,
"is_private": false,
"is_verified": true
},
"next_max_id": "3952023811948503235_528817151",
"has_more": true,
"more_available": true,
"num_results": 12,
"success": true,
"items": [
{
"code": "Dbn-XJhk0_-",
"id": "3956405067326902270_528817151",
"url": "https://www.instagram.com/reel/Dbn-XJhk0_-/",
"comment_count": 2238,
"like_count": 219399,
"play_count": 7474702,
"taken_at": 1785860295,
"caption": {
"text": "Lunar landers, assemble.\n\nIn clean rooms across the country, the next generation of commercial lunar landers is coming together.\n\nFrom @BlueOrigin and @FireflyAerospace to @IntuitiveMachines and @VoyagerTech_, we're taking you behind the scenes to see the spacecraft that will …",
"user": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"fbid_v2": "17841401474538262",
"pk": "528817151",
"pk_id": "528817151",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"is_private": false,
"is_unpublished": false,
"is_verified": true
},
"content_type": "comment",
"media_id": "3956405067326902270",
"pk": "18138644452587909",
"status": "Active",
"strong_id__": "18138644452587909",
"text_translation": "Lunar landers, assemble.\n\n In clean rooms across the country, the next generation of commercial lunar landers is coming together.\n\n From @BlueOrigin and @FireflyAerospace to @IntuitiveMachines and @VoyagerTech_, we're taking you behind the scenes to see the spacecraft that wil…",
"user_id": "528817151",
"bit_flags": 0,
"created_at": 1785860298,
"created_at_utc": 1785860298,
"did_report_as_spam": false,
"is_covered": false
},
"owner": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"fbid_v2": "17841401474538262",
"pk": "528817151",
"pk_id": "528817151",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"account_type": 2,
"can_see_quiet_post_attribution": true,
"eligible_for_text_app_activation_badge": false,
"feed_post_reshare_disabled": false,
"has_anonymous_profile_picture": false
},
"user": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"fbid_v2": "17841401474538262",
"pk": "528817151",
"pk_id": "528817151",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"account_type": 2,
"can_see_quiet_post_attribution": true,
"eligible_for_text_app_activation_badge": false,
"feed_post_reshare_disabled": false,
"has_anonymous_profile_picture": false
},
"caption_text": "Lunar landers, assemble.\n\nIn clean rooms across the country, the next generation of commercial lunar landers is coming together.\n\nFrom @BlueOrigin and @FireflyAerospace to @IntuitiveMachines and @VoyagerTech_, we're taking you behind the scenes to see the spacecraft that will …",
"display_uri": "https://scontent-sjc6-1.cdninstagram.com/v/t51.82787-15/764637906_18633750226049152_4753965783588088014_n.jpg",
"eligible_insights_entrypoints": "NONE",
"fbid": "18138644353587909",
"integrity_review_decision": "pending",
"original_lang_for_translations": "en",
"pk": "3956405067326902270",
"product_type": "clips",
"profile_grid_thumbnail_fitting_style": "UNSET",
"related_ads_pivots_media_info": "USER_NOT_IN_TEST_GROUP",
"strong_id__": "3956405067326902270_528817151",
"subtype_name_for_REST__": "XDTClipsMedia",
"video_dash_manifest": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd\" profiles=\"urn:mpeg:dash:profile:isoff-on-demand:2011\" minBufferTime=\"PT2S\" ty…",
"are_remixes_crosspostable": true
}
]
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}{
"error": "INVALID_INPUT",
"message": "Invalid request body.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UNAUTHORIZED",
"message": "Invalid scraper API key.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INSUFFICIENT_SCRAPER_CREDITS",
"message": "Insufficient scraper credits.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "RESOURCE_NOT_FOUND",
"message": "Requested resource not found or unavailable.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PAYLOAD_TOO_LARGE",
"message": "Request body must be 32KB or smaller.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_RATE_LIMITED",
"message": "Scraper API rate limit exceeded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INTERNAL_ERROR",
"message": "Request failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_ERROR",
"message": "Data source failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_TIMEOUT",
"message": "Data source timed out. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}Instagram — profile posts
1 credit per request
A page of a profile’s timeline - reels, photos, videos and carousels. Platform field names are preserved inside data.
POST
/
scrape
/
instagram
/
timeline
Instagram — profile posts
curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/instagram/timeline \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"handle": "nasa"
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/instagram/timeline"
payload = { "handle": "nasa" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({handle: 'nasa'})
};
fetch('https://app.sideshift.app/api/v1/scrape/instagram/timeline', 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://app.sideshift.app/api/v1/scrape/instagram/timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'handle' => 'nasa'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/v1/scrape/instagram/timeline"
payload := strings.NewReader("{\n \"handle\": \"nasa\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/v1/scrape/instagram/timeline")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"handle\": \"nasa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/instagram/timeline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"handle\": \"nasa\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"user": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"pk": "528817151",
"pk_id": "528817151",
"profile_grid_display_type": "default",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"is_active_on_text_post_app": true,
"is_private": false,
"is_verified": true
},
"next_max_id": "3952023811948503235_528817151",
"has_more": true,
"more_available": true,
"num_results": 12,
"success": true,
"items": [
{
"code": "Dbn-XJhk0_-",
"id": "3956405067326902270_528817151",
"url": "https://www.instagram.com/reel/Dbn-XJhk0_-/",
"comment_count": 2238,
"like_count": 219399,
"play_count": 7474702,
"taken_at": 1785860295,
"caption": {
"text": "Lunar landers, assemble.\n\nIn clean rooms across the country, the next generation of commercial lunar landers is coming together.\n\nFrom @BlueOrigin and @FireflyAerospace to @IntuitiveMachines and @VoyagerTech_, we're taking you behind the scenes to see the spacecraft that will …",
"user": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"fbid_v2": "17841401474538262",
"pk": "528817151",
"pk_id": "528817151",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"is_private": false,
"is_unpublished": false,
"is_verified": true
},
"content_type": "comment",
"media_id": "3956405067326902270",
"pk": "18138644452587909",
"status": "Active",
"strong_id__": "18138644452587909",
"text_translation": "Lunar landers, assemble.\n\n In clean rooms across the country, the next generation of commercial lunar landers is coming together.\n\n From @BlueOrigin and @FireflyAerospace to @IntuitiveMachines and @VoyagerTech_, we're taking you behind the scenes to see the spacecraft that wil…",
"user_id": "528817151",
"bit_flags": 0,
"created_at": 1785860298,
"created_at_utc": 1785860298,
"did_report_as_spam": false,
"is_covered": false
},
"owner": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"fbid_v2": "17841401474538262",
"pk": "528817151",
"pk_id": "528817151",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"account_type": 2,
"can_see_quiet_post_attribution": true,
"eligible_for_text_app_activation_badge": false,
"feed_post_reshare_disabled": false,
"has_anonymous_profile_picture": false
},
"user": {
"full_name": "NASA",
"id": "528817151",
"username": "nasa",
"fbid_v2": "17841401474538262",
"pk": "528817151",
"pk_id": "528817151",
"profile_pic_id": "1735715738009579084_528817151",
"profile_pic_url": "https://scontent-sjc6-1.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg",
"strong_id__": "528817151",
"account_type": 2,
"can_see_quiet_post_attribution": true,
"eligible_for_text_app_activation_badge": false,
"feed_post_reshare_disabled": false,
"has_anonymous_profile_picture": false
},
"caption_text": "Lunar landers, assemble.\n\nIn clean rooms across the country, the next generation of commercial lunar landers is coming together.\n\nFrom @BlueOrigin and @FireflyAerospace to @IntuitiveMachines and @VoyagerTech_, we're taking you behind the scenes to see the spacecraft that will …",
"display_uri": "https://scontent-sjc6-1.cdninstagram.com/v/t51.82787-15/764637906_18633750226049152_4753965783588088014_n.jpg",
"eligible_insights_entrypoints": "NONE",
"fbid": "18138644353587909",
"integrity_review_decision": "pending",
"original_lang_for_translations": "en",
"pk": "3956405067326902270",
"product_type": "clips",
"profile_grid_thumbnail_fitting_style": "UNSET",
"related_ads_pivots_media_info": "USER_NOT_IN_TEST_GROUP",
"strong_id__": "3956405067326902270_528817151",
"subtype_name_for_REST__": "XDTClipsMedia",
"video_dash_manifest": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd\" profiles=\"urn:mpeg:dash:profile:isoff-on-demand:2011\" minBufferTime=\"PT2S\" ty…",
"are_remixes_crosspostable": true
}
]
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}{
"error": "INVALID_INPUT",
"message": "Invalid request body.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UNAUTHORIZED",
"message": "Invalid scraper API key.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INSUFFICIENT_SCRAPER_CREDITS",
"message": "Insufficient scraper credits.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "RESOURCE_NOT_FOUND",
"message": "Requested resource not found or unavailable.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PAYLOAD_TOO_LARGE",
"message": "Request body must be 32KB or smaller.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_RATE_LIMITED",
"message": "Scraper API rate limit exceeded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INTERNAL_ERROR",
"message": "Request failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_ERROR",
"message": "Data source failed. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_TIMEOUT",
"message": "Data source timed out. Your credits were refunded.",
"request_id": "req_8f3c9a2b1d4e6f70"
}Authorizations
Body
application/json
Response
Completed lookup. Standard cost: 1 SideShift credit; account-specific pricing, when present, is shown in the Scraper dashboard and returned in the billing headers.