How to scrape Instagram?

Instagram Data Scraper API

Scrape, collect and analyze data from Instagram is very interesting. With more than 1.2 billion users, Instagram is one of the biggest social networks in the world. It’s a great place to stay up to date, learn about current trends and about your audience’s interests

Instagram have tons of marketing useful data, web scraping is the best way to collect them automatically.
Then, analyze the results and learn what’s cool and loved from your audience.

ScrapingBot has an Instagram scraper, built to scrape and collect public data from Instagram profiles and hashtags. Get the data you want in JSON, without any blocking.

You want to scrape Instagram profiles, hashtags, and more?

What data you can collect with our Instagram Scraper?

Instagram profiles

Latest posts, profile image, biography, external URL, number of followed profile, likes, number of posts, followers, verified status, posts, posts images, posts comments, number of likes per post

Instagram hashtags

Post URL, post author ID, media URL, post text, number of comments, number of likes

Instagram posts

Post URL, post date, post text, likes, comments, media, sponsor, sponsor links

How to start scraping Instagram?

ScrapingBot is here to help you scrape Instagram profiles and hashtags as easily and efficiently as possible.

Start scraping Instagram in 3 steps:

1. Create an account

Want to start scraping Instagram right now? No problem, ScrapingBot offers FREE access with 100 credits per month to get started. No payment information required, and no any engagement.
If you already have an account, just log in.

2. Configure your scraping

Once your account has been created, go to Documentation, to the "Data Scraper API" section to be able to start scraping what you want.

Setting up the endpoint is a two-step process with two API calls.
It's a little longer than usual because social networks have many protections to avoid robots and get scraped. These two calls make it possible to recover the data without being blocked.

Step 1 : Get your Response ID

First, you must make a first POST request to get the ResponseID which will be used later.
To do this, you must enter the following parameters in the body, then run a first API call:

  • scraper
    ("instagramProfile" to scrape Instagram profiles, "instagramHashtag" to scrape Instagram hashtags or
  • "instagramPost" to get Instagram posts)
    • If you chose instagramProfile as a scraper:
      • account
        Add the URL of the Instagram profile you want to scrape
    • If you chose instagramHashtag as a scraper:
      • hashtag
        Add the Instagram hashtag you want to scrape
    • If you chose instagramPost as a scraper:
      • url
        Add the Instagram url you want to scrape

Here is the Request Endpoint:
http://api.scraping-bot.io/scrape/data-scraper

Step 2 : Configure your second request

Now that you have your responseId, you will be able to configure a GET request to ask for the response.

Here is the Response Endpoint:
http://api.scraping-bot.io/scrape/data-scraper-response?responseId=xxxx&scraper=name

Complete the Response Endpoint with these parameters:

  • responseId
    Insert here the Response ID that you had with the POST API call
  • scraper
    You must fill in the same as that used previously for the POST API call ("instagramProfile" or "instagramHashtag")

When it's ready, execute the API call. The result you will get will tell you if the scraping is ready to use or not.
If it's not, you will get this pending message:

{status: "pending", message: "Scraping is not finished for this request, try again in a few"}

In this case, you have to try again until it's ready.

3. Let's scraping!

Your web scraping setup is now ready to use!
You can start collecting data from Instagram Profiles, Hashtags and Posts.


NB: If you need more help, a sample code to execute the call to this API is available in the documentation right here ("Data Scraper API" section).