Using Java

How to Scrape Instagram Highlight Details with Java

Get detailed content from a specific Instagram highlight using Java. This comprehensive guide will walk you through the entire process, from setup to implementation.

Overview

What You'll Learn

  • Setting up your Java environment
  • Installing the required HTTP client
  • Authenticating with SociaVault API
  • Making requests to Instagram
  • Handling responses and errors

What You'll Get

  • Access to highlight detail data
  • JSON formatted responses
  • Real-time data access
  • Scalable solution
  • Error handling patterns

Prerequisites

1. API Key

First, you'll need a SociaVault API key to authenticate your requests.

2. Development Environment

Make sure you have the following installed:

  • Java installed
  • A code editor (VS Code, Sublime, etc.)
  • Command line interface access

Implementation

Step 1: Install HTTP Client

We'll use HttpClient to make HTTP requests.

bash
// Java 11+ Standard Library

Step 2: API Implementation

Now let's make a request to the Instagram API using Java. Replace YOUR_API_KEY with your actual API key.

java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Scraper {
    public static void main(String[] args) throws Exception {
        String apiKey = "YOUR_API_KEY";
        String url = "https://api.sociavault.com/instagram/highlight-detail?id=18067016518767507";

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .header("x-api-key", apiKey)
                .header("Content-Type", "application/json")
                .GET()
                .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Testing Your Code

API Parameters

ParameterTypeRequiredDescription
idstringYesExample: 18067016518767507

Expected Response

You should receive a structured JSON response containing the highlight detail data.

json
{
  "success": true,
  "id": "highlight:18067016518767507",
  "latest_reel_media": 1745272279,
  "can_reply": false,
  "can_gif_quick_reply": true,
  "can_reshare": true,
  "reel_type": "highlight_reel",
  "can_react_with_avatar": false,
  "cover_media": {
    "cropped_image_version": {
      "width": 150,
      "height": 150,
      "url": "https://scontent-dub4-1.cdninstagram.com/v/t51.2885-15/479737232_1405856350793820_7928432152706230890_n.jpg?stp=c0.202.640.640a_dst-jpg_e15_s150x150_tt6&_nc_ht=scontent-dub4-1.cdninstagram.com&_nc_cat=100&_nc_oc=Q6cZ2QGmly2VJEPPnYd3yasHydMcSwfCazUKlRXiU5HUJ-zQVPrC9Xb-ho-EFRAjvcUgWnY&_nc_ohc=yQlHN7CDZ7IQ7kNvwFIJktj&_nc_gid=-RHeydtWtdTLhayCKiI3oQ&edm=ANmP7GQBAAAA&ccb=7-5&oh=00_AfKKWP06eveppAsTaksGtYoLYb_lesIro1a34w-gEGgJ8A&oe=682184F5&_nc_sid=982cc7",
      "scans_profile": ""
    },
    "crop_rect": [
      0
    ],
    "media_id": "3574665805209826888_21393171"
  },
  "user": {
    "pk": "21393171",
    "pk_id": "21393171",
    "full_name": "Jane Williamson",
    "is_private": false,
    "strong_id__": "21393171",
    "id": "21393171",
    "username": "jane",
    "is_verified": true,
    "profile_pic_id": "3583980709961915639_21393171",
    "profile_pic_url": "https://scontent-dub4-1.cdninstagram.com/v/t51.2885-19/482782944_496357423346018_5818268903424754264_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=scontent-dub4-1.cdninstagram.com&_nc_cat=1&_nc_oc=Q6cZ2QGmly2VJEPPnYd3yasHydMcSwfCazUKlRXiU5HUJ-zQVPrC9Xb-ho-EFRAjvcUgWnY&_nc_ohc=mi86alqirjwQ7kNvwFr3H5A&_nc_gid=-RHeydtWtdTLhayCKiI3oQ&edm=ANmP7GQBAAAA&ccb=7-5&oh=00_AfIKcWUsUpfsBZW0eePl0Z6La3wJHY0FPIj7QRpbwooklA&oe=68218068&_nc_sid=982cc7",
    "interop_messaging_user_fbid": 119713162748634,
    "transparency_product_enabled": false
  },
  "items": [
    {
      "pk": "3565907942018983442",
      "id": "3565907942018983442_21393171",
      "is_visual_reply_commenter_notice_enabled": true,
      "like_and_view_counts_disabled": false,
      "is_post_live_clips_media": false,
      "is_reshare_of_text_post_app_media_in_ig": false,
      "is_reel_media": true,
      "fbid": "17968033766718273",
      "device_timestamp": 1739309362129426,
      "caption_is_edited": false,
      "strong_id__": "3565907942018983442_21393171",
      "is_quicksnap_recap": false,
      "deleted_reason": 0,
      "mezql_token": "",
      "imported_taken_at": 1739305646,
      "should_request_ads": false,
      "is_terminal_video_segment": false,
      "integrity_review_decision": "pending",
      "client_cache_key": "MzU2NTkwNzk0MjAxODk4MzQ0Mg==.3",
      "comment_threading_enabled": true,
      "is_unified_video": false,
      "commerciality_status": "not_commercial",
      "caption_position": 0,
      "has_privately_liked": false,
      "filter_type": 0,
      "taken_at": 1739309361,
      "hide_view_all_comment_entrypoint": false,
      "is_comments_gif_composer_enabled": false,
      "is_dash_eligible": 1,
      "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\" type=\"static\" mediaPresentationDuration=\"PT55.866665S\" FBManifestIdentifier=\"FgAYEWlnX2Rhc2hfYmFzaWNfdnA5GVakidDNlteaArDgzvCy78QDoofA1en7zAOewtDZrN6hBPqfhZ22qqYiIhgYZGFzaF9sbl9oZWFhY192YnIzX2F1ZGlvIgA=\"><Period id=\"0\" duration=\"PT55.866665S\"><AdaptationSet id=\"0\" contentType=\"video\" subsegmentAlignment=\"true\" par=\"9:16\" FBUnifiedUploadResolutionMos=\"360:87.8\"><Representation id=\"1013678003978705vd\" bandwidth=\"442825\" codecs=\"vp09.00.21.08.01.01.01.01.00\" mimeType=\"video/mp4\" sar=\"1:1\" FBEncodingTag=\"dash_vp9-basic-gen2_360p\" FBContentLength=\"3092396\" FBPlaybackResolutionMos=\"0:100,360:76.2,480:68.3,720:55.5,1080:42.6\" FBPlaybackResolutionMosConfidenceLevel=\"high\" FBPlaybackResolutionCsvqm=\"0:100,360:90.6,480:83.1,720:70.6,1080:57.1\" width=\"360\" height=\"640\" frameRate=\"15360/512\" FBDefaultQuality=\"1\" FBQualityClass=\"sd\" FBQualityLabel=\"360p\"><BaseURL>https://scontent-dub4-1.cdninstagram.com/o1/v/t2/f2/m367/AQOfoUrcpLyCypvA0r8KJNYVZqRMK_xKgHt6BIIR-2d-pZc8HrSUxb_ADpVH2fHJ_Jga14in9wNDQMKL8YmnSyh2SyuBIi1wH-0GagOjJyNiPExeppA3tiJXWvimPCV3DixoO1Bq.mp4?_nc_cat=108&amp;_nc_sid=9ca052&amp;_nc_ht=scontent-dub4-1.cdninstagram.com&amp;_nc_ohc=jqHP6zi0XkIQ7kNvwHHEdKy&amp;efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLnN0b3J5LmMyLUMzLmRhc2hfdnA5LWJhc2ljLWdlbjJfMzYwcCIsInZpZGVvX2lkIjpudWxsLCJvaWxfdXJsZ2VuX2FwcF9pZCI6OTM2NjE5NzQzMzkyNDU5LCJjbGllbnRfbmFtZSI6ImlnIiwieHB2X2Fzc2V0X2lkIjoxMzc3ODEwOTUzMzg3NzQ2LCJ2aV91c2VjYXNlX2lkIjoxMDEwMCwiZHVyYXRpb25fcyI6NTUsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&amp;ccb=17-1&amp;_nc_zt=28&amp;oh=00_AfJeY5DgeknyRN-Oj5qSXRKzB0wL9yWYB4PyUjf9wvqfgQ&amp;oe=682162E0</BaseURL><SegmentBase indexRange=\"818-993\" timescale=\"15360\" FBMinimumPrefetchRange=\"994-24037\" FBFirstSegmentRange=\"994-284754\" FBFirstSegmentDuration=\"5000\" FBSecondSegmentRange=\"284755-582397\" FBPrefetchSegmentRange=\"994-284754\" FBPrefetchSegmentDuration=\"5000\"><Initialization range=\"0-817\"/></SegmentBase></Representation><Representation id=\"621622240870994v\" bandwidth=\"1213073\" codecs=\"vp09.00.30.08.01.01.01.01.00\" mimeType=\"video/mp4\" sar=\"1:1\" FBEncodingTag=\"dash_vp9-basic-gen2_540p\" FBContentLength=\"8471295\" FBPlaybackResolutionMos=\"0:100,360:88.4,480:83.5,720:75.1,1080:65\" FBPlaybackResolutionMosConfidenceLevel=\"high\" FBPlaybackResolutionCsvqm=\"0:100,360:96,480:94.4,720:89.5,1080:80.1\" width=\"540\" height=\"960\" frameRate=\"15360/512\" FBQualityClass=\"sd\" FBQualityLabel=\"540p\"><BaseURL>https://scontent-dub4-1.cdninstagram.com/o1/v/t2/f2/m367/AQNVYK_LcjKX7BfZe6teyHabLQAnRYyvQ0OaomvrOYVCPI39q3Mua18SLdXRP1rLDAWZtmaw0daxwozitRR7QuRlk-yu0u6aNkSo6bVRxWiHWJMrsuFUpZ3wEXzsglQDn__HYhrE.mp4?_nc_cat=101&amp;_nc_sid=9ca052&amp;_nc_ht=scontent-dub4-1.cdninstagram.com&amp;_nc_ohc=YsOmqegW-HAQ7kNvwHvk5t6&amp;efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLnN0b3J5LmMyLUMzLmRhc2hfdnA5LWJhc2ljLWdlbjJfNTQwcCIsInZpZGVvX2lkIjpudWxsLCJvaWxfdXJsZ2VuX2FwcF9pZCI6OTM2NjE5NzQzMzkyNDU5LCJjbGllbnRfbmFtZSI6ImlnIiwieHB2X2Fzc2V0X2lkIjoxMzc3ODEwOTUzMzg3NzQ2LCJ2aV91c2VjYXNlX2lkIjoxMDEwMCwiZHVyYXRpb25fcyI6NTUsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&amp;ccb=17-1&amp;_nc_zt=28&amp;oh=00_AfJClU-cSxarTYZZelf4X843_PLNlpHXaOVA8JeQ4P6KjA&amp;oe=682163B3</BaseURL><SegmentBase indexRange=\"818-993\" timescale=\"15360\" FBMinimumPrefetchRange=\"994-47780\" FBFirstSegmentRange=\"994-766720\" FBFirstSegmentDuration=\"5000\" FBSecondSegmentRange=\"766721-1575879\" FBPrefetchSegmentRange=\"994-766720\" FBPrefetchSegmentDuration=\"5000\"><Initialization range=\"0-817\"/></SegmentBase></Representation><Representation id=\"1200088581542031v\" bandwidth=\"2208026\" codecs=\"vp09.00.31.08.01.01.01.01.00\" mimeType=\"video/mp4\" sar=\"1:1\" FBEncodingTag=\"dash_vp9-basic-gen2_720p\" FBContentLength=\"15419382\" FBPlaybackResolutionMos=\"0:100,360:93.3,480:90.1,720:83,1080:71.9\" FBPlaybackResolutionMosConfidenceLevel=\"high\" FBPlaybackResolutionCsvqm=\"0:100,360:97.5,480:96.5,720:94.3,1080:86.5\" width=\"720\" height=\"1280\" frameRate=\"15360/512\" FBQualityClass=\"hd\" FBQualityLabel=\"720p\"><BaseURL>https://scontent-dub4-1.cdninstagram.com/o1/v/t2/f2/m367/AQMZ2fGGIbfKfEB8WZCN2uo1kyDrbZSRTuS9NuKQsm1kdrgBwIgx5uTkgSSwSrg-HwQGBXwyIV6JLLFGIHufr1R3biAaDoj6ef07ZsEglx5OkMyyYPdnMGzVR8ssmYaKJyFG6xTa.mp4?_nc_cat=101&amp;_nc_sid=9ca052&amp;_nc_ht=scontent-dub4-1.cdninstagram.com&amp;_nc_ohc=ZnDVAwVn1J0Q7kNvwFP3y7A&amp;efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLnN0b3J5LmMyLUMzLmRhc2hfdnA5LWJhc2ljLWdlbjJfNzIwcCIsInZpZGVvX2lkIjpudWxsLCJvaWxfdXJsZ2VuX2FwcF9pZCI6OTM2NjE5NzQzMzkyNDU5LCJjbGllbnRfbmFtZSI6ImlnIiwieHB2X2Fzc2V0X2lkIjoxMzc3ODEwOTUzMzg3NzQ2LCJ2aV91c2VjYXNlX2lkIjoxMDEwMCwiZHVyYXRpb25fcyI6NTUsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&amp;ccb=17-1&amp;_nc_zt=28&amp;oh=00_AfJI3HBj5B_USsbfjD3mig9BmKADRB-WNgDkLiSNcA9AXg&amp;oe=6821608B</BaseURL><SegmentBase indexRange=\"818-993\" timescale=\"15360\" FBMinimumPrefetchRange=\"994-70338\" FBFirstSegmentRange=\"994-1348250\" FBFirstSegmentDuration=\"5000\" FBSecondSegmentRange=\"1348251-2820412\" FBPrefetchSegmentRange=\"994-1348250\" FBPrefetchSegmentDuration=\"5000\"><Initialization range=\"0-817\"/></SegmentBase></Representation><Representation id=\"995872305960984v\" bandwidth=\"2923144\" codecs=\"vp09.00.40.08.01.01.01.01.00\" mimeType=\"video/mp4\" sar=\"1:1\" FBEncodingTag=\"dash_vp9-basic-gen2_1080p\" FBContentLength=\"20413296\" FBPlaybackResolutionMos=\"0:100,360:94.2,480:92.6,720:86.7,1080:78.6\" FBPlaybackResolutionMosConfidenceLevel=\"high\" FBPlaybackResolutionCsvqm=\"0:100,360:97.9,480:97.2,720:95.5,1080:92.4\" width=\"1080\" height=\"1920\" frameRate=\"15360/512\" FBQualityClass=\"hd\" FBQualityLabel=\"1080p\"><BaseURL>https://scontent-dub4-1.cdninstagram.com/o1/v/t2/f2/m367/AQPnP3tyR_xd5vqiR9rHqL4uKAjCLDaAYc0d8G15LFH4_WgzATFrwGXbO3j9AFBXxW_dMMt-bIcZjhcDf9KdKZVBXZfKTpq4NqOdhEyNtKMfJi0pduOiR8a2SGkol-VtVBcSU7y0ow.mp4?_nc_cat=106&amp;_nc_sid=9ca052&amp;_nc_ht=scontent-dub4-1.cdninstagram.com&amp;_nc_ohc=Xh9mj1ql7FsQ7kNvwGfdBze&amp;efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLnN0b3J5LmMyLUMzLmRhc2hfdnA5LWJhc2ljLWdlbjJfMTA4MHAiLCJ2aWRlb19pZCI6bnVsbCwib2lsX3VybGdlbl9hcHBfaWQiOjkzNjYxOTc0MzM5MjQ1OSwiY2xpZW50X25hbWUiOiJpZyIsInhwdl9hc3NldF9pZCI6MTM3NzgxMDk1MzM4Nzc0NiwidmlfdXNlY2FzZV9pZCI6MTAxMDAsImR1cmF0aW9uX3MiOjU1LCJ1cmxnZW5fc291cmNlIjoid3d3In0%3D&amp;ccb=17-1&amp;_nc_zt=28&amp;oh=00_AfIPo5nYW_cUOteJVej4-Or_9EsE1QoCPgFvyhr3gWNKbQ&amp;oe=68217548</BaseURL><SegmentBase indexRange=\"818-993\" timescale=\"15360\" FBMinimumPrefetchRange=\"994-82033\" FBFirstSegmentRange=\"994-1794971\" FBFirstSegmentDuration=\"5000\" FBSecondSegmentRange=\"1794972-3714039\" FBPrefetchSegmentRange=\"994-1794971\" FBPrefetchSegmentDuration=\"5000\"><Initialization range=\"0-817\"/></SegmentBase></Representation></AdaptationSet><AdaptationSet id=\"1\" contentType=\"audio\" subsegmentStartsWithSAP=\"1\" subsegmentAlignment=\"true\"><Representation id=\"9654440924588029ad\" bandwidth=\"84784\" codecs=\"mp4a.40.5\" mimeType=\"audio/mp4\" FBAvgBitrate=\"84784\" audioSamplingRate=\"44100\" FBEncodingTag=\"dash_ln_heaac_vbr3_audio\" FBContentLength=\"593255\" FBPaqMos=\"67.44\" FBDefaultQuality=\"1\"><AudioChannelConfiguration schemeIdUri=\"urn:mpeg:dash:23003:3:audio_channel_configuration:2011\" value=\"2\"/><BaseURL>https://scontent-dub4-1.cdninstagram.com/o1/v/t16/f2/m69/AQNyWBRlKnroBxnnX-EpqgZgFfAyiJwI-Shbf9Eq1B1Ma9Pxo26PXQBrs_bIP7SJepuJU3-Yyr9hBKTg1ksLVc5x.mp4?strext=1&amp;_nc_cat=107&amp;_nc_sid=9ca052&amp;_nc_ht=scontent-dub4-1.cdninstagram.com&amp;_nc_ohc=asFzHjDcgjkQ7kNvwGBmUxq&amp;efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLnN0b3J5LmMyLUMzLmRhc2hfbG5faGVhYWNfdmJyM19hdWRpbyIsInZpZGVvX2lkIjpudWxsLCJvaWxfdXJsZ2VuX2FwcF9pZCI6OTM2NjE5NzQzMzkyNDU5LCJjbGllbnRfbmFtZSI6ImlnIiwieHB2X2Fzc2V0X2lkIjoxMzc3ODEwOTUzMzg3NzQ2LCJ2aV91c2VjYXNlX2lkIjoxMDEwMCwiZHVyYXRpb25fcyI6NTUsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&amp;ccb=17-1&amp;_nc_zt=28&amp;oh=00_AfI_TGV4rJPmSPk3Kr05twnv4TiuERYpk8DZGhIPelmVBg&amp;oe=68216059</BaseURL><SegmentBase indexRange=\"824-1191\" timescale=\"44100\" FBMinimumPrefetchRange=\"1192-1535\" FBFirstSegmentRange=\"1192-24804\" FBFirstSegmentDuration=\"2021\" FBSecondSegmentRange=\"24805-45822\" FBPrefetchSegmentRange=\"1192-45822\" FBPrefetchSegmentDuration=\"4017\"><Initialization range=\"0-823\"/></SegmentBase></Representation></AdaptationSet></Period></MPD>\n",
      "number_of_qualities": 4,
      "video_versions": [
        {
          "height": 852,
          "type": 101,
          "url": "https://scontent-dub4-1.cdninstagram.com/o1/v/t16/f2/m78/AQN5lthB7AgZeog8GcsUwAQtYg4PrP5y41v_bUs-ydLXFkg6cTCxlHYvYO9pyOGdbZ_h0iB8TpaRmEFn7KAjENMlWQGfsqMod9-9hpU.mp4?stp=dst-mp4&efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uc3RvcnkuYzIuNzIwLmJhc2VsaW5lIn0&_nc_cat=109&vs=622357473721923_1538615199&_nc_vs=HBksFQIYUWlnX3hwdl9wbGFjZW1lbnRfcGVybWFuZW50X3YyL0EwNEZFM0FDNjFERDBFRDJCNEM3MzVENDg5Rjg0MUIwX3ZpZGVvX2Rhc2hpbml0Lm1wNBUAAsgBABUCGDpwYXNzdGhyb3VnaF9ldmVyc3RvcmUvR0FBRlp4eFJSZ1RQaHJnRUFKMlFxRUgyOGE4dmJwa3dBQUFGFQICyAEAKAAYABsBiAd1c2Vfb2lsATEVAAAmmOLA9%2FDQi0AVAigCQzMsF0BL7tkWhysCGBJkYXNoX2Jhc2VsaW5lXzFfdjERAHXoB2XonQEA&_nc_rid=e09fae6dc1&ccb=9-4&oh=00_AfImyX203uNPxGHYxtNoPwuoBmW0eyV_W9nDNXbdQqs-jw&oe=681D7FBB&_nc_sid=982cc7",
          "width": 480
        }
      ],
      "video_duration": 55.85,
      "has_audio": true,
      "can_viewer_save": false,
      "is_organic_product_tagging_eligible": false,
      "photo_of_you": false,
      "can_see_insights_as_brand": false,
      "media_type": 2,
      "code": "DF8pmFZySYS",
      "sharing_friction_info": {
        "should_have_sharing_friction": false
      },
      "has_translation": false,
      "original_media_has_visual_reply_media": false,
      "coauthor_producer_can_see_organic_insights": false,
      "is_in_profile_grid": false,
      "profile_grid_control_enabled": false,
      "user": {
        "fbid_v2": "17841400515130334",
        "full_name": "Jane Williamson",
        "id": "21393171",
        "username": "jane"
      },
      "owner": {
        "full_name": "Jane Williamson",
        "id": "21393171",
        "is_private": false,
        "pk": "21393171",
        "pk_id": "21393171",
        "strong_id__": "21393171",
        "account_type": 3,
        "hd_profile_pic_versions": [
          {
            "height": 640,
            "url": "https://scontent-dub4-1.cdninstagram.com/v/t51.2885-19/482782944_496357423346018_5818268903424754264_n.jpg?stp=dst-jpg_s640x640_tt6&_nc_ht=scontent-dub4-1.cdninstagram.com&_nc_cat=1&_nc_oc=Q6cZ2QGmly2VJEPPnYd3yasHydMcSwfCazUKlRXiU5HUJ-zQVPrC9Xb-ho-EFRAjvcUgWnY&_nc_ohc=mi86alqirjwQ7kNvwFr3H5A&_nc_gid=-RHeydtWtdTLhayCKiI3oQ&edm=ANmP7GQBAAAA&ccb=7-5&oh=00_AfKHfZWBKEMcV8VY_66mTQTcYrFT7E1o3ZFIYULu6d9U4g&oe=68218068&_nc_sid=982cc7",
            "width": 640
          }
        ],
        "is_verified": true,
        "profile_pic_id": "3583980709961915639_21393171",
        "profile_pic_url": "https://scontent-dub4-1.cdninstagram.com/v/t51.2885-19/482782944_496357423346018_5818268903424754264_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=scontent-dub4-1.cdninstagram.com&_nc_cat=1&_nc_oc=Q6cZ2QGmly2VJEPPnYd3yasHydMcSwfCazUKlRXiU5HUJ-zQVPrC9Xb-ho-EFRAjvcUgWnY&_nc_ohc=mi86alqirjwQ7kNvwFr3H5A&_nc_gid=-RHeydtWtdTLhayCKiI3oQ&edm=ANmP7GQBAAAA&ccb=7-5&oh=00_AfIKcWUsUpfsBZW0eePl0Z6La3wJHY0FPIj7QRpbwooklA&oe=68218068&_nc_sid=982cc7",
        "username": "jane"
      },
      "image_versions2": {
        "candidates": [
          {
            "width": 640,
            "height": 1136,
            "url": "https://scontent-dub4-1.cdninstagram.com/v/t51.2885-15/477141407_979589986999224_2561193507868444490_n.jpg?stp=dst-jpg_e15_tt6&_nc_ht=scontent-dub4-1.cdninstagram.com&_nc_cat=100&_nc_oc=Q6cZ2QGmly2VJEPPnYd3yasHydMcSwfCazUKlRXiU5HUJ-zQVPrC9Xb-ho-EFRAjvcUgWnY&_nc_ohc=BTubnUZn6m0Q7kNvwFRIO27&_nc_gid=-RHeydtWtdTLhayCKiI3oQ&edm=ANmP7GQBAAAA&ccb=7-5&oh=00_AfJFG9jHyUa3ScFpjHIIow0vTwwkmkSJygTELwHelaQf9Q&oe=68215FCA&_nc_sid=982cc7",
            "scans_profile": ""
          }
        ]
      },
      "original_width": 1080,
      "original_height": 1920,
      "product_type": "story",
      "is_paid_partnership": false,
      "ig_media_sharing_disabled": false,
      "subscribe_cta_visible": false,
      "is_cutout_sticker_allowed": false,
      "fb_aggregated_like_count": 0,
      "fb_aggregated_comment_count": 0,
      "open_carousel_show_follow_button": false,
      "is_tagged_media_shared_to_viewer_profile_grid": false,
      "should_show_author_pog_for_tagged_media_shared_to_profile_grid": false,
      "is_open_to_public_submission": false,
      "archive_story_deletion_ts": 0,
      "can_send_prompt": false,
      "is_first_take": false,
      "is_from_discovery_surface": false,
      "is_rollcall_v2": false,
      "supports_reel_reactions": true,
      "is_photo_mash_story": false,
      "can_play_spotify_audio": false,
      "is_superlative": false,
      "show_one_tap_fb_share_tooltip": true,
      "can_reply": false,
      "can_reshare": true
    }
  ],
  "is_nux": false,
  "title": "GRWM chats",
  "created_at": 1743889595,
  "is_pinned_highlight": false,
  "prefetch_count": 0,
  "media_count": 25,
  "media_ids": [
    "3565907942018983442"
  ],
  "is_converted_to_clips": false,
  "disabled_reply_types": [
    "story_remix_reply"
  ],
  "highlight_reel_type": "DEFAULT",
  "is_added_to_main_grid": false,
  "is_archived": false,
  "is_fit_green": true
}

Best Practices

Error Handling

Implement comprehensive error handling and retry logic for failed requests. Log errors properly for debugging.

Caching

Cache responses when possible to reduce API calls and improve performance. Consider data freshness requirements.

Security

Never expose your API key in client-side code. Use environment variables and secure key management practices.

Troubleshooting

401

Unauthorized

Check your API key is correct and properly formatted in the x-api-key header.

402

Payment Required

You ran out of credits and need to buy more.

404

Not Found

The resource (user, video, etc.) might not exist or be private.

429

Too Many Requests

You have exceeded your rate limit. Slow down your requests.

Frequently Asked Questions

How much does it cost to scrape Instagram?

SociaVault offers 50 free API calls to get started. After that, pricing starts at $10 for 5k requests with volume discounts available.

Is it legal to scrape Instagram data?

Scraping publicly available data is generally considered legal. We only collect public data that is accessible without logging in.

How fast can I scrape Instagram?

Our API handles the rate limiting for you. You can make requests as fast as your plan allows.

What data format does the API return?

All API responses are returned in JSON format, making it easy to integrate with any programming language or application.

Related Tutorials

Ready to Start Scraping?

Get started with 50 free API calls. No credit card required. Stop worrying about proxies and captchas.