Actor picture

Instagram Profile Scraper

zuzka/instagram-profile-scraper

Scrape all Instagram profile info. Add one or more Instagram usernames and extract followers, follows, URLs, bio, posts, likes, counts, channel, duration, highlight reel, and more. Download structured data in JSON, CSV, XML, Excel, and HTML to use in applications, reports, and spreadsheets.

No credit card required

Author's avatarZuzka Pelechová
  • Modified
  • Users8
  • Runs22
Actor picture

Instagram Profile Scraper

Features

Our free Instagram Profile Scraper allows you to scrape profile information from any Instagram Profile. Just type the Instagram user username and you will get the information about their account.

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.

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 could you do with that data? Here are some ideas:

  • Scrape posts 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.
  • 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.

Cost of usage

There are two main factors to take into account if you want to run Instagram Scraper on the Apify platform:

Using proxies

Instagram now aggressively blocks scrapers and redirects them to a login page. Currently, the only reliable solution to this problem is to use residential proxies.

Apify residential proxies

The Apify platform provides residential proxies if you have a paid subscription. These proxies are only available to be run within actors on the Apify platform, not externally. If you are interested in using residential proxies for this scraper, contact support@apify.com via email or in-app chat to get the proxies enabled.

Profile scraping

Scraping 1,000 profiles requires about:

  • 10 Compute units
  • 0.24 GB of proxy traffic

Example pricing

Based on Apify's pricing at the time of writing, scraping 1,000 profiles would cost 10 CU * $0.25 + 0.24 GB * 12.5 GB, which is a total of $5.50. The Personal plan ($49) would allow you to scrape about 9,000 Instagram profiles monthly.

Input parameters

The input of this scraper should be JSON containing the post/list of posts that should be visited. Required fields are:

Field Type Description
username Array (required) Profile URL(s) to scrape posts from

Instagram post scraper Input example

{
    "directUrls": ["apifytech"],
}

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.

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


    {
    "id": "29230178602",
    "username": "apifytech",
    "fullName": "Apify",
    "biography": "Official account of the Apify team. We’re on a mission to make the web more programmable and more fun.",
    "externalUrl": "https://apify.com/",
    "externalUrlShimmed": "https://l.instagram.com/?u=https%3A%2F%2Fapify.com%2F&e=ATO3iUiay_yyUWqNziEKxD2YuX02SOIM8DFa0AyiQJDWHYZXcoBYSLAk17hxMHTcnpCPckkeXLd4jma4&s=1",
    "followersCount": 124,
    "followsCount": 13,
    "hasChannel": false,
    "highlightReelCount": 5,
    "isBusinessAccount": true,
    "joinedRecently": false,
    "businessCategoryName": "Personal Goods & General Merchandise Stores",
    "private": false,
    "verified": false,
    "profilePicUrl": "https://instagram.fric1-2.fna.fbcdn.net/v/t51.2885-19/s150x150/106623918_555633185104955_8069061714137380269_n.jpg?_nc_ht=instagram.fric1-2.fna.fbcdn.net&_nc_cat=111&_nc_ohc=Krdht0INu-QAX9q5aRx&edm=ABfd0MgBAAAA&ccb=7-4&oh=847147a4afc50f9a0a8b6ef81960d6da&oe=619890A9&_nc_sid=7bff83",
    "profilePicUrlHD": "https://instagram.fric1-2.fna.fbcdn.net/v/t51.2885-19/s320x320/106623918_555633185104955_8069061714137380269_n.jpg?_nc_ht=instagram.fric1-2.fna.fbcdn.net&_nc_cat=111&_nc_ohc=Krdht0INu-QAX9q5aRx&edm=ABfd0MgBAAAA&ccb=7-4&oh=b3b7f2a5dd92121bc3272b4f8fd96f82&oe=6199D391&_nc_sid=7bff83",
    "facebookPage": null,
    "igtvVideoCount": 3,
    "latestIgtvVideos": [
    {
    "type": "Video",
    "shortCode": "CVdF6ztgMX1",
    "title": "",
    "caption": "After the superfun offsite in Croatia, it's good to remind ourselves that we actually work here 😁 So let's rewatch the intro video together ▶️ We mean every word of what we say in it, so it's your call now: would you work with us? Don't hesitate to send in your applications - we can't wait to read them 😉",
    "commentsCount": 0,
    "commentsDisabled": false,
    "dimensionsHeight": 607,
    "dimensionsWidth": 1080,
    "displayUrl": "https://instagram.fric1-2.fna.fbcdn.net/v/t51.2885-15/fr/e15/s1080x1080/248313208_5056389781056509_753703490695178596_n.jpg?_nc_ht=instagram.fric1-2.fna.fbcdn.net&_nc_cat=105&_nc_ohc=haGyA0xZfC0AX8SMzE7&edm=ABfd0MgBAAAA&ccb=7-4&oh=9435b52ef66260d5501ab4211b09bec5&oe=619487CB&_nc_sid=7bff83",
    "likesCount": 5,
    "videoDuration": 146.048,
    "videoViewCount": 48
    },
    {
    "Here are more videos": "..."
    }
],
    "postsCount": 18,
    "latestPosts": [
    {
    "type": "Sidecar",
    "shortCode": "CWBQOpCsTpM",
    "caption": "Behold one of the best crossovers in Apify’s history: Birthday party ft. Halloween 🎂🎃 No tricks, only treats were given, with some inhouse-made music, games and a dozen initiation rituals on the side 🎲🎶🕯No corona spooks though: all Apifiers are either vaccinated or get regularly tested 😉",
    "hashtags": [],
    "mentions": [],
    "url": "https://www.instagram.com/p/CWBQOpCsTpM",
    "commentsCount": 0,
    "latestComments": [],
    "dimensionsHeight": 716,
    "dimensionsWidth": 1080,
    "displayUrl": "https://instagram.fric1-2.fna.fbcdn.net/v/t51.2885-15/e35/253980354_559848475112439_5804990644025636799_n.jpg?_nc_ht=instagram.fric1-2.fna.fbcdn.net&_nc_cat=103&_nc_ohc=Nif9P44yJ1UAX_iNyDk&edm=ABfd0MgBAAAA&ccb=7-4&oh=a48f9cbac87f79a650c0eade17d09c62&oe=6198C6DB&_nc_sid=7bff83",
    "images": [
    "https://instagram.fric1-2.fna.fbcdn.net/v/t51.2885-15/e35/253980354_559848475112439_5804990644025636799_n.jpg?_nc_ht=instagram.fric1-2.fna.fbcdn.net&_nc_cat=103&_nc_ohc=Nif9P44yJ1UAX_iNyDk&edm=ABfd0MgBAAAA&ccb=7-4&oh=a48f9cbac87f79a650c0eade17d09c62&oe=6198C6DB&_nc_sid=7bff83",
    "https://instagram.fric1-2.fna.fbcdn.net/v/t51.2885-15/e35/254026576_404168428094067_1608711852803547152_n.jpg?_nc_ht=instagram.fric1-2.fna.fbcdn.net&_nc_cat=103&_nc_ohc=etn3AU01ZYgAX96M2wT&edm=ABfd0MgBAAAA&ccb=7-4&oh=8f2d0bfeddb1b11a72299eef75901594&oe=6198E2F2&_nc_sid=7bff83"
    ],
    "id": "2702512626284444236",
    "alt": "Photo shared by Apify on November 08, 2021 tagging @jancurn, and @ma_ra_ma_ra. May be an image of one or more people, people standing, cake and indoor.",
    "likesCount": 17,
    "timestamp": "2021-11-08T15:17:11.000Z",
    "locationName": "Halloween Party/birthday bash",
    "locationId": "910705792396150",
    "ownerUsername": "apifytech",
    "ownerId": "29230178602"
    },
    {
    "Here are more posts": "..."
    }
    ],
    "taggedPosts": []
    }

Personal data

You should be aware that your results could contain personal data. Personal data is protected by 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.