Part of 60+ Instagram endpoints

Instagram Hashtag API

Look up any public Instagram hashtag by name — get its media count and metadata, plus the top posts and reels filed under it — with a single REST call. No Instagram login or access token required. JSON responses, free tier.

No login or token < 1s responses Public data only Free plan available

What the Instagram Hashtag API does

Hashtags are how Instagram organizes public content around topics, campaigns and communities. The InstaGapi Hashtag API lets you look up any public hashtag by name and read its core metadata — including the total number of public posts filed under it (media_count) — plus pull the actual media surfacing under that tag, all without scraping the Instagram app or managing a login.

Send a single authenticated GET request with a hashtag name. /api/v1/hashtag/by/name returns one hashtag object with its id, name, media_count and profile_pic_url, alongside flags like allow_following, is_following and is_top_media_only. To fetch the content itself, call /medias/top for the top-performing posts under the tag or /medias/clips for reels — both return a raw JSON array of media objects you can iterate directly.

Hashtag metadata

Media count, id and follow flags per tag

Top media

Best-performing posts under any tag

Reels feed

Clips filed under a hashtag as JSON

Quick example

Just send your key in the X-Api-Key header:

curl -H "X-Api-Key: sk_live_your_key_here" \
  "https://api.instagapi.com/api/v1/hashtag/by/name?name=nike"

Example response

Simplified for readability — see the docs for the full schema.

{
  "id": "17843712345678901",
  "name": "nike",
  "media_count": 118473926,        // total public posts filed under this tag
  "profile_pic_url": "https://scontent.cdninstagram.com/.../hashtag_nike.jpg",
  "allow_following": true,
  "is_following": false,
  "is_top_media_only": false
}

Endpoints

GET
/api/v1/hashtag/by/name

Get hashtag info (media count, etc.)

name
GET
/api/v1/hashtag/medias/top

Get top media for a hashtag

name
GET
/api/v1/hashtag/medias/clips

Get reels for a hashtag

name

What you can build with it

Trend & hashtag analytics

Track how media_count grows over time to gauge a topic's momentum, or benchmark related tags against each other.

Campaign monitoring

Measure reach and adoption of a branded or event hashtag by pulling the top posts and reels that use it.

Content & UGC discovery

Surface fresh public media under a tag to source user-generated content, spot creators or find on-trend posts.

Market & competitor research

Compare hashtag volumes across niches and rivals to inform content strategy and paid-targeting decisions.

Related endpoints

One of 60+ endpoints. Explore more in the full documentation:

Frequently asked questions

What does the Instagram Hashtag API return?

GET /api/v1/hashtag/by/name returns a single hashtag object — id, name, media_count, profile_pic_url, allow_following, is_following and is_top_media_only. The /medias/top and /medias/clips endpoints each return a raw JSON array of media objects for that tag.

How do I get the number of posts for a hashtag?

Call /api/v1/hashtag/by/name with the tag name and read the media_count field — it holds the total number of public posts Instagram has filed under that hashtag.

What's the difference between /medias/top and /medias/clips?

/medias/top returns the top-ranked media for a hashtag (the tag's Top grid), while /medias/clips returns only reels (video clips) filed under it. Both take a name parameter and return a raw JSON array.

Do I need an Instagram login or access token?

No. You authenticate with your InstaGapi key in the X-Api-Key header — there is no Instagram OAuth, password or access token to manage.

Is scraping Instagram hashtag data allowed?

InstaGapi is an independent tool, not affiliated with Instagram or Meta, and returns publicly available data only. You are responsible for using that data in line with Instagram's terms and any laws that apply in your jurisdiction.

Do I pass the hashtag with or without the # symbol?

Pass just the tag text in the name parameter — for example name=nike, not #nike. Names are matched without the leading # character.

Start pulling Instagram hashtag data in minutes

Create a free account, grab your API key, and make your first request today. No credit card required.