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.
Use it for
Hashtag monitoring
Content discovery
Competitor tracking
Trend research
Quickstart
curl "https://api.instagramscraperapi.com/api/v1/instagram/search?q=travel&api_key=$API_KEY" 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
{
"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/"
}
]
} | Field | Type | Description |
|---|---|---|
query | string | The hashtag or keyword you passed as q. |
results | array | Matching public posts, newest first. |
shortcode | string | The post shortcode, the stable id in the /p/{shortcode}/ URL. |
caption | string | The post caption text when public. |
thumbnail | string | URL of the post thumbnail image. |
media_type | string | image, video, or carousel. |
url | string | The canonical post permalink. |
How it works
- Send a GET with your hashtag or keyword as q and your API key.
- We route through residential proxies, handle anti-bot, and parse the public results.
- You get validated JSON back, ready to use.
How it compares
| Our API | DIY (requests / headless) | Official Graph API | |
|---|---|---|---|
| Hashtag or keyword input | Yes, one q parameter | Manual fetch and parse | Hashtag Search needs a Business account and review |
| Public post fields | Shortcode, caption, thumbnail, media type | Possible, parser breaks often | Only your own or consented media |
| Setup | API key only | Residential proxies, headless browser, parsers | App review, tokens, rate windows |
| Login and cookies | None, logged-out only | You manage sessions | App access token required |
Pricing
| Plan | Price | Best for |
|---|---|---|
| Free | 1,000 requests | Testing and small jobs |
| Pro | $0.60 / 1k | Production workloads |
| Pay-as-you-go | $0.90 / 1k | Spiky 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.