Anmelden
Verwenden Sie das JS-Token

Instagram-Scraper funktionieren am besten mit Ihrem JavaScript token.

API-Nutzung

Fügen Sie &scraper=instagram-hashtag zu einem Crawling API-Request hinzu. URL-kodieren Sie die Ziel-URL im Parameter url.

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)

Beispiel-Eingabe-URL

Die im Parameter url übergebene URL (URL-dekodiert zur besseren Lesbarkeit):

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

Response-Struktur

JSON-Response-Body. Feldtypen können null sein, wenn die Quellseite den Wert weglässt.

hashtag
string
Hashtag (ohne das #).
post_count
integer | null
Gesamtzahl der Beiträge mit diesem Hashtag, sofern angezeigt.
top_posts
array
Top-platzierte Beiträge unter dem Tag.
recent_posts
array
Aktuelle Beiträge unter dem Tag.
posts[].id
string
Post-Shortcode.
posts[].thumbnail_url
string
Thumbnail-URL.
posts[].like_count
integer
Likes.
posts[].comment_count
integer
Kommentare.
posts[].url
string
Permalink.

Beispiel-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..."
    }
  ]
}