# How do I find Instagram creators in a niche and sort them by follower count?

> Build a shortlist of Instagram creators for a niche: collect posts from its hashtags, group them by author, then pull followers, bio and recent engagement. Steps, cost and Python.

Canonical page: https://okdata.online/answers/find-instagram-creators-by-niche/

**Short answer: **Collect posts from the niche's hashtags with Instagram hashtag posts ($0.004 per page of about 10), count how often each author turns up, then pull followers, bio and links for the top names with Instagram account profile ($0.004 each). A shortlist built from 10 hashtags × 5 pages and 150 profiles costs $0.80.

A coffee roaster in Berlin wants 25 creators with 5,000 to 50,000 followers who post about brewing at home, to send them a bag of beans each. Instagram has no public directory of creators, and its official API cannot search for them: Business Discovery returns the followers and posts of a professional account only once you already know its username. The creators do show up under the hashtags they use. That is the method people keep proposing on developer forums: take a tag, collect the accounts that posted to it, then sort them by followers.

## The method

1. **Write the niche as hashtags.** Pick ten tags your buyers follow: #pourover, #homebarista, #v60, #specialtycoffee, #coffeeathome and so on. Smaller tags give more focused creators.
2. **Collect posts.** [Instagram hashtag posts](/apis/instagram/hashtags/posts/list/), five pages per tag. Each post carries `author.username`.
3. **Group by author.** Count posts and distinct tags per account. An account that turns up under four tags lives in the niche; one lucky post turns up once.
4. **Pull profiles.** [Instagram account profile](/apis/instagram/users/get/) for the top 150 handles returns followers, following, post count, bio and verification, whether the account is private, and the website and links on the profile.
5. **Check engagement on the finalists.** [Instagram account posts](/apis/instagram/users/posts/list/) returns the latest 12 posts with likes, comments and plays. Median likes divided by followers shows whether the audience reacts.
6. **Fill gaps by name.** [Instagram account search](/apis/instagram/users/search/) ($0.002) returns about 20 accounts for a keyword such as "home barista", with handle, name and verification but no follower counts. Feed the handles into step 4.

## Cost

| Step | Calls | Cost |
|---|---|---|
| 10 hashtags × 5 pages | 50 | $0.20 |
| 150 profiles | 150 | $0.60 |
| Latest 12 posts for 40 finalists | 40 | $0.16 |
| Whole shortlist | 240 | $0.96 |

## Script

```python
import os, statistics, requests
from collections import defaultdict

API = "https://api.okdata.online"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}

def get(path, **params):
    body = requests.get(API + path, headers=H, params=params, timeout=60).json()
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']}")
    return body

TAGS = ["pourover", "homebarista", "v60", "specialtycoffee", "coffeeathome"]
seen = defaultdict(lambda: {"posts": 0, "tags": set()})
for tag in TAGS:
    cursor = None
    for _ in range(5):
        body = get("/v1/instagram/hashtags/posts/list", id=tag, **({"cursor": cursor} if cursor else {}))
        for p in body["data"]["items"]:
            name = p["author"]["username"]
            if name:  # now and then a page carries no author names
                seen[name]["posts"] += 1
                seen[name]["tags"].add(tag)
        if not body["page"]["has_more"]:
            break
        cursor = body["page"]["next_cursor"]

top = sorted(seen, key=lambda u: (len(seen[u]["tags"]), seen[u]["posts"]), reverse=True)[:150]
profiles = [get("/v1/instagram/users/get", username=u)["data"]["item"] for u in top]
fit = [p for p in profiles if 5_000 <= (p["followers"] or 0) <= 50_000]

for p in fit[:40]:
    try:
        recent = get("/v1/instagram/users/posts/list", username=p["username"])["data"]["items"]
    except RuntimeError:  # private accounts show a profile but no posts
        continue
    likes = statistics.median([x["metrics"]["likes"] or 0 for x in recent]) if recent else 0
    print(p["username"], p["followers"], f"{likes / p['followers']:.1%}", (p["bio"] or "")[:60])
```

## What this will not tell you

- Audience age, gender and country are not public, so they are not here.
- Creators who never use your hashtags stay invisible. Widen the tag list rather than paging deeper; hashtag results are a sample, and paging ends after a limited number of pages.
- There is no contact email field. Many creators put an email address or a link page in the bio, which the profile returns.
- A follower count can be bought. The engagement check in step 5 is what catches that, so do not skip it for the accounts you will pay.

## Alternatives

Business Discovery in the Graph API is free per call and fine for checking followers of accounts you already know, as long as you have a professional account and an app, and the creator has a professional account too. Influencer databases save the search step for a monthly fee. For a first list of twenty names, scrolling the tags in the app works as well. The same method on TikTok is described in [finding TikTok creators by niche](/answers/find-tiktok-creators-by-niche/), and the [creator discovery page](/solutions/creator-discovery/) runs it across platforms.

## Endpoints used

- [Instagram hashtag posts](https://okdata.online/apis/instagram/hashtags/posts/list/) `instagram.hashtags.posts.list`: $0.004 per call · about 10 posts per page
- [Instagram account profile](https://okdata.online/apis/instagram/users/get/) `instagram.users.get`: $0.004 per call
- [Instagram account posts](https://okdata.online/apis/instagram/users/posts/list/) `instagram.users.posts.list`: $0.004 per call · about 12 posts per page
- [Instagram account search](https://okdata.online/apis/instagram/users/search/) `instagram.users.search`: $0.002 per call · about 20 accounts per page

## More about Instagram

- [Instagram API](https://okdata.online/apis/instagram/)
- [Instagram API in Python: profiles, posts and comments (2026)](https://okdata.online/guides/instagram-api-python/)
- [How do I get an Instagram account's follower count through an API?](https://okdata.online/answers/instagram-follower-count-api/)
- [Is there an MCP server that lets Cursor search TikTok, Instagram and Reddit?](https://okdata.online/answers/cursor-mcp-tiktok-instagram-reddit/)
- [How do I get Instagram posts for a hashtag through an API?](https://okdata.online/answers/instagram-hashtag-posts-api/)
- [How do I get the transcript of an Instagram reel?](https://okdata.online/answers/instagram-reel-transcript-api/)
- [How can I get the comments on someone else's Instagram post through an API?](https://okdata.online/answers/instagram-comments-api-other-accounts/)
- [Hashtag posts API](https://okdata.online/roles/topics-posts-list/)
- [Profile API](https://okdata.online/roles/accounts-get/)
- [Account posts API](https://okdata.online/roles/accounts-posts-list/)
- [Account search API](https://okdata.online/roles/accounts-search/)

## Sources

Where people asked this (read 2026-11-15): 

- https://stackoverflow.com/questions/44627363
- https://stackoverflow.com/questions/44688090
- https://stackoverflow.com/questions/68302414

Updated 2026-11-15
