instascrape is a lightweight Python package that provides an expressive and flexible API for scraping Instagram data. It is geared towards being a high-level building block on the data scientist's toolchain and can be seamlessly integrated and extended with industry standard tools for web scraping, data science, and analysis.
Here are a few of the things that
instascrape does well:
This library currently requires Python 3.7 or higher.
Install from PyPI using
$ pip3 install insta-scrape
WARNING: make sure you install insta-scrape and not a package with a similar name!
All top-level, ready-to-use features can be imported using:
from instascrape import *
instascrape uses clean, consistent, and expressive syntax to make the developer experience as painless as possible.
# Instantiate the scraper objects google = Profile('https://www.instagram.com/google/') google_post = Post('https://www.instagram.com/p/CG0UU3ylXnv/') google_hashtag = Hashtag('https://www.instagram.com/explore/tags/google/') # Scrape their respective data google.scrape() google_post.scrape() google_hashtag.scrape() print(google.followers) print(google_post['hashtags']) print(google_hashtag.amount_of_posts) >>> 12262794 >>> ['growwithgoogle'] >>> 9053408
The official documentation can be found on Read The Docs
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome!
Beginners to open source are highly encouraged to participate and ask questions if you're unsure what to do/where to start ❤️
This library operates under the MIT license.
Check out the FAQ
Reach out to me if you want to connect or have any questions!
DISCLAIMER: With great power comes great responsibility. This is a research project and I am not responsible for how you use it. Independently, the library is designed to be responsible and respectful and it is up to you to decide what you do with it.