Instagram API
User Stories
Get current active stories from an Instagram user.
POST
$0.01/call/v1/instagram/user-storiesUsage
const res = await fetch('https://api.yepapi.com/v1/instagram/user-stories', {
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-stories \
-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",
"stories": [
{
"id": "3456789012345678901",
"taken_at": 1712345678,
"expiring_at": 1712432078,
"is_video": false,
"display_url": "https://scontent.cdninstagram.com/...",
"video_url": null,
"video_duration": null
},
{
"id": "3456789012345678902",
"taken_at": 1712350000,
"expiring_at": 1712436400,
"is_video": true,
"display_url": "https://scontent.cdninstagram.com/...",
"video_url": "https://scontent.cdninstagram.com/...",
"video_duration": 12.3
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.username | string | Instagram username |
data.stories | object[] | Array of active story items |
data.stories[].id | string | Unique story item identifier |
data.stories[].taken_at | number | Unix timestamp of when the story was posted |
data.stories[].expiring_at | number | Unix timestamp of when the story expires |
data.stories[].is_video | boolean | Whether the story item is a video |
data.stories[].display_url | string | Image URL (or video cover for video stories) |
data.stories[].video_url | string|null | Video URL (null for image stories) |
data.stories[].video_duration | number|null | Video duration in seconds (null for image stories) |
Stories are ephemeral and typically expire after 24 hours.