Posts
The latest posts and Reels of a public Instagram account: caption, likes, comments, views, date, type, hashtags and media links.
Try it in the dashboard 10 free credits when you sign up, no card.
GET/v1/instagram/posts
Costs 1 credit per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
usernamerequired |
string | Instagram username (nasa or @nasa) or profile URL. |
typeoptional |
string | all: the posts grid as Instagram shows it. reels: Reels only. photos: photo and carousel posts only. One of: all, reels, photos. Default: all. |
limitoptional |
integer | How many of the latest posts to return. Default: 12. From 1 to 12. |
Example request
curl "https://pipefetch.com/v1/instagram/posts?username=nasa" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/instagram/posts?username=nasa', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/instagram/posts",
params={"username": "nasa"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]Example response
A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.
{
"data": {
"account": {
"username": "nasa",
"fullName": "NASA",
"id": "528817151",
"isVerified": true,
"followers": 104242414
},
"posts": [
{
"id": "4041963370596640402",
"shortCode": "DgX8EUzjaaS",
"url": "https://www.instagram.com/p/DgX8EUzjaaS/",
"type": "Image",
"productType": null,
"caption": "Whee! 🤸\n\nThe Cartwheel Galaxy formed as the result of a high-speed collision that occurred about 400 million years ago. Despite the impact, this gala…",
"hashtags": [
"NASA",
"Galaxy"
],
"mentions": [],
"likes": 184321,
"comments": 863,
"views": null,
"videoDuration": null,
"postedAt": "2026-11-30T17:26:50.000Z",
"engagementRate": 0.1776,
"isPinned": false,
"isPaidPartnership": false,
"location": null,
"coauthors": [],
"imageUrl": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-15/937581708_18674448895049152_7974541415753429337_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=1&ig_cache_k…",
"videoUrl": null,
"carouselItems": 0
},
{
"id": "4040808299306161664",
"shortCode": "DgT1b01mBYA",
"url": "https://www.instagram.com/p/DgT1b01mBYA/",
"type": "Image",
"productType": null,
"caption": "Have you finished your application to join NASA's astronaut corps?\n\nTime is running out — submit your info by 11:59 p.m. EST on Thursday, Dec. 3.\n\n#NA…",
"hashtags": [
"NASA",
"Astronaut"
],
"mentions": [],
"likes": 110721,
"comments": 1422,
"views": null,
"videoDuration": null,
"postedAt": "2026-11-29T19:15:01.000Z",
"engagementRate": 0.1076,
"isPinned": false,
"isPaidPartnership": false,
"location": null,
"coauthors": [],
"imageUrl": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-15/936664021_18673965166049152_2290026260522370931_n.jpg?stp=dst-jpg_e35_s1080x1080_sh2.08_tt6&_n…",
"videoUrl": null,
"carouselItems": 0
}
]
},
"credits": {
"used": 1,
"remaining": 99
}
}Good to know
- The latest posts as a visitor who is not logged in sees them, newest first, up to 12. Pinned posts come first on Instagram and are marked isPinned.
- views is filled for Reels and videos; likes is null when the account hides like counts. engagementRate is (likes + comments) per 100 followers.
- A private account answers 404 private_account and an account that does not exist 404 not_found; neither costs anything. When Instagram refuses the request, the answer is 502 upstream_error, free and worth a retry.
Errors
Every error has the same shape, and none of them is charged. The full list is in the error reference.
Looking for an overview and use cases? See the Instagram Posts API page.