Instagram API: get posts by user, tag or place
How to get Instagram posts by API: a user's feed, their reels, posts they are tagged in, posts under a hashtag or at a place, and the fields each returns.
The short answer
- By user: send a username and a limit, and get that profile's posts with caption, likes, comments, media and time.
- Meta's API returns another account's posts only through Business Discovery, and never a personal account's.
- By tag or place: the same call shape works for a hashtag, a location, or posts a user was tagged in.
Read this as
Developer
Every feed endpoint takes `limit` and pages for you, so you ask for 200 posts once instead of walking cursors. Each row carries the post's shortcode, which is what you pass to the comments endpoint next.
Example The last 100 posts from 30 accounts is 3,000 rows: $1.50.
Marketer
Type a username into the dashboard, choose posts, and open the rows as a table. Sort by likes or comments to find what worked for a competitor.
Example A competitor's last 200 posts cost $0.10.
Agency
Pull each client's competitors once a week and compare post counts, likes and comments side by side. The limit on each run caps the bill before it starts.
Example 5 clients, 4 competitors each, 50 posts per account is 1,000 rows: $0.50.
Researcher
For a sample of public posts, combine a hashtag or a place with a date window you filter on `taken_at`. Each row says when it was posted.
Example 5,000 posts under one hashtag cost $2.50.
To get Instagram posts by API, you send a username, a hashtag or a place, and a limit. The API returns one row per post with the caption, like and comment counts, media links and the time it was posted.
How do I get a user's posts with the official Instagram API?
With Meta's API, a user's posts come from the media edge of an account that logged in to your app. For any other account you call Business Discovery with its exact username, and it only answers for business and creator accounts. Personal accounts return nothing. You also need a Meta developer app, a professional Instagram account of your own, an access token and, past testing, App Review.
How do I get a user's posts with SocialHolmes?
One call to the posts endpoint with a username and a limit. The username can be any public account, business, creator or personal, with or without the @. You get back up to `limit` posts, newest first.
What a posts run returns
| Code | Caption | Like count | Comment count | Taken at |
|---|---|---|---|---|
| DB4kq2LsY1x | New drop is live | 18,420 | 312 | 2026-11-10 |
| DB1wPz8tQ9r | Behind the scenes from the shoot | 9,107 | 145 | 2026-11-07 |
| DAzR0mNcV4k | Which colour should we make next? | 12,754 | 1,086 | 2026-11-03 |
[
{
"code": "DB4kq2LsY1x",
"caption": "New drop is live",
"like_count": 18420,
"comment_count": 312,
"taken_at": "2026-11-10"
},
{
"code": "DB1wPz8tQ9r",
"caption": "Behind the scenes from the shoot",
"like_count": 9107,
"comment_count": 145,
"taken_at": "2026-11-07"
},
{
"code": "DAzR0mNcV4k",
"caption": "Which colour should we make next?",
"like_count": 12754,
"comment_count": 1086,
"taken_at": "2026-11-03"
}
]
Which endpoint lists which posts?
| You want | Endpoint |
|---|---|
| A profile's post feed | posts, with a username and a limit. |
| Only the profile's reels | reels, from the Reels tab. |
| Posts other people tagged the profile in | tagged. Useful for finding creators who already post about a brand. |
| Posts under a hashtag | hashtag, with the tag and a limit. No 30-tags-a-week cap. |
| Posts at a place | location. Name the place, for example a city, a venue or a mall. |
| One post in full | post, with the shortcode from the post's URL. |
How do I get the comments on those posts?
Take the `code` from each post row and pass it to the comments endpoint with a limit. Comments come back one row each, with the author, text, like count and time. Posts with comments turned off return no rows and cost nothing.
Posts, then comments
The comments only. The 20 post rows add 20 more.
Can I get posts by date?
Feeds are returned newest first, so a limit sized to the period you want covers it, and you filter the rows on `taken_at`. Instagram does not offer a date filter on a profile feed, so neither does any API that reads it. For a hashtag or a place, the same approach works.
What can SocialHolmes return for Instagram?
Public endpoints: 11
| Endpoint | What it returns | Takes |
|---|---|---|
| profile | Profile details — bio, follower counts, verification. | username |
| posts | A profile's post feed. | username |
| reels | Reels from a profile's Reels tab. | username |
| post | Details of one post — caption, counts, media, dimensions. | shortcode |
| comments | Comments on one post. | shortcode |
| tagged | Posts where this profile was tagged by someone else. | username |
| hashtag | Posts under a hashtag. | tag |
| location | Posts tagged at a place. Name the place; use `limit` to say how many you want. | place |
| creators | Creators ranked from a keyword search. Put the niche and the place in one query — "finance kolkata". One page load, so it is fast, and because a feed row carries no follower count the ranking is engagement totalled across each account's posts in the results rather than an engagement rate. Instagram shows results based on where the search is made, and our searches run from India. Put the place in the query ("toscana italy") for creators elsewhere; `country` alone may still return Indian creators. | query |
| highlights | A profile's highlight albums — title, cover and item count. | username |
| highlight | The stories saved inside one highlight. | highlight_id |
Every endpoint is on one key and one rate.
What SocialHolmes costs
$0.50 per 1,000 results on every Instagram endpoint, with no subscription and no monthly minimum. A run that returns nothing costs nothing, and the `limit` you set is the most a run can bill. New accounts get 1,000 free results.
Questions people ask
How do I get all posts from an Instagram user by API?
Call a posts endpoint with the username and a limit at least as large as the account's post count. Meta's API only does this for accounts that logged in to your app, or for business and creator accounts through Business Discovery.
Can the Instagram API get posts from a personal account?
Not Meta's API, unless the account owner logs in to your app. A public-data API can read any public account, personal ones included.
Can I get Instagram posts by location with an API?
Meta's API has no location search. Here the location endpoint takes a place name and returns posts tagged there, up to your limit.
Does the Instagram API return like counts?
Yes. Each post row carries its like count and comment count, along with the caption, media and the time it was posted.
How many posts can I get per request?
As many as you set in `limit`, up to what the profile has. The run pages through the feed for you.
Posts are published in English only. The rest of the site reads in ten languages; these do not, because a translated archive is one nobody keeps current.
Try it on your own targets
The only comparison that settles anything is your own. A new account gets 1,000 credits, needs no card, and runs on the same endpoints and rate as a paying one.