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_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | Username, with or without the leading @. Also accepted as username. |
id | string | one of | Numeric 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:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.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"1import os2import requests34params = {5 "handle": "nasa",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/instagram/profile/highlights",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/instagram/profile/highlights");2url.search = new URLSearchParams({3 "handle": "nasa"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Instagram story highlights",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/instagram/profile/highlights",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "handle",19 "value": "nasa"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
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.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The 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.
Related endpoints#
- Instagram profile (
GET /v1/instagram/profile) - Instagram profile by user id (
GET /v1/instagram/basic-profile) - Instagram profile post count (
GET /v1/instagram/profile/post-count) - Instagram profile posts (
GET /v1/instagram/profile/posts) - Instagram profile reels (
GET /v1/instagram/profile/reels) - Instagram post or reel details (
GET /v1/instagram/post) - Instagram reel transcript (
GET /v1/instagram/post/transcript) - Instagram post comments (
GET /v1/instagram/post/comments)