Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

instagram-scraper-python

PyPIPython versionsLicense

Modern Python alternative to arc298/instagram-scraper — the 8.5k-star scraper that's been sporadically maintained for years. Hosted backend means it doesn't break when Instagram updates their interface, and you don't need Instagram credentials.

This repo is a migration landing page + working examples. The actual SDK lives at SocialAPIsHub/socialapis-python and ships as the socialapis-sdk package on PyPI.

pip install socialapis-sdk
fromsocialapisimportInstagramScraperig=InstagramScraper(api_token="...") # alias of Instagram — keeps your import line greppableprofile=ig.get_profile_details("instagram")
print(profile.username, profile.followers_count, profile.media_count)
forpostinig.get_profile_posts("instagram").get("posts", []):
print(post.get("caption", "")[:80])

Get a free API token → — 200 calls/month, no credit card


Why this exists

arc298/instagram-scraper is one of the most popular Python tools for Instagram public data — 8.5k+ GitHub stars. It's been sporadically maintained for years: open issues pile up, scraper logic drifts as Meta tweaks their HTML, and every few months users hit one of the recurring failure modes (rate limits, login walls, broken pagination, deprecated endpoints).

If you're here because:

  • arc298's scraper started returning empty results
  • You searched for "instagram-scraper alternative" or "arc298 fork"
  • You hit rate limits or the dreaded login wall mid-batch
  • Your downloads stopped working after the latest Instagram redesign
  • You're tired of running a CLI scraper that needs your Instagram credentials

…this is the modern replacement. Same idea — Instagram public data via Python — but the actual scraping runs on a hosted API (socialapis.io) so you never debug Instagram's HTML again, and you don't need Instagram credentials.

Side-by-side migration

# BEFORE — arc298/instagram-scraper (CLI usage, abandoned-ish)
instagram-scraper instagram --media-types image --maximum 50
# AFTER — socialapis (typed Python, hosted backend)fromsocialapisimportInstagramScraper# alias of Instagramig=InstagramScraper(api_token="...")
# Profile metadata in one callprofile=ig.get_profile_details("instagram")
print(profile.full_name, profile.followers_count, profile.is_verified)
# Posts with media URLs you can download directlyresult=ig.get_profile_posts("instagram")
forpostinresult.get("posts", []):
print(post.get("caption", "")[:80], post.get("media_url"))

InstagramScraper is an exact alias of socialapis.Instagram — same class, same methods, just a different name so your grep-replace migration stays a one-liner.

Method-by-method mapping

arc298/instagram-scraper (CLI / library)socialapis (this SDK)
instagram-scraper <user> (CLI batch download)InstagramScraper(api_token=…).get_profile_posts(user) then iterate media URLs
instagram-scraper <user> --media-types storyInstagramScraper(…).get_profile_highlights(user_id) + .get_highlight_details(highlight_id)
--media-types image / --media-types videoFilter the response — every post has a media_type field
--maximum NPagination is cursor-based — pass end_cursor from the response on the next call
--login-user <…> / --login-pass <…>Not needed — we don't require Instagram login
--cookiejar <…> / --no-check-certificateNot needed — we manage the scraping infrastructure

Full working example: examples/migrate.py.

What you get on top of arc298's surface

The hosted backend exposes far more than arc298 ever did. From the same InstagramScraper instance:

# Profiles + their numeric IDsig.get_user_id("instagram")
ig.get_profile_details("instagram")
ig.get_profile_posts("instagram")
ig.get_profile_reels(user_id="25025320")
ig.get_profile_highlights(user_id="25025320")
ig.get_highlight_details(highlight_id="17914256252161608")
# Individual posts by shortcodeig.get_post_id("https://www.instagram.com/p/DMF-GjGO0-q/")
ig.get_post_details(shortcode="DMF-GjGO0-q")
# Reels — trending feed + audio-track-based discoveryig.get_reels_feed()
ig.get_reels_by_audio(audio_id="1028713130625019")
# Search + locationsig.search("travel") # popular users / hashtags / placesig.get_location_posts(location_id="454547536", tab="ranked")
ig.get_nearby_locations(location_id="454547536")
# Async — same surface, methods are coroutinesfromsocialapisimportAsyncInstagramScraperasyncwithAsyncInstagramScraper(api_token="…") asig:
profile=awaitig.get_profile_details("instagram")

Full method list + Pydantic response types: main SDK README →

Comparison at a glance

arc298/instagram-scrapersocialapis (2026)
MaintenanceSporadic; major bugs sit unfixedActive; 7M+ calls/month in prod
ReliabilityBreaks on Instagram interface changesHosted backend; we absorb breakage
AuthRequires your Instagram login (cookie or password)Single x-api-token header, 200 free calls/month
Type hintsNoneStrict; Pydantic v2 models
AsyncNoInstagram + AsyncInstagram classes
HTTP clientCustom session, fragilehttpx
Pagination--maximum N flag, abruptCursor-based; API decides page size
Reels / Highlights / LocationsLimited or unsupportedFirst-class methods for each
TestsManual against live IGRecorded HTTP fixtures, Python 3.10–3.13
Risk to your IG accountReal (login-based scraping flags accounts)None (no login required)

Pricing

TierCalls / monthPrice
Free200$0
Pro1,500$4.99
Ultra30,000$49
Mega120,000$179
EnterpriseCustomContact us

One credit per successful call. Failed calls (4xx caused by bad input) don't consume credits.

Other resources

License

MIT — see LICENSE.

The socialapis-sdk package this repo points at is also MIT-licensed. Both are open source; the hosted scraping API is the commercial layer.

About

Modern Python alternative to arc298/instagram-scraper — no auth, doesn't break when Instagram updates their interface. Powered by socialapis.io.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors