Answers
How do I find Instagram creators in a niche and sort them by follower count?
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
- 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.
- Collect posts. Instagram hashtag posts, five pages per tag. Each post carries
author.username. - 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.
- Pull profiles. Instagram account profile 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.
- Check engagement on the finalists. Instagram account posts returns the latest 12 posts with likes, comments and plays. Median likes divided by followers shows whether the audience reacts.
- Fill gaps by name. Instagram account 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
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, and the creator discovery page runs it across platforms.
Sources
Where people asked this (read 2026-11-15)
Updated