Instagram API for Python
herascrape is a real-time Instagram data API you call over plain HTTPS, so any Python HTTP client works. Install the client with pip, send your key in the X-Api-Key header, and read public profiles, followers, posts, comments, hashtags and more.
$0.0004 per request ($0.40 per 1,000), flat. Only successful calls are billed.
Install
pip install herascrapeExample
import os, httpx
resp = httpx.get(
"https://api.herascrape.com/users/username/nasa",
headers={"X-Api-Key": os.environ["HERASCRAPE_KEY"]},
)
profile = resp.raise_for_status().json()
print(profile["follower_count"])