Instagram Search API
Send a keyword and get the Instagram accounts of businesses and creators named after it, with exact follower counts, or the hashtags for it with their post counts. Accounts are found through the advertiser search of Meta's Ad Library, because Instagram has no account search without a login.
- 100 free credits
- No card needed
- No login, cookies or proxies
curl "https://pipefetch.com/v1/instagram/search?q=coffee+shop&type=user" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/instagram/search?q=coffee+shop&type=user', {
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/search",
params={"q": "coffee shop", "type": "user"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]What you get
- Accounts named after your words: username, profile address, exact follower count and verified badge
- The Facebook Page each account is linked to: its name, category, address and like count
- With type=hashtag, the hashtags Instagram's hashtag search returns for a word
- For each hashtag its exact post count, Instagram's rounded label such as 185M posts, and a popularity of frequent, average or rare
- The results in the order the source ranks them, with the query as it was searched
{
"data": {
"query": "coffee shop",
"type": "user",
"results": [
{
"username": "avshop.coffee",
"url": "https://www.instagram.com/avshop.coffee/",
"followerCount": 94,
"isVerified": false,
"imageUrl": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-1/571153310_814575698219638_2006001708374922021_n.jpg?stp=dst-jpg_s200x200_tt6&_nc_cat=106&_nc_map=ur…",
"facebookPage": {
"id": "105371192470411",
"name": "AV Shop Coffee",
"url": "https://www.facebook.com/AV.SHOP.BG",
"category": "Coffee shop",
"likeCount": 2112,
"isVerified": false
}
},
{
"username": "coffeeshoplaunchpad",
"url": "https://www.instagram.com/coffeeshoplaunchpad/",
"followerCount": 1947,
"isVerified": false,
"imageUrl": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-1/619286859_10162327760005998_1301817766707201940_n.png?stp=dst-png_p200x200&_nc_cat=106&_nc_map=urlg…",
"facebookPage": {
"id": "906691215867925",
"name": "Coffee Shop Launchpad",
"url": "https://www.facebook.com/906691215867925",
"category": "Education website",
"likeCount": 837,
"isVerified": false
}
}
]
},
"credits": {
"used": 1,
"remaining": 99
}
}One GET request
Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.
GET/v1/instagram/search
Costs 1 credit per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
qrequired |
string | What to search for, up to 80 characters: the words an account is named after (coffee shop), or a word to find hashtags for (coffee). |
typeoptional |
string | user finds accounts through the advertiser search of Meta's Ad Library; hashtag asks Instagram's hashtag search. One of: user, hashtag. Default: user. |
limitoptional |
integer | How many results to return. An account search has 15 at most, and usually fewer. Default: 20. From 1 to 20. |
Good to know
- Instagram has no account search without a login, so type=user asks the advertiser search of Meta's Ad Library, which suggests Facebook Pages and Instagram advertiser accounts by name. A result is a suggestion that has an Instagram account and whose Page name, Facebook address or Instagram username contains every search word, filler words such as the, and or best aside.
- The accounts found are therefore those of businesses, brands, organizations and creators, in the order Meta suggests them. They are not what the search box of the Instagram app shows, and a personal account with no Facebook Page behind it is not found. Meta suggests about 15 names for a query, so one search returns 15 accounts at most and usually fewer.
- An account comes with its username, address, exact follower count, verified badge and the picture Meta shows for it, and with the Facebook Page it is linked to: name, category, address and likes. The name and the category are the Page's. The bio, post count, links and posts are not part of a search result: the profile endpoint returns those for one account.
- type=hashtag asks Instagram's own hashtag search, with the spaces of q removed (coffee shop looks for coffeeshop). A hashtag comes with its exact post count, Instagram's rounded label (185M posts) and a popularity: frequent for a million posts or more, average for 100,000 or more, rare below that. postCount is null for a hashtag so large that Instagram states only its counter's ceiling.
- A search that finds nothing answers 404 no_results and costs nothing.
What people build with it
Find businesses in a niche
Search coffee shop and get accounts named after it, each with the category of its Facebook Page and a follower count to sort by.
Start a list for outreach
Collect the usernames for a keyword, then read the accounts you care about in full with the profile endpoint.
Pick hashtags
See the hashtags Instagram returns for a word and how many posts each one has, and choose the ones that fit your reach.
Match a business to its accounts
An account result names the Facebook Page it is linked to, so you get both in one answer.
Buy credits once. Use them whenever.
This endpoint costs 1 credit per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.
Each endpoint says what a request costs. Requests that return nothing are free.
- $2.42 per 1,000 credits
- About $12.08 a month at this pace
- Lasts about 2.4 months at this pace
- Credits never expire
Questions and answers
Is this the search of the Instagram app?
No. Instagram answers an account search only to a logged-in user, and this API uses no login. For accounts it asks the advertiser search of Meta's Ad Library, the public tool in which anyone can look up advertisers by name. That search suggests Facebook Pages and Instagram advertiser accounts, and a result is a suggestion that has an Instagram account and is named after your words. For hashtags it asks Instagram's own hashtag search, which answers without a login.
Which accounts does it find, and which not?
Accounts of businesses, brands, organizations and creators: those with a Facebook Page behind them, or that advertise from Instagram. A personal account with no Page is not found. An account is matched by its name: every search word, filler words such as the, and or best aside, has to appear in the Page name, its Facebook address or the Instagram username. So coffee shop finds accounts with coffee and shop in their name, not accounts that only post about coffee. Meta suggests about 15 names for a query, so one search returns 15 accounts at most and usually fewer.
What does an account result contain?
The username, the profile address, the exact follower count, the verified badge and the picture Meta shows for the account, and the linked Facebook Page with its name, category, address and likes. The name and the category are the Page's, not the Instagram display name. The bio, the post and following counts, links and posts are not included: the profile endpoint returns those for one account at a time.
What do I get for hashtags?
Up to 20 hashtags for the word, in Instagram's order, each with its exact post count, the rounded label Instagram shows (185M posts) and a popularity: frequent for a million posts or more, average for 100,000 or more, rare below that. Spaces are removed first, so coffee shop looks for coffeeshop. The posts under a hashtag are not returned.
Is this the official Instagram API?
No. Pipefetch is an independent service and is not affiliated with Instagram or Meta. It needs no Instagram account, token or app review, and it returns only what Meta and Instagram show without a login. Places and Reels cannot be searched here.
Do the results contain personal data?
They can. Most accounts found this way belong to businesses, but a creator's account or a one-person business belongs to a person: then it is personal data, data-protection law such as the GDPR applies to whoever stores it, and our terms forbid using the API to harass people or to build profiles of private individuals.
What does a search cost?
One request costs 1 credit. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 100 free credits without a card. A search that finds nothing answers 404 no_results and is free. Reading one account in full with the profile endpoint costs 2 credits.
Step-by-step guides
How to get an Instagram follower count in Python
Three ways with code: Meta's official API for business and creator accounts, the Instaloader library and an HTTP API, and where each stops.
Read the guideInstagram Basic Display API alternatives: what to use after the shutdown
What Meta shut down on December 4, 2024, what it offers now and for whom, and what is left for reading a public profile you do not own.
Read the guideHow to calculate an Instagram engagement rate in Python
The common formulas, which of them work for an account you do not own, and Python code that computes the rate from public numbers.
Read the guideHow to get an Instagram follower count in Node.js
Meta's official API with a fetch call, what the npm packages ask of you, and an HTTP API with fetch or its npm client, and where each one stops.
Read the guideHow to get Instagram Reel views in Python
Meta's two official routes to a Reel's views and whom they cover, Instaloader, and an HTTP API for the latest Reels of any public account.
Read the guide
More Instagram APIs
Other sources
YouTubeWebsitesTikTokFacebookGoogleThreadsLinkedInApp storesSteamXPinterestAirbnbReal estateKeywordsJob boardsEventbriteShopify storesPublic tenders
Make your first request in a minute
Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.