Instagram story highlights API
  1. Docs
  2. Instagram
  3. Instagram story highlights API

Instagram story highlights API

The profile's highlight albums: id, title, cover and owner.

GET /v1/instagram/profile/highlights

GET /v1/instagram/profile/highlights

The profile's highlight albums: id, title, cover and owner. Look a profile up by handle; a numeric id has no lookup.

  • Cost: 1 credit
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
handlestringone ofUsername, with or without the leading @. Also accepted as username.
idstringone ofNumeric Instagram user id. Also accepted as user_id, userId.

Send at least one of handle, id. If you send several, the first listed is used and the rest are ignored.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

1curl -G "https://api.socialscrape.dev/v1/instagram/profile/highlights" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "handle=nasa"

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_ac815d6b509220e2077170db",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "collection",13        "platform": "instagram",14        "id": "18195781759377100",15        "url": "https://www.instagram.com/stories/highlights/18195781759377100/",16        "kind": "highlight",17        "title": "Roman",18        "description": null,19        "owner": {20          "id": "528817151",21          "handle": "nasa",22          "name": "NASA",23          "url": "https://www.instagram.com/nasa/",24          "avatar_url": "https://scontent-ord5-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=Ca3wE...",25          "verified": true26        },27        "item_count": null,28        "cover_url": "https://scontent-ord5-2.cdninstagram.com/v/t51.71878-15/785745361_1537318174532484_931463605431094788_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=110&ccb=7-5&_nc_sid=acbce5&_nc_ohc=PCbozJYubZ8Q7kNvwHBts6v&_nc_oc=Adq5fnBwqBGqFIJrXGiw7QY2WVkeTUl_i...",29        "updated_at": null,30        "extra": null31      },32      {33        "object": "collection",34        "platform": "instagram",35        "id": "18123023338592759",36        "url": "https://www.instagram.com/stories/highlights/18123023338592759/",37        "kind": "highlight",38        "title": "Wallpapers",39        "description": null,40        "owner": {41          "id": "528817151",42          "handle": "nasa",43          "name": "NASA",44          "url": "https://www.instagram.com/nasa/",45          "avatar_url": "https://scontent-ord5-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=Ca3wE...",46          "verified": true47        },48        "item_count": null,49        "cover_url": "https://scontent-ord5-2.cdninstagram.com/v/t51.71878-15/658392542_1443405937523344_3996096698761393443_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=102&ccb=7-5&_nc_sid=acbce5&_nc_ohc=CEj2IGrdBRsQ7kNvwHJUIyY&_nc_oc=AdqCmoGMLcAK2M9yrSLtdRVW5TJzpy1S...",50        "updated_at": null,51        "extra": null52      }53    ],54    "cursor": null,55    "has_more": false,56    "parent": {57      "object": "profile",58      "platform": "instagram",59      "id": "528817151",60      "handle": "nasa",61      "name": "NASA",62      "headline": null,63      "url": "https://www.instagram.com/nasa/",64      "kind": "unknown",65      "bio": null,66      "avatar_url": "https://scontent-ord5-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=Ca3wE...",67      "banner_url": null,68      "verified": true,69      "is_private": false,70      "external_url": null,71      "links": null,72      "location": null,73      "category": null,74      "created_at": null,75      "stats": {76        "followers": null,77        "following": null,78        "posts": null,79        "likes": null,80        "views": null81      },82      "extra": null83    }84  },85  "cursor": null,86  "has_more": false87}

Response#

A list of Collection objects in data.items, with data.cursor and data.has_more.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.

Also served at#

These paths answer the same request, so code written for other APIs keeps working: /v1/instagram/user/highlights. See Switching from ScrapeCreators.