Instagram API
User Tagged Posts
Get posts in which an Instagram user has been tagged.
POST
$0.01/call/v1/instagram/user-taggedUsage
const res = await fetch('https://api.yepapi.com/v1/instagram/user-tagged', {
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-tagged \
-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...",
"posts": [
{
"id": "3456789012345678901",
"shortcode": "C5xAbCdEfGh",
"type": "GraphImage",
"caption": "Amazing shot featured by @natgeo",
"like_count": 125000,
"comment_count": 340,
"taken_at": 1712345678,
"display_url": "https://scontent.cdninstagram.com/...",
"owner": {
"username": "photographer_name",
"profile_pic_url": "https://scontent.cdninstagram.com/..."
}
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.has_next_page | boolean | Whether more posts are available |
data.end_cursor | string | Cursor for fetching the next page |
data.posts | object[] | Array of tagged post objects |
data.posts[].id | string | Unique post identifier |
data.posts[].shortcode | string | Post shortcode (used in URLs) |
data.posts[].type | string | Post type: GraphImage, GraphVideo, or GraphSidecar |
data.posts[].caption | string | Post caption text |
data.posts[].like_count | number | Number of likes |
data.posts[].comment_count | number | Number of comments |
data.posts[].taken_at | number | Unix timestamp of when the post was published |
data.posts[].display_url | string | Full-size image URL |
data.posts[].owner | object | Post author information |
Use the end_cursor value from the response to paginate through tagged posts.