Instagram API
User Highlights
Get story highlights from an Instagram user's profile.
POST
$0.01/call/v1/instagram/user-highlightsUsage
const res = await fetch('https://api.yepapi.com/v1/instagram/user-highlights', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ username: 'natgeo' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/instagram/user-highlights \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "natgeo"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
username | string | Yes | Instagram username | — |
Response
{
"ok": true,
"data": {
"username": "natgeo",
"highlights": [
{
"id": "17891234567890123",
"title": "Wildlife",
"cover_media_url": "https://scontent.cdninstagram.com/...",
"item_count": 24,
"items": [
{
"id": "3456789012345678901",
"taken_at": 1712345678,
"is_video": false,
"display_url": "https://scontent.cdninstagram.com/...",
"video_url": null
}
]
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.username | string | Instagram username |
data.highlights | object[] | Array of highlight collections |
data.highlights[].id | string | Unique highlight identifier |
data.highlights[].title | string | Highlight title |
data.highlights[].cover_media_url | string | Highlight cover image URL |
data.highlights[].item_count | number | Number of items in the highlight |
data.highlights[].items | object[] | Array of story items in the highlight |
data.highlights[].items[].id | string | Unique item identifier |
data.highlights[].items[].taken_at | number | Unix timestamp of when the item was posted |
data.highlights[].items[].is_video | boolean | Whether the item is a video |
data.highlights[].items[].display_url | string | Image URL |
data.highlights[].items[].video_url | string|null | Video URL (null for images) |