Instagram API
User Reels
Get reels posted by an Instagram user.
POST
$0.01/call/v1/instagram/user-reelsUsage
const res = await fetch('https://api.yepapi.com/v1/instagram/user-reels', {
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-reels \
-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 | — |
end_cursor | string | No | Pagination cursor from previous response | — |
Response
{
"ok": true,
"data": {
"has_next_page": true,
"end_cursor": "QVFDcE...",
"reels": [
{
"id": "3456789012345678901",
"shortcode": "C5xAbCdEfGh",
"caption": "Watch this incredible migration in the Serengeti",
"like_count": 890000,
"comment_count": 3400,
"play_count": 12000000,
"taken_at": 1712345678,
"video_duration": 30.5,
"display_url": "https://scontent.cdninstagram.com/...",
"video_url": "https://scontent.cdninstagram.com/..."
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.has_next_page | boolean | Whether more reels are available |
data.end_cursor | string | Cursor for fetching the next page |
data.reels | object[] | Array of reel objects |
data.reels[].id | string | Unique reel identifier |
data.reels[].shortcode | string | Reel shortcode (used in URLs) |
data.reels[].caption | string | Reel caption text |
data.reels[].like_count | number | Number of likes |
data.reels[].comment_count | number | Number of comments |
data.reels[].play_count | number | Number of plays/views |
data.reels[].taken_at | number | Unix timestamp of when the reel was published |
data.reels[].video_duration | number | Video duration in seconds |
data.reels[].display_url | string | Cover image URL |
data.reels[].video_url | string | Video playback URL |
Use the end_cursor value from the response to paginate through reels.