Instagram Scraper avatar
Instagram Scraper
Try for free

No credit card required

View all Actors
Instagram Scraper

Instagram Scraper

Try for free

No credit card required

Scrape and download Instagram posts, profiles, places, hashtags, photos, and comments. Get data from Instagram using one or more Instagram URLs or search queries. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.

What does Instagram Scraper do?

Instagram Scraper allows you to scrape posts from a user's profile page, hashtag page, or place. When a link to an Instagram post is provided, it can scrape Instagram comments.

This unofficial Instagram API is designed to give you back the functionality to access public data that was removed from the Instagram API in 2020. It also enables anyone to extract public data from Instagram without imposing limits on whether you are an Instagram Business or Creator, or whether you are accessing public consumer account data.

The Instagram data scraper supports the following features:

  • Scrape profiles - you can either scrape posts or get metadata from the profile.
  • Scrape hashtags - query hashtags matched by search keyword - you can either scrape posts or scrape metadata from each hashtag.
  • Scrape places/locations - query places matched by search keyword - you can either scrape posts or scrape metadata from each place.
  • Scrape comments - you can scrape comments from any post.

What are other Instagram scraping tools?

If you want to scrape specific Instagram data, you can use any of the dedicated scrapers with fewer settings to change and faster results. Just enter one or more Instagram usernames or URLs and click to scrape.

👤 Instagram Profile Scraper🎞️ Instagram Reel Scraper
#️⃣ Instagram Hashtag Scraper📷 Instagram Post Scraper
🏷️ Instagram Mentions ScraperQuick Instagram Posts Checker
👥 Instagram Followers Count Scraper💬 Instagram Comments Scraper
📊 Instagram Hashtag Stats

Why scrape Instagram?

Instagram has about 1 billion monthly active users and is especially popular with younger users, a demographic that can otherwise be difficult for brands to reach. With so many active users, you can imagine that there is a lot of useful data on the site.

So what can you do with that data? Here are some ideas:

  • Scrape hashtags and likes to see what's becoming popular. Maybe you can get involved early or create a niche product to take advantage of short-term trends.
  • Get data based on location to discover opportunities or risks that might affect your investment or business decisions.
  • Scrape comments to understand how real customers see your brand or business.
  • Find Instagram influencers who could help you promote your products, and track their engagement in real time.
  • Collect a constantly updated dataset on your industry, city, or interests and gain insights into ongoing change.
  • Carry out market or academic research that goes beyond surveys and polls.

If you want more ideas, check out our industries pages for ways web scraping is already being used in a wide range of companies.

How to use Instagram Scraper

If you want to know more about how Instagram Scraper works, here's a detailed explanation and step-by-step guide with screenshots and examples.

How many results can you scrape with Instagram scraper?

The number of results Instagram scraper can return varies heavily based on the content you want to scrape. To get an idea you can always open the required url in an incognito window in your browser (Chrome, for example) and check what Instagram shows users who are not logged in.

You have to keep in mind that scraping Instagram is dynamic and subject to change. There’s no one-size-fits-all-use-cases number. The maximum number of results may vary depending on the complexity of the input, location, and other factors.

Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.

How much will scraping Instagram cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

Watch this video for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.

Our Instagram scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our scrapers, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the legality of web scraping.

Input parameters

The input of this scraper should be JSON containing the list of pages on Instagram that should be visited. Check the input tab for detailed list.

Instagram scraper input example

2    "search": "Niagara Falls",
3    "searchType": "place",
4    "searchLimit": 10,
5    "resultsType": "posts",
6    "resultsLimit": 100,

During the Actor run

During the run, the actor will output messages letting you know what's going on. Each message always contains a short label specifying which page from the provided list is currently being scraped. When items are loaded from the page, you should see a message about this event with a loaded item count and total item count for each page, in most cases.

If you provide incorrect input to the actor, it will immediately stop with a failure state and output an explanation of what is wrong.

Instagram output format

The actor stores its results in a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node.js/NPM). See our API reference to learn more about getting results from the Instagram Scraper.

Scraped Instagram posts

The structure of each item in Instagram posts when scrolling looks like this:

2  "inputUrl": "",
3  "url": "",
4  "type": "Image",
5  "shortCode": "C3TTthZLoQK",
6  "caption": "“Biology gives you a brain. Life turns it into a mind.” Jeffrey Eugenides\n\nCongolese Refugees\n\n#congolese #congo #drc #refugee #refugees #bw #bwphotography #sony #sonyalpha #humanity #mind",
7  "hashtags": [],
8  "mentions": [],
9  "commentsCount": 1,
10  "firstComment": "We love your posts blend ! Message us to be featured! 🔥",
11  "latestComments": [],
12  "dimensionsHeight": 720,
13  "dimensionsWidth": 1080,
14  "displayUrl": "",
15  "images": [],
16  "alt": "Photo shared by Brian René Bergeron on February 13, 2024 tagging @natgeo, @life, @people, @humansofny, @voiceofcongo, @sonyalpha, @congo_on_the_map, and @sony. May be a black-and-white image of 2 people, child and text.",
17  "likesCount": 40,
18  "timestamp": "2024-02-13T20:49:57.000Z",
19  "childPosts": [],
20  "ownerFullName": "Brian René Bergeron",
21  "ownerUsername": "blend603",
22  "ownerId": "5566937141",
23  "isSponsored": false,

Scraped Instagram comments

The structure of each item in Instagram comments looks like this:

2  "id": "17900515570488496",
3  "postId": "BwrsO1Bho2N",
4  "text": "When is Tesla going to make boats? It was so nice to see clear water in Venice during the covid lockdown!",
5  "position": 1,
6  "timestamp": "2020-06-07T12:54:20.000Z",
7  "ownerId": "5319127183",
8  "ownerIsVerified": false,
9  "ownerUsername": "mauricepaoletti",
10  "ownerProfilePicUrl": ""

Scraped Instagram profile

The structure of each user profile looks like this:

2  "id": "6622284809",
3  "username": "avengers",
4  "fullName": "Avengers: Endgame",
5  "biography": "Marvel Studios’ \"Avengers​: Endgame” is now playing in theaters.",
6  "externalUrl": "",
7  "externalUrlShimmed": "",
8  "followersCount": 8212505,
9  "followsCount": 4,
10  "hasChannel": false,
11  "highlightReelCount": 3,
12  "isBusinessAccount": true,
13  "joinedRecently": false,
14  "businessCategoryName": "Content & Apps",
15  "private": false,
16  "verified": true,
17  "profilePicUrl": "",
18  "profilePicUrlHD": "",
19  "facebookPage": null,
20  "igtvVideoCount": 5,
21  "latestIgtvVideos": [
22    {
23      "type": "Video",
24      "shortCode": "Bwr3OkpnZZ5",
25      "title": "Marvel Studios’ Avengers: Endgame | “Don’t Do It”",
26      "caption": "Don’t do it. #DontSpoilTheEndgame",
27      "commentsCount": 115,
28      "commentsDisabled": false,
29      "dimensionsHeight": 1333,
30      "dimensionsWidth": 750,
31      "displayUrl": "",
32      "likesCount": 123,
33      "videoDuration": 21.688,
34      "videoViewCount": 77426
35    }
36  ],
37  "postsCount": 274,
38  "latestPosts": [
39    {
40      "type": "Video",
41      "shortCode": "Bw7jACTn3tC",
42      "caption": "“We need to take a stand.” Marvel Studios’ #AvengersEndgame is in theaters now. Get tickets: [link in bio]",
43      "commentsCount": 1045,
44      "dimensionsHeight": 750,
45      "dimensionsWidth": 750,
46      "displayUrl": "",
47      "likesCount": 142707,
48      "videoViewCount": 482810,
49      "timestamp": "2019-05-01T18:44:12.000Z",
50      "locationName": null
51    }
52  ],
53  "following": [],
54  "followedBy": [],

Scraped Instagram hashtag

The structure of each hashtag detail looks like this:

2  "id": "17843854051054595",
3  "name": "endgame",
4  "topPostsOnly": false,
5  "profilePicUrl": "",
6  "postsCount": 1510549,
7  "topPosts": [
8    {
9      "type": "Image",
10      "shortCode": "Bw9UYRrhxfl",
11      "caption": "Here is the second part😂😂 Find the first part on the page\nGuess the pictures😏\n-\n-\n-\n#marvel #mcu #dceu #worldofdc #endgame #superhero #superheros #infinitywar #batman #superman #wonderwoman #iroman #captainamerica #thor #thanos #memes #news #dc #dcuniverse #power #funny #fun" "@marvel",
12      "hashtags": ["marvel", "mcu", "etc..."],
13      "mentions": ["marvel"],
14      "commentsCount": 9,
15      "dimensionsHeight": 1326,
16      "dimensionsWidth": 1080,
17      "displayUrl": "",
18      "likesCount": 2342,
19      "timestamp": "2019-05-02T11:14:55.000Z",
20      "locationName": null
21    }
22  ],
23  "latestPosts": [
24    {
25      "type": "Sidecar",
26      "shortCode": "Bw9flNKl56O",
27      "caption": "Mínimo lo se mi tributo a semejante peli pero bue algo quería hacer me llore la vidaaaaa #endgame #avengersendgame #avengers #thanos #ironman #hulk #thor #makeupcomic #makeup #moviemakeup #makeupeyes #makeupfantasy #makeupavengers #makeuphero",
28      "commentsCount": 0,
29      "dimensionsHeight": 936,
30      "dimensionsWidth": 1080,
31      "displayUrl": "",
32      "likesCount": 12312,
33      "timestamp": "2019-05-02T12:52:48.000Z",
34      "locationName": null
35    }
36  ]

Scraped Instagram place

The structure of each place detail looks like this:

2  "#debug": {
3    "url": ""
4  },
5  "id": "1017812091",
6  "name": "Náměstí Míru",
7  "public": true,
8  "lat": 50.0753325,
9  "lng": 14.43769,
10  "slug": "namesti-miru",
11  "description": "",
12  "website": "",
13  "phone": "",
14  "aliasOnFacebook": "",
15  "addressStreetAddress": "",
16  "addressZipCode": "",
17  "addressCityName": "Prague, Czech Republic",
18  "addressRegionName": "",
19  "addressCountryCode": "CZ",
20  "addressExactCityMatch": false,
21  "addressExactRegionMatch": false,
22  "addressExactCountryMatch": false,
23  "profilePicUrl": "",
24  "postsCount": 5310,
25  "topPosts": [
26    {
27      "type": "Image",
28      "shortCode": "Bw6lVVZhXXB",
29      "caption": "🦋🦋🦋",
30      "commentsCount": 3,
31      "dimensionsHeight": 750,
32      "dimensionsWidth": 750,
33      "displayUrl": "",
34      "likesCount": 345,
35      "timestamp": "2019-05-01T09:45:20.000Z",
36      "locationName": null
37    }
38  ],
39  "latestPosts": [
40    {
41      "type": "Image",
42      "shortCode": "Bw9KSlIhAc-",
43      "caption": "#vinohradskaprincezna #nekdotomusikontrolovat #jestezememaji #jmenujusebufinka 🐶",
44      "commentsCount": 0,
45      "dimensionsHeight": 1080,
46      "dimensionsWidth": 1080,
47      "displayUrl": "",
48      "likesCount": 4546,
49      "timestamp": "2019-05-02T09:46:45.000Z",
50      "locationName": null
51    }
52  ]

Scraped Instagram post details

The structure of each post detail looks like this:

2  "type": "Sidecar",
3  "shortCode": "BwrsO1Bho2N",
4  "caption": "Newly upgraded Model S and X drive units rolling down the production line at Gigafactory 1 #tesla #model3 @elonmusk",
5  "hashtags": ["tesla", "model3"],
6  "mentions": ["elonmusk"],
7  "position": 1,
8  "url": "",
9  "commentsCount": 711,
10  "latestComments": [
11    {
12      "ownerUsername": "mauricepaoletti",
13      "text": "When is Tesla going to make boats? It was so nice to see clear water in Venice during the covid lockdown!"
14    }
15  ],
16  "dimensionsHeight": 1350,
17  "dimensionsWidth": 1080,
18  "displayUrl": "",
19  "id": "2029910590113615245",
20  "firstComment": "@miszdivastatuz",
21  "likesCount": 153786,
22  "timestamp": "2019-04-25T14:57:01.000Z",
23  "locationName": "Tesla Gigafactory 1",
24  "locationId": "2172837629656184",
25  "ownerFullName": "Tesla",
26  "ownerUsername": "teslamotors",
27  "ownerId": "297604134",
28  "captionIsEdited": false,
29  "hasRankedComments": false,
30  "commentsDisabled": false,
31  "displayResourceUrls": [
32    "",
33    ""
34  ],
35  "childPosts": [
36  ],
37  "locationSlug": "tesla-gigafactory-1",
38  "isAdvertisement": false,
39  "taggedUsers": [],
40  "likedBy": []


Can I scrape data from both Instagram and Threads at the same time?

Since Instagram and Threads share userbase, you can scrape both Threads and Instagram profiles since they share the same usernames. By using scraping techniques, you can extract data from both platforms simultaneously and get insights into user profiles and their activities on both Meta platforms. You may want to check out our Threads Profile Scraper as well.

Integrations and Instagram Scraper

Last but not least, Instagram Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and more. Or you can use webhooks to carry out an action whenever an event occurs, e.g. get a notification whenever Instagram Scraper successfully finishes a run.

Using Instagram Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the Apify API reference docs for full details or click on the API tab for code examples.

Not your cup of tea? Build your own scraper

Instagram scraper doesn’t exactly do what you need? You can always build your own! We have various scraper templates in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using our open-source library Crawlee. You can keep the scraper to yourself or make it public by adding it to Apify Store (and find users for it).

Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Instagram scraper or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.

Maintained by Apify
Actor metrics
  • 2.7k monthly users
  • 100.0% runs succeeded
  • 1 days response time
  • Created in Apr 2019
  • Modified 3 days ago