An Instagram hashtag API for posts under any tag
Give SocialHolmes an Instagram hashtag and a limit, and it returns public posts under that tag as JSON: caption, time, likes, comments, media links and author. It works without a Graph API key or app review and costs $0.50 per 1,000 posts.
What you get
Every row comes back as structured JSON. These are the fields on a row, taken from the endpoint's recorded example response in the reference. Every field we collect is in the row itself, including the extra fields the platform sends, so a live row can carry more than the recorded example.
Instagram hashtag — one post per row
id shortcode url type caption taken_at like_count comment_count share_count is_paid_partnership width height media_urls thumbnail_url author media_id image_versions2 video_versions
Instagram tagged — one post per row
id shortcode url type caption taken_at like_count comment_count share_count is_paid_partnership width height media_urls thumbnail_url author media_id image_versions2 video_versions
Tags, places and mentions
The hashtag endpoint returns posts under one tag. The location endpoint returns posts at a place. The tagged endpoint returns posts in which a given account is tagged, which is the usual way to track mentions of a brand.
Every one of these returns the same kind of row, a post, so the code that reads one reads them all.
What each post row carries
The fields above are generated from the endpoint's recorded example. They include the caption, post type, time, like and comment counts, whether it is a paid partnership, media URLs and the author. That is enough to rank a campaign's posts, find the accounts posting most under a tag, and pick posts to pull comments from.
To read the conversation under a post, take its shortcode from a hashtag run and call the comments endpoint.
Without a Graph API key or app review
{"Instagram's own hashtag access is part of the Graph API, which needs a Meta app and a review. SocialHolmes needs none of that from you" => "no Instagram account, no app registration, no review cycle and no keys of yours to manage. You use a SocialHolmes key and read public posts."}
{"Public data only" => "what a logged-out visitor can already see. Runs are read at the moment you ask, with no stored copy served back, and the most you can request in one run is 10,000 rows."}
Example request
The tag can be passed with or without the
The call returns a run id straight away; poll GET /api/public/v1/runs/:id until it succeeds, then read the rows from GET /api/public/v1/runs/:id/results. Reading results again does not cost anything more.
curl -X POST https://api.socialholmes.com/api/public/v1/scrape/instagram/hashtag \
-H "Authorization: Bearer $SOCIALHOLMES_KEY" \
-H "Content-Type: application/json" \
-d '{"parameters": {"tag": "spacex"}, "limit": 25}'
import os
import requests
run = requests.post(
"https://api.socialholmes.com/api/public/v1/scrape/instagram/hashtag",
headers={"Authorization": f"Bearer {os.environ['SOCIALHOLMES_KEY']}"},
json={"parameters": {"tag": "spacex"}, "limit": 25},
).json()
print(run["id"], run["status"])
const response = await fetch("https://api.socialholmes.com/api/public/v1/scrape/instagram/hashtag", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOCIALHOLMES_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ parameters: { tag: "spacex" }, limit: 25 }),
})
const run = await response.json()
console.log(run.id, run.status)
require "net/http"
require "json"
response = Net::HTTP.post(
URI("https://api.socialholmes.com/api/public/v1/scrape/instagram/hashtag"),
{ parameters: { tag: "spacex" }, limit: 25 }.to_json,
"Authorization" => "Bearer #{ENV.fetch('SOCIALHOLMES_KEY')}",
"Content-Type" => "application/json"
)
run = JSON.parse(response.body)
puts run["id"], run["status"]
<?php
$ch = curl_init("https://api.socialholmes.com/api/public/v1/scrape/instagram/hashtag");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("SOCIALHOLMES_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode(["parameters" => ["tag" => "spacex"], "limit" => 25]),
]);
$run = json_decode(curl_exec($ch), true);
echo $run["id"], " ", $run["status"];
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body, _ := json.Marshal(map[string]any{
"parameters": map[string]string{"tag": "spacex"},
"limit": 25,
})
req, _ := http.NewRequest("POST", "https://api.socialholmes.com/api/public/v1/scrape/instagram/hashtag", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SOCIALHOLMES_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
var run map[string]any
json.NewDecoder(res.Body).Decode(&run)
fmt.Println(run["id"], run["status"])
}
Use it from an AI assistant over MCP
The same account and API key work as an MCP server at https://api.socialholmes.com/mcp, over HTTP with no package to install. In Claude Code:
claude mcp add --transport http socialholmes https://api.socialholmes.com/mcp \
--header "Authorization: Bearer sh_<your key>"
Cursor, Codex and Claude Desktop connect the same way; the MCP setup guide has the config for each. Then ask in plain language:
Pull 100 Instagram posts under #veganbaking, list the accounts that appear most often, and show the five posts with the most likes.
Pricing
$0.50 per 1,000 results, billed per row delivered. There is no subscription, and a run that returns nothing costs nothing. See the full pricing.
Questions people ask
Do I need the Instagram Graph API or an app review?
Does the tag need a
Can I get the comments on those posts too?
Can I track mentions of a brand?
Can an AI assistant do this?
What does it cost?
Reference and related pages
Try it on your own targets
Get an API key, run a small limit first, and pay only for the rows you get back.