~ / endpoints / Search & Hashtag API

Instagram Search & Hashtag Scraper API

Our Instagram search scraper takes a hashtag or keyword and returns the matching public posts as JSON: shortcode, caption, thumbnail, media type, and permalink, all from one request.

Get a free API keyBrowse the endpoints
1,000
free requests / mo
2.6s
median response
hashtag
or keyword input
JSON
structured output

Use it for

>

Hashtag monitoring

Track a campaign or branded hashtag and pull every fresh public post into your own store.
>

Content discovery

Surface top posts for a keyword to feed a curation feed or a research dashboard.
>

Competitor tracking

Watch the terms your competitors rank for and see the creatives showing up under them.
>

Trend research

Sample posts across a topic to gauge volume, formats, and recurring themes over time.

Quickstart

cURL
curl "https://api.instagramscraperapi.com/api/v1/instagram/search?q=travel&api_key=$API_KEY"
Python
import requests, os

BASE = "https://api.instagramscraperapi.com"
API_KEY = os.environ["API_KEY"]

data = requests.get(
    f"{BASE}/api/v1/instagram/search",
    params={"q": "travel", "api_key": API_KEY},
    timeout=30,
).json()

for row in data["results"]:
    print(row)

Response

200 OK
{
  "query": "travel",
  "results": [
    {
      "shortcode": "C5xAbc123",
      "caption": "Sunrise over the Dolomites",
      "thumbnail": "https://scontent.cdninstagram.com/v/t51.2885-15/abc.jpg",
      "media_type": "image",
      "url": "https://www.instagram.com/p/C5xAbc123/"
    },
    {
      "shortcode": "C5yDef456",
      "caption": "Weekend in Lisbon",
      "thumbnail": "https://scontent.cdninstagram.com/v/t51.2885-15/def.jpg",
      "media_type": "video",
      "url": "https://www.instagram.com/p/C5yDef456/"
    }
  ]
}
FieldTypeDescription
querystringThe hashtag or keyword you passed as q.
resultsarrayMatching public posts, newest first.
shortcodestringThe post shortcode, the stable id in the /p/{shortcode}/ URL.
captionstringThe post caption text when public.
thumbnailstringURL of the post thumbnail image.
media_typestringimage, video, or carousel.
urlstringThe canonical post permalink.

How it works

  1. Send a GET with your hashtag or keyword as q and your API key.
  2. We route through residential proxies, handle anti-bot, and parse the public results.
  3. You get validated JSON back, ready to use.

How it compares

Our APIDIY (requests / headless)Official Graph API
Hashtag or keyword inputYes, one q parameterManual fetch and parseHashtag Search needs a Business account and review
Public post fieldsShortcode, caption, thumbnail, media typePossible, parser breaks oftenOnly your own or consented media
SetupAPI key onlyResidential proxies, headless browser, parsersApp review, tokens, rate windows
Login and cookiesNone, logged-out onlyYou manage sessionsApp access token required

Pricing

PlanPriceBest for
Free1,000 requestsTesting and small jobs
Pro$0.60 / 1kProduction workloads
Pay-as-you-go$0.90 / 1kSpiky or one-off volume

Median response 2.6s. You only pay for successful requests.

FAQ

What is an Instagram search scraper?

It is a tool that reads Instagram public search and hashtag results and returns them in a structured format. Our API takes a hashtag or keyword in the q parameter and returns matching public posts as JSON, each with a shortcode, caption, thumbnail, media type, and permalink.

Can I search by hashtag?

Yes. Pass the hashtag as q, with or without the leading number sign. The endpoint resolves it and returns the public posts that carry it, newest first.

Are likes and comment counts included?

The logged-out search surface exposes the shortcode, caption, thumbnail, media type, and permalink reliably. Like and comment counts are frequently absent for guests, so those fields come back null when Instagram does not render them. We return the real values and never guess.

How many results come back per call?

One call returns the first public page of results for the term. To go deeper, page through with follow-up calls using the returned cursor when present.

How fast is the API?

Median end-to-end response is about 2.6 seconds, including residential routing, anti-bot handling, retries, and parsing.

Get search & hashtag api as JSON
Free plan, 1,000 requests. No credit card required.
Get a free API key All endpoints