Docs
Log in
Use the JS token

Instagram scrapers work best with your JavaScript token.

API usage

Add &scraper=instagram-hashtag to a Crawling API request. URL-encode the target URL in the url parameter.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.instagram.com/explore/tags/love/' \
  --data-urlencode 'scraper=instagram-hashtag' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.instagram.com/explore/tags/love/',
    {'scraper': 'instagram-hashtag'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.instagram.com/explore/tags/love/',
  { scraper: 'instagram-hashtag' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.instagram.com/explore/tags/love/', scraper: 'instagram-hashtag')
data = JSON.parse(res.body)

Example input URL

The URL passed in the url parameter (URL-decoded for readability):

https://www.instagram.com/explore/tags/love/

Response shape

JSON response body. Field types may be null when the source page omits the value.

hashtag
string
Hashtag (without the #).
post_count
integer | null
Total posts using this hashtag, when shown.
top_posts
array
Top-ranked posts under the tag.
recent_posts
array
Recent posts under the tag.
posts[].id
string
Post shortcode.
posts[].thumbnail_url
string
Thumbnail URL.
posts[].like_count
integer
Likes.
posts[].comment_count
integer
Comments.
posts[].url
string
Permalink.

Sample response

{
  "hashtag": "love",
  "post_count": 2100000000,
  "top_posts": [
    {
      "id": "C7xY...",
      "thumbnail_url": "https://scontent.cdninstagram.com/...jpg",
      "like_count": 847000,
      "comment_count": 2102,
      "url": "https://www.instagram.com/p/C7xY..."
    }
  ]
}