Get Hashtag Posts
curl --request GET \
--url https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"posts": [
{
"id": "<string>",
"shortcode": "<string>",
"product_type": "<string>",
"caption": {},
"timestamp": 123,
"like_count": 123,
"comment_count": 123,
"media_type": "<string>",
"media_url": "<string>",
"thumbnail_url": {},
"video_url": {},
"is_video": true,
"video_view_count": {},
"video_duration": {},
"dimensions": {},
"location": {},
"tagged_users": [
"<string>"
],
"hashtags": [
"<string>"
],
"music_info": {},
"author": {
"username": "<string>",
"full_name": "<string>",
"profile_pic_url": "<string>",
"is_verified": true
}
}
],
"pagination": {
"next_cursor": {},
"has_next_page": true,
"total_count": {}
}
},
"credits_used": 123,
"credits_remaining": 123
}Instagram
Get Hashtag Posts
Search Instagram posts by hashtag with tab filtering and pagination
GET
/
v1
/
instagram
/
hashtag
/
posts
Get Hashtag Posts
curl --request GET \
--url https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"posts": [
{
"id": "<string>",
"shortcode": "<string>",
"product_type": "<string>",
"caption": {},
"timestamp": 123,
"like_count": 123,
"comment_count": 123,
"media_type": "<string>",
"media_url": "<string>",
"thumbnail_url": {},
"video_url": {},
"is_video": true,
"video_view_count": {},
"video_duration": {},
"dimensions": {},
"location": {},
"tagged_users": [
"<string>"
],
"hashtags": [
"<string>"
],
"music_info": {},
"author": {
"username": "<string>",
"full_name": "<string>",
"profile_pic_url": "<string>",
"is_verified": true
}
}
],
"pagination": {
"next_cursor": {},
"has_next_page": true,
"total_count": {}
}
},
"credits_used": 123,
"credits_remaining": 123
}Request
Headers
| Name | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Query parameters
string
required
The hashtag to search for (without the # symbol).
string
default:"recent"
Which tab to fetch. One of:
top, recent, clips.string
Pagination cursor from a previous response’s
next_cursor field.Response
object
Show properties
Show properties
InstagramPost[]
Array of post objects.
Show InstagramPost
Show InstagramPost
string
Instagram numeric post ID
string
Unique post identifier (used in URLs)
string
One of:
feed, clips, carousel_container, igtvstring | null
Post caption text
number
Unix timestamp of when the post was created
number
Number of likes
number
Number of comments
string
One of:
image, video, carouselstring
URL of the primary media
string | null
Thumbnail URL (for videos)
string | null
Direct video URL (for videos)
boolean
Whether the post is a video
number | null
View count (videos only)
number | null
Duration in seconds (videos only)
object | null
Width and height of the media
string | null
Tagged location name
string[]
Usernames tagged in the post
string[]
Hashtags extracted from the caption
object | null
Music/audio metadata for reels
number
Credits deducted (1)
number
Remaining credit balance
Examples
curl -H "x-api-key: sk-your-api-key" \
"https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts?hashtag=travel&tab=recent"
const res = await fetch(
"https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts?hashtag=travel&tab=recent",
{ headers: { "x-api-key": "sk-your-api-key" } }
);
const { data, credits_used, credits_remaining } = await res.json();
data.posts.forEach((post) => {
console.log(`@${post.author?.username}: ${post.like_count} likes`);
});
// Paginate
if (data.pagination.has_next_page) {
const nextRes = await fetch(
`https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts?hashtag=travel&tab=recent&cursor=${data.pagination.next_cursor}`,
{ headers: { "x-api-key": "sk-your-api-key" } }
);
}
import requests
res = requests.get(
"https://api.scraper.creatorlookup.com/v1/instagram/hashtag/posts",
params={"hashtag": "travel", "tab": "recent"},
headers={"x-api-key": "sk-your-api-key"},
)
data = res.json()["data"]
for post in data["posts"]:
author = post.get("author") or {}
print(f"@{author.get('username', '?')}: {post['like_count']} likes")
200 — Success
{
"data": {
"posts": [
{
"id": "3456789012345678",
"shortcode": "DAx1y2z3Ab",
"product_type": "feed",
"caption": "Beautiful sunset #travel #photography",
"timestamp": 1707350400,
"like_count": 12500,
"comment_count": 340,
"media_type": "image",
"media_url": "https://scontent.cdninstagram.com/...",
"thumbnail_url": null,
"video_url": null,
"is_video": false,
"video_view_count": null,
"video_duration": null,
"dimensions": { "width": 1080, "height": 1350 },
"location": "Bali, Indonesia",
"tagged_users": [],
"hashtags": ["travel", "photography"],
"music_info": null,
"author": {
"username": "travelphotographer",
"full_name": "Travel Photographer",
"profile_pic_url": "https://scontent.cdninstagram.com/...",
"is_verified": false
}
}
],
"pagination": {
"next_cursor": "eyJtYXhfaWQiOiIxMjM0NTY3ODkwIiwicGFnZSI6MSwibWVkaWFfaWRzIjpbXX0",
"has_next_page": true,
"total_count": null
}
},
"credits_used": 1,
"credits_remaining": 9999
}
402 — Insufficient credits
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This endpoint requires 1 credits, you have 0"
}
}
502 — Scrape failed
{
"error": {
"code": "SCRAPE_FAILED",
"message": "Hashtag not found or no results"
}
}
504 — Timeout
{
"error": {
"code": "TIMEOUT",
"message": "Scraping request timed out"
}
}
⌘I