Search

Instagram business and creator accounts named after a keyword, with follower counts, or the hashtags for a word with post counts.

Try it in the dashboard 100 free credits when you sign up, no card.

GET/v1/instagram/search

Costs 1 credit per request. Only requests that return data are charged.

Parameters

NameTypeDescription
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.

Example request

curl "https://pipefetch.com/v1/instagram/search?q=coffee+shop&type=user" \
  -H "x-api-key: YOUR_API_KEY"

Example response

A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.

200 OK · application/json
{
  "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
  }
}

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.

Errors

Every error has the same shape, and none of them is charged. The full list is in the error reference.

Looking for an overview and use cases? See the Instagram Search API page.