Instagram Saved Highlight Items
instagram.highlights.items.get
Get the saved stories inside one highlight collection, from the profile and collection ID.
At a glance
- Endpoint ID
instagram.highlights.items.get- Price
- 1.5 credits per call; failed calls are free
- Runs for up to
- 120 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "instagram.highlights.items.get", "input": { "collection_id": "18195781759377100", "limit": 10, "username": "nasa" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "instagram.highlights.items.get", "input": { "collection_id": "18195781759377100", "limit": 10, "username": "nasa" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "instagram.highlights.items.get", "input": { "collection_id": "18195781759377100", "limit": 10, "username": "nasa" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
collection_id |
string | yes | Collection identifier. | 18195781759377100 |
username |
string | yes | nasa | |
limit |
integer | no | Maximum number of results to return. From 1 to 100. Default: 100. |
10 |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "summary": { "available_on_page": 1, "collection_id": "18195781759377100", "continuation_supported": false, "owner_id": "528817151", "owner_username": "nasa" }, "items": [ { "id": "3975089864169193671_528817151", "media_id": "3975089864169193671", "media_type": 2, "taken_at": 1788087653 } ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
items[].id |
string | The highlight item's ID. | 3975089864169193671_528817151 |
items[].media_id |
string | The ID of the photo or video. | 3975089864169193671 |
items[].media_type |
integer | Instagram's media type: 1 a photo, 2 a video, 8 a carousel. | 2 |
items[].taken_at |
integer | When it was posted, as a Unix time in seconds. | 1,788,087,653 |
items |
array | The photos and videos saved in the highlight. | 1 records |
summary |
object | Totals and paging details for this answer. | 5 fields |
summary.available_on_page |
integer | How many items the highlight shows. | 1 |
summary.collection_id |
string | The highlight's ID, from the highlights list. | 18195781759377100 |
summary.continuation_supported |
boolean | Whether a next page can be requested; always false here. | false |
summary.owner_id |
string | The account's Instagram ID. | 528817151 |
summary.owner_username |
string | The account's username. | nasa |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Instagram endpoints
instagram.audio-reels.listReels by audioinstagram.comments.listCommentsinstagram.embed.getEmbedinstagram.explore.listExploreinstagram.hashtag-posts.searchHashtag posts searchinstagram.hashtag.searchHashtag keyword searchinstagram.highlights.listHighlightsinstagram.location.getLocationinstagram.popular.searchPopular searchinstagram.post.getPostinstagram.profile-posts.listProfile postsinstagram.profile.basicBasic profile by IDinstagram.profile.getProfileinstagram.profile.searchProfiles searchinstagram.reels.listReelsinstagram.reels.searchReels searchinstagram.topic.searchTopic searchinstagram.topics.listTopics
Something missing or unclear? Ask the team that builds the Instagram endpoints.