# Instagram Scraper (`automly/instagram-scraper`) Actor

Scrape Instagram posts, reels, profiles, comments and hashtag top posts from links or usernames: captions, likes, comments, video URLs, followers, bios and post counts. One input, many result types. No login.

- **URL**: https://apify.com/automly/instagram-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Social media, Videos, Lead generation
- **Stats:** 2 total users, 1 monthly users, 71.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 post or reels

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Instagram Scraper

### What is Instagram Scraper?

**Instagram Scraper** is an all-in-one tool that lets you **scrape Instagram posts, reels, profiles, comments and hashtag top posts** from links or usernames. Get captions, likes, comment counts, hashtags, mentions, image and video links, video length, music, tagged users, followers, bios and exact post counts. Paste your links, pick what you want, click **Start** and download the data as Excel, CSV or JSON.

- 🧩 **All in one:** profiles, posts, reels and hashtags in one list, one kind of result per run
- ⚡ **Speed:** about 1,700 posts per minute (721 posts from 8 links in 25 seconds in our test)
- 🔁 **Easy to switch:** input and output field names match the most used Instagram scraper on the Store
- 🔓 **No login:** no Instagram account, cookies or API key needed
- 💸 **Free to try:** every Apify account gets $5 of free usage each month

### What can Instagram Scraper do?

- Scrape the **latest posts and reels** of any public Instagram profile, newest first
- Scrape **Instagram reels only** from a profile
- Get the **top posts of a hashtag** with their play counts
- Get **full details of posts and reels** from their links: caption, likes, comments, video link, length, music, location
- Get **profile details**: bio, followers, following, exact post count, website and bio links, verified badge, account type
- Scrape **Instagram comments** from posts and reels, newest first, thousands per post
- Add the **latest comments** under every post to its row
- Only get posts **newer than a date** or an age like "7 days"
- Cap each link with **Results per link** and the whole run with **Max results**
- Export to Excel, CSV, JSON, HTML or XML, or send the data to Google Sheets, Make, Zapier and more

### What data can you extract from Instagram?

| | | |
|---|---|---|
| 📝 Caption | ❤️ Likes | 💬 Comment count |
| #️⃣ Hashtags | @ Mentions | 📅 Publish date and time |
| 🖼️ Image link | 🎬 Video link and length | 🗂️ Carousel items |
| 🎵 Music or original audio | 🏷️ Tagged users | 🤝 Collaborators and sponsors |
| 📍 Location | 📌 Pinned post | ▶️ Reel plays (hashtag top posts) |
| 👤 Username, name and bio | 👥 Followers and following | 🔢 Exact post count |
| 🔗 Website and bio links | ✅ Verified badge and account type | 🗨️ Comments with likes and dates |

### How to scrape Instagram

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **Instagram Scraper**.
3. Add **profile links or usernames, post or reel links, or hashtags** (any mix).
4. Choose the **Results type** (posts, reels, details or comments) and how many results you want per link, then click **Start**.
5. When the run finishes, download your data as Excel, CSV, JSON, HTML or XML.

### How much does it cost to scrape Instagram?

You pay only for the results you get: one price per post, one per post with its latest comments, one per profile and one per comment. See the **Pricing** tab for the current prices. Every Apify account gets **$5 of free usage each month**, so you can try it at no cost. Set **Max results** to cap how many results a run saves, so you always know the most a run can cost.

### What each link gives you

| Results type | Profile (`natgeo` or a profile link) | Post or reel link | Hashtag (`#crossfit` or a hashtag link) |
|---|---|---|---|
| **Posts** | Its latest posts and reels | That post | Its top posts |
| **Reels** | Its latest reels | That reel | Its top reels |
| **Details** | One profile row: bio, followers, post count | That post | Not available |
| **Comments** | Not available (use the post links) | Its comments | Not available |

Links can be `https://www.instagram.com/natgeo/`, `https://www.instagram.com/natgeo/reels/`, `@natgeo` or just `natgeo` for profiles; `https://www.instagram.com/p/...`, `https://www.instagram.com/reel/...` for posts and reels; `https://www.instagram.com/explore/tags/crossfit/` or `#crossfit` for hashtags.

### ⬇️ Input

| Setting | What it does |
|---|---|
| Instagram links or usernames | Profiles, posts, reels and hashtags to scrape, in any mix |
| Results type | Posts, Reels, Details or Comments (see the table above) |
| Results per link | The most posts per profile or hashtag, or comments per post (default 20) |
| Only posts newer than | A date like `2026-09-01` or an age like `7 days`, `2 weeks`, `3 months` |
| Latest comments per post | Add up to 15 of the comments shown under each post to its row (default 0) |
| Add parent data | Add where each post was found (`dataSource`) and that profile's or hashtag's details (`metaData`) |
| Max results (whole run) | Stop once the run has saved this many rows (0 = no limit) |

Example: the latest 50 posts and reels of two profiles, plus one post.

```json
{
  "directUrls": ["natgeo", "https://www.instagram.com/nasa/", "https://www.instagram.com/p/DdG4RIxIPyf/"],
  "resultsType": "posts",
  "resultsLimit": 50
}
```

Example: profile details for a list of accounts.

```json
{
  "directUrls": ["natgeo", "nasa", "https://www.instagram.com/humansofny/"],
  "resultsType": "details"
}
```

Example: the last week's comments on a reel.

```json
{
  "directUrls": ["https://www.instagram.com/reel/DdG4RIxIPyf/"],
  "resultsType": "comments",
  "resultsLimit": 1000,
  "onlyPostsNewerThan": "7 days"
}
```

### ⬆️ Output

Each run saves one kind of row, set by **Results type**: posts, profiles or comments. You can view them as a table in Apify Console, with separate **Posts**, **Profiles** and **Comments** views, or download them as Excel, CSV, JSON, HTML or XML. `inputUrl` tells you which of your links each row came from.

A post:

```json
{
  "inputUrl": "https://www.instagram.com/explore/tags/crossfit/",
  "id": "3997106230996470914",
  "type": "Video",
  "shortCode": "Dd4kvCEC4yC",
  "caption": "Now what's the difference over the course of 100+ reps?? ... #hyrox #crossfit #wallballs",
  "hashtags": ["hyrox", "crossfit", "wallballs"],
  "mentions": ["zoepwood"],
  "url": "https://www.instagram.com/reel/Dd4kvCEC4yC/",
  "commentsCount": 129,
  "likesCount": 6781,
  "videoPlayCount": 1607389,
  "videoDuration": 13.633,
  "timestamp": "2026-09-29T20:05:00Z",
  "ownerUsername": "johnwood32",
  "ownerFullName": "John Wood",
  "productType": "clips",
  "musicInfo": {"artist_name": "Piano Glow", "song_name": "Interstellar (Main Theme)", "uses_original_audio": false},
  "displayUrl": "https://scontent-lga3-3.cdninstagram.com/v/t51.82787-15/828871951_...jpg",
  "videoUrl": "https://scontent-lga3-1.cdninstagram.com/o1/v/t16/f2/m84/AQNeTw7G685y...mp4"
}
```

A profile (Results type **Details**):

```json
{
  "inputUrl": "natgeo",
  "id": "787132",
  "username": "natgeo",
  "url": "https://www.instagram.com/natgeo/",
  "fullName": "National Geographic",
  "followersCount": 268435979,
  "followsCount": 194,
  "postsCount": 32045,
  "verified": true,
  "private": false,
  "accountType": "business",
  "externalUrl": "http://visitstore.bio/natgeo"
}
```

A comment (Results type **Comments**):

```json
{
  "inputUrl": "https://www.instagram.com/p/DdG4RIxIPyf/",
  "postUrl": "https://www.instagram.com/p/DdG4RIxIPyf/",
  "commentUrl": "https://www.instagram.com/p/DdG4RIxIPyf/c/18077858591409581",
  "id": "18077858591409581",
  "text": "❤️❤️",
  "ownerUsername": "clappermia",
  "timestamp": "2026-10-06T06:29:10Z",
  "likesCount": 0
}
```

Each run also saves a short report listing how many links it covered and rows it saved, and any link it could not scrape with the reason (for example, a username that does not exist).

### How can I use Instagram data?

- **Competitor analysis:** see what competitors post, how often, and which posts get the most likes and comments
- **Influencer research:** check a creator's followers and real engagement before you work with them
- **Hashtag research:** see which reels lead a hashtag and how many plays they get
- **Brand monitoring:** collect the comments on your posts and campaigns every day
- **Lead generation:** build lists of business profiles with their websites and bio links
- **Archiving and AI:** build datasets of captions, images and videos for analysis or model training

### Monitor Instagram on a schedule

Save your input as a **task**, set **Only posts newer than** to `1 day`, and add a daily **schedule**. Each run then gets only the new posts (or comments) since yesterday, and you can send them to Google Sheets, Slack or a webhook.

### Instagram API: run it from your code

Start runs and read the results with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automly/instagram-scraper").call(run_input={
    "directUrls": ["natgeo", "https://www.instagram.com/explore/tags/travel/"],
    "resultsType": "posts",
    "resultsLimit": 100,
})
for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(post["url"], post["likesCount"], post["commentsCount"])
```

### 🤖 Use with AI agents (MCP)

This actor works as a tool for AI agents. Connect any MCP-compatible AI assistant or agent to the Apify MCP server at https://mcp.apify.com (sign in with your Apify account), and it can find this actor, fill in the input and read the results by itself. Ask in plain words, for example *"Get natgeo's 20 latest Instagram posts with likes and comment counts"*, and the agent runs `automly/instagram-scraper` with an input like `{"directUrls": ["natgeo"], "resultsType": "posts", "resultsLimit": 20}`. Every input and output field has a plain description, so the agent knows what to type and what each column means. Agent runs cost the same as runs you start yourself.

### ❓FAQ

#### How much does it cost to scrape Instagram?

You pay only for the results you get, per 1,000 results. See the **Pricing** tab for the current prices. Every Apify account gets $5 of free usage each month, so you can try it at no cost.

#### I use another Instagram scraper. Do I need to change my input?

Probably not. The input fields (`directUrls`, `resultsType`, `resultsLimit`, `onlyPostsNewerThan`, `addParentData`) and the main output fields (`shortCode`, `caption`, `likesCount`, `commentsCount`, `timestamp`, `displayUrl`, `videoUrl`, `ownerUsername`, `followersCount`, `postsCount` and more) use the same names as the most used Instagram scraper on the Store. A `search` word with `searchType` hashtag or user is read as that exact hashtag or username. Mentions, stories and place links are not offered (see below): those inputs give no rows and cost nothing, and the run still reads the rest.

#### How many posts can I get from one profile?

All of them. Profiles with thousands of posts work. Set **Results per link** to the number you need.

#### How many posts does a hashtag give?

Its **top posts** only: Instagram shows a few dozen top posts per hashtag (mostly reels) to people who are not logged in, and no full or latest list. Some very broad hashtags (for example #fitness or #love) show no top posts at all to people who are not logged in; the run then names them as not found. Profiles have no such limit.

#### Can I search Instagram, or get followers, stories or the posts a profile is tagged in?

No. Instagram shows search, follower lists, stories and tagged posts only to logged-in users, and this scraper never logs in. Use profile, post, reel and hashtag links instead.

#### Why is the view count of some reels missing?

Instagram shows reel play counts without a login only on hashtag pages, so `videoPlayCount` is filled for hashtag top posts and empty for posts from profiles or links. Likes and comment counts are there for every post, unless the owner hides likes (then `likesCount` is empty and `likesHidden` is true).

#### Can I scrape private Instagram profiles?

No. A private profile's details (name, bio, follower count) come out with Results type **Details**, but its posts and comments are not public. With **Posts** or **Reels** it is listed as "not found" in the run report and the run still finishes.

#### What happens with a link that does not work?

A deleted post, a wrong username or a hashtag with no posts is listed in the run report as "not found", and the other links are scraped as usual.

#### Do I need an Instagram account?

No. You don't need an Instagram account, cookies or an API key.

#### How long do the image and video links work?

Instagram's media links expire after a few days. Download the files you need soon after the run.

#### Is it legal to scrape Instagram?

This scraper only collects what people chose to publish publicly. It does not collect private data such as email addresses or phone numbers. Posts and comments can still contain personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

Instagram Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by Instagram or Meta.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the link and what you expected. We usually reply within a day.

### Scrape more Instagram data

| Actor | What you get |
|---|---|
| [Instagram Posts & Reels Scraper](https://apify.com/automly/instagram-profile-posts-scraper) | Posts and reels of profiles with date ranges, plus a real-time API |
| [Instagram Profile Scraper](https://apify.com/automly/instagram-profile-data-scraper) | Bio, followers, following and post count for many profiles at once |
| [Instagram Comments Scraper](https://apify.com/automly/instagram-comments-scraper) | Every comment on a post or reel, newest first |
| [Instagram Post Scraper](https://apify.com/automly/instagram-post-details-scraper) | Full details of posts and reels from their links |

### ⭐ Your feedback

Ideas, missing fields or problems: open the **Issues** tab and we'll take a look. If Instagram Scraper saved you time, a short review on the **Reviews** tab helps other people find it.

# Actor input Schema

## `directUrls` (type: `array`):

Profiles, posts, reels or hashtags, e.g. natgeo, https://www.instagram.com/natgeo/, https://www.instagram.com/p/DdG4RIxIPyf/, https://www.instagram.com/reel/DdG4RIxIPyf/ or https://www.instagram.com/explore/tags/crossfit/ (or #crossfit). Mix them freely: each one gives what Results type asks for.

## `resultsType` (type: `string`):

What to get from each link: posts = a profile's latest posts and reels, a hashtag's top posts, or the post a link points to; reels = the same, reels only; details = one row per profile (bio, followers, post count) or per post link; comments = the comments of each post or reel link.

## `resultsLimit` (type: `integer`):

The most posts (per profile or hashtag) or comments (per post) to scrape from each link, e.g. 20. A hashtag gives its top posts only, a few dozen at most.

## `onlyPostsNewerThan` (type: `string`):

Skip older posts (and, for comments, older comments): a date like 2026-09-01 (UTC) or an age like 7 days, 2 weeks or 3 months. Leave empty for no date limit.

## `maxCommentsPerPost` (type: `integer`):

Add up to 15 of the comments shown under each post to its row (latestComments and firstComment), e.g. 5. 0 leaves them out. For all of a post's comments, use Results type: comments.

## `addParentData` (type: `boolean`):

Add dataSource (profile, hashtag or post) and metaData (the profile's details, or the hashtag's name and link) to each post row.

## `maxResults` (type: `integer`):

Stop once the run has saved this many rows across all links, e.g. 500. 0 means no limit beyond Results per link.

## `proxyConfiguration` (type: `object`):

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/natgeo/"
  ],
  "resultsType": "posts",
  "resultsLimit": 20,
  "maxCommentsPerPost": 0,
  "addParentData": false,
  "maxResults": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

No description

## `profiles` (type: `string`):

No description

## `comments` (type: `string`):

No description

## `results` (type: `string`):

No description

## `report` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "directUrls": [
        "https://www.instagram.com/natgeo/"
    ],
    "resultsType": "posts",
    "resultsLimit": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/instagram-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "directUrls": ["https://www.instagram.com/natgeo/"],
    "resultsType": "posts",
    "resultsLimit": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/instagram-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "directUrls": [
    "https://www.instagram.com/natgeo/"
  ],
  "resultsType": "posts",
  "resultsLimit": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/instagram-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/instagram-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0MVVrj0aue4oCJ5TP/builds/TmQAjWXsLkFqpxX3Q/openapi.json
