Instagram Hashtag API
Instagram Hashtag API returns the top reels Instagram shows publicly for a hashtag, with their captions, play counts, video links and authors, plus the hashtag's rounded reel total, Instagram's summary of it and the related searches it suggests. Instagram matches reels to the hashtag as a keyword, so a reel's caption may not carry the hashtag, and a rare hashtag such as kccurling can return reels that never use it. Most posts are reels, and the occasional photo carousel comes back with type carousel, a /p/ permalink and its photo as link.
A hashtag page returns its top reels 12 at a time. Pass pagination.next_page_token from a response as next_page_token to get the next ones, until Instagram has no more. Instagram's list moves between calls, so a later page can repeat reels from an earlier one, and a token past the end of the list returns an error. A category page comes in one response. The reels carry no likes, comment counts or posting dates, and the recent tab is not returned. Pass a reel's id as the post_id of the Instagram Post API to get its likes, comments and posting date.
Direct image, avatar and video URLs are signed by Instagram and expire. Run the search again whenever you need fresh media URLs.
API Parameters
Search Query
-
- Name
-
hashtag - Required
- Required
- Description
-
The hashtag to look up, with or without the leading
#(e.g.sourdoughbreador#sourdoughbread). Hashtags are made of letters in any script, numbers, underscores and emoji, up to 100 characters, and are matched regardless of letter case. Instagram has no public page for a hashtag with an underscore, such asnew_york(newyorkhas one). A hashtag Instagram has no public page for returns a200with anerrorfield set toInstagram has no public page for this hashtag.
Pagination
-
- Name
-
next_page_token - Required
- Optional
- Description
-
Parameter defines the token for the next page of reels. Take the value from
pagination.next_page_tokenin a previous response and pass it back with the samehashtag. A later page can repeat reels from an earlier one, because Instagram's list moves between calls, and a token past the end of the list returnsInstagram Hashtag didn't return any results.A token Instagram no longer accepts answers200with anerrorand costs a credit.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
instagram_hashtag.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Hashtag Page
A hashtag page returns the hashtag with its rounded reel total in reels, the reels in posts in the order Instagram shows them, Instagram's related_searches, and a pagination.next_page_token while Instagram has more reels.
https://www.searchapi.io/api/v1/search?engine=instagram_hashtag&hashtag=latteart
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "instagram_hashtag",
"hashtag": "latteart"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_n9XmVeqAp1RdHXjgKkGJZrxE",
"status": "Success",
"created_at": "2026-11-22T08:00:38Z",
"request_time_taken": 1.29,
"parsing_time_taken": 0.0,
"total_time_taken": 1.3,
"request_url": "https://www.instagram.com/popular/latteart/",
"html_url": "https://www.searchapi.io/api/v1/searches/search_n9XmVeqAp1RdHXjgKkGJZrxE.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_n9XmVeqAp1RdHXjgKkGJZrxE"
},
"search_parameters": {
"engine": "instagram_hashtag",
"hashtag": "latteart"
},
"hashtag": {
"name": "latteart",
"title": "#latteart",
"link": "https://www.instagram.com/popular/latteart/",
"reels": "60M",
"extracted_reels": 60000000,
"description": "Latte art is the technique of pouring steamed milk into espresso to create designs like hearts, tulips, and rosettas on the surface. It depends on microfoam, which is milk with tiny uniform bubbles made by texturing steam into cold milk until about 150°F.\nThe process needs two parts: a rich espresso with crema as the canvas, and velvety milk poured from close to form patterns. Beginners often start with a heart, using whole milk for stability and a narrow spout pitcher for control. Tutorials now make it accessible at home with simple tools.",
"sources": [
{
"link": "https://www.lavazzausa.com/en/recipes-and-coffee-hacks/latte-art-guide-for-beginners"
},
...
]
},
"posts": [
{
"position": 1,
"id": "DeJj3prTqBY",
"media_id": "4001887499844493400",
"permalink": "https://www.instagram.com/reel/DeJj3prTqBY/",
"type": "reel",
"link": "https://scontent-atl3-1.cdninstagram.com/o1/v/t2/f2/m86/AQPZVdyBEfRRU3ST-PZhLS1eRfg8-o0qs-h6PS90WMt6...",
"caption": "Sketch to Heart tutorial! 💗\nLearn how to pour this and more in our barista training class ☕️🤭\nRTO 91399 \n\nLink in bio or Visit 🔗 cbdcollege.edu.au\n#coffee #coffeelover #heart #latteart #tutorial",
"views": 124504,
"user": {
"id": "377602715",
"username": "baristabasics",
"avatar": "https://scontent-atl3-2.cdninstagram.com/v/t51.2885-19/448949782_881304570428370_1851435738875483853..."
},
"video_versions": [
{
"url": "https://scontent-atl3-1.cdninstagram.com/o1/v/t2/f2/m86/AQPZVdyBEfRRU3ST-PZhLS1eRfg8-o0qs-h6PS90WMt6..."
}
],
"thumbnail": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/837090690_18634048192002716_8049813100780806..."
},
...
],
"related_searches": [
{
"query": "hatcoffee latteart stand",
"link": "https://www.instagram.com/popular/hatcoffee-latteart-stand/"
},
...
],
"pagination": {
"next_page_token": "eyJoYXNodGFnIjoibGF0dGVhcnQiLCJjdXJzb3IiOiJBUUhUdUV3bkszV1V0aklMT1NUYkVLM0RKazlSWEtTU096T2F1RXhhZ3RfdXJ0WlRidXBfb1VSV1F3VVdhRVJOZERiVSJ9"
}
}
Next Page
Pass the pagination.next_page_token from a previous response back as next_page_token, with the same hashtag, for the next 12 reels. Later pages return posts and pagination only, and the last page has no pagination.
https://www.searchapi.io/api/v1/search?engine=instagram_hashtag&hashtag=latteart&next_page_token=eyJoYXNodGFnIjoibGF0dGVhcnQiLCJjdXJzb3IiOiJBUUhUdUV3bkszV1V0aklMT1NUYkVLM0RKazlSWEtTU096T2F1RXhhZ3RfdXJ0WlRidXBfb1VSV1F3VVdhRVJOZERiVSJ9
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "instagram_hashtag",
"hashtag": "latteart",
"next_page_token": "eyJoYXNodGFnIjoibGF0dGVhcnQiLCJjdXJzb3IiOiJBUUhUdUV3bkszV1V0aklMT1NUYkVLM0RKazlSWEtTU096T2F1RXhhZ3RfdXJ0WlRidXBfb1VSV1F3VVdhRVJOZERiVSJ9"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_8qWVwGvboYPYTxdgmDQJaN4d",
"status": "Success",
"created_at": "2026-11-22T08:01:23Z",
"request_time_taken": 2.93,
"parsing_time_taken": 0.0,
"total_time_taken": 2.93,
"request_url": "https://www.instagram.com/popular/latteart/",
"html_url": "https://www.searchapi.io/api/v1/searches/search_8qWVwGvboYPYTxdgmDQJaN4d.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_8qWVwGvboYPYTxdgmDQJaN4d"
},
"search_parameters": {
"engine": "instagram_hashtag",
"hashtag": "latteart",
"next_page_token": "eyJoYXNodGFnIjoibGF0dGVhcnQiLCJjdXJzb3IiOiJBUUhUdUV3bkszV1V0aklMT1NUYkVLM0RKazlSWEtTU096T2F1RXhhZ3RfdXJ0WlRidXBfb1VSV1F3VVdhRVJOZERiVSJ9"
},
"posts": [
{
"position": 1,
"id": "C_VfZpox3h5",
"media_id": "3446799191958321273",
"permalink": "https://www.instagram.com/reel/C_VfZpox3h5/",
"type": "reel",
"link": "https://instagram.fcae1-1.fna.fbcdn.net/o1/v/t2/f2/m367/AQN8BsIy31bHxx-9hBQb1LlhLcWO6gvK4UXGoTlGxK8F...",
"caption": "Latte Art - Slow Leaf \n快把庫存用光了 @vicky__wang07 感謝陪錄🥺\n-\n09月拉花課程名額即將額滿🈵\n10月拉花課程可提前預約報名\n有興趣歡迎填寫表單或是私訊報名唷✉️\n-\n#咖啡 #coffee #cafe #latteart #咖啡機 #拉花課程 #咖啡課程 #藝術",
"views": 602527,
"user": {
"id": "411765172",
"username": "shawn__1023",
"avatar": "https://scontent.cdninstagram.com/v/t51.82787-19/539372711_18529043743053173_6907584282594241353_n.j...",
"is_verified": true
},
"video_versions": [
{
"url": "https://instagram.fcae1-1.fna.fbcdn.net/o1/v/t2/f2/m367/AQN8BsIy31bHxx-9hBQb1LlhLcWO6gvK4UXGoTlGxK8F..."
}
],
"thumbnail": "https://scontent.cdninstagram.com/v/t51.71878-15/505795729_1922847938476364_4628932941210775667_n.jp..."
},
...
],
"pagination": {
"next_page_token": "eyJoYXNodGFnIjoibGF0dGVhcnQiLCJjdXJzb3IiOiJBUUhUTmpTRGdjeWdKakFMSkVDU3R5WjBrUzJ4MHZsaTkyTXBUZENQOUx3VnlNd3ViOEQ4M2hldTBZeDFTSTU2YVRiVCJ9"
}
}
Category Page
For broad hashtags such as soccer, Instagram often shows a category page instead. Its reels are grouped under related keywords, each reel carries the keyword it is listed under, and these reels have no caption, video link or author username. The keywords also come back as related_searches, and the other categories the page links to come back as related_interests.
https://www.searchapi.io/api/v1/search?engine=instagram_hashtag&hashtag=soccer
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "instagram_hashtag",
"hashtag": "soccer"
}
response = requests.get(url, params=params)
print(response.text)
{
"hashtag": {
"name": "soccer",
"title": "#soccer",
"link": "https://www.instagram.com/popular/soccer/",
"description": "Soccer is a team sport played on a rectangular field with two teams of 11 players each. The goal is to score by getting a round ball into the opponent's net using feet, head, or body, not hands, except for the goalkeeper.\nIt is also called association football, and is the world's most popular sport with about 250 million players in over 200 countries. Matches last 90 minutes with two 45-minute halves and are governed by the Laws of the Game set by IFAB.\nModern soccer developed in England in the mid-19th century with standardized rules from The Football Association. FIFA oversees international play including the World Cup first held in 1930."
},
"posts": [
{
"position": 1,
"id": "DZgEOScSWqq",
"media_id": "3918150249872976554",
"permalink": "https://www.instagram.com/reel/DZgEOScSWqq/",
"type": "reel",
"views": 2862310,
"keyword": "globe soccer world cup predictions",
"user": {
"id": "4804365031"
},
"thumbnail": "https://scontent-atl3-2.cdninstagram.com/v/t51.71878-15/719565222_984909084309690_778924855734532392..."
},
...
],
"related_searches": [
{
"query": "globe soccer world cup predictions",
"link": "https://www.instagram.com/popular/globe-soccer-world-cup-predictions/"
},
...
],
"related_interests": [
{
"name": "Motorsports and Cycling",
"link": "https://www.instagram.com/popular/cycling/",
"thumbnail": "https://scontent-atl3-1.cdninstagram.com/v/t51.71878-15/527255639_1122779109211153_91749761229726278..."
},
...
]
}