Search
curl --request GET \
--url https://scrapebadger.com/v1/instagram/search/top \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/instagram/search/top"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/instagram/search/top', 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://scrapebadger.com/v1/instagram/search/top",
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: <x-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://scrapebadger.com/v1/instagram/search/top"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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://scrapebadger.com/v1/instagram/search/top")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/instagram/search/top")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{}
]
}Endpoints
Search
Search Instagram across hashtags and blended top results.
GET
/
v1
/
instagram
/
search
/
top
Search
curl --request GET \
--url https://scrapebadger.com/v1/instagram/search/top \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/instagram/search/top"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/instagram/search/top', 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://scrapebadger.com/v1/instagram/search/top",
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: <x-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://scrapebadger.com/v1/instagram/search/top"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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://scrapebadger.com/v1/instagram/search/top")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/instagram/search/top")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{}
]
}Search Instagram by keyword. Both typed endpoints share one query shape.
Credits: 5 (
top) · 2 (hashtags)
Authorization
string
required
Your ScrapeBadger API key.
Query Parameters
string
required
The search term.
Paths
GET /v1/instagram/search/hashtags— matching hashtags (Hashtag[]). 2 credits.GET /v1/instagram/search/top— blended top results. 5 credits.
Response
object[]
Typed results per path —
Hashtag (hashtags) or a blended list (top).
Wrapped in { items, count, next_cursor, has_more }.Example
curl "https://scrapebadger.com/v1/instagram/search/hashtags?query=travel" \
-H "X-API-Key: YOUR_API_KEY"
curl "https://scrapebadger.com/v1/instagram/search/top?query=nasa" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/instagram/search/hashtags?" +
new URLSearchParams({ query: "travel" }),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const { items } = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/instagram/search/hashtags",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"query": "travel"},
)
items = res.json()["items"]
Response
{
"items": [
{
"id": "17843712345678901",
"name": "travel",
"media_count": 712345678,
"profile_pic_url": "https://scontent.cdninstagram.com/v/tag.jpg"
}
],
"count": 1,
"next_cursor": null,
"has_more": false
}
⌘I

