# Instagram Scraper ($0.50/1000 results) (`api-ninja/instagram-scraper`) Actor

🔥 The ultimate all-in-one Instagram powerhouse: scrape profiles, posts, reels, reposts, hashtags, locations & music-tagged content at scale—no login required, complete data access.

- **URL**: https://apify.com/api-ninja/instagram-scraper.md
- **Developed by:** [API ninja](https://apify.com/api-ninja) (community)
- **Categories:** Social media, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 552 total users, 28 monthly users, 100.0% runs succeeded, 32 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.50 / 1,000 results

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 Content Scraper: Scrape Posts, Reels, Tags, Locations & Sections

The **Instagram Content Scraper** is a high-performance, all-in-one data extraction tool that lets you scrape data from [Instagram](https://www.instagram.com) at scale without logging in or using the official Instagram API. It extracts structured data from user profiles, reels, tagged posts, reposts, hashtags, locations, audio feeds, and curated Instagram sections. It works only with public Instagram content and does not log in or access private data. This scraper acts as a powerful **Instagram API alternative**, designed to collect public content efficiently and anonymously.

You can provide inputs in multiple convenient formats. Full URLs are supported, but they are **not required**. The Actor also accepts inputs such as `instagram.com/nasa/reels`, `nasa/reels`, `@nasa`, `@nasa/reels`, `explore/locations/213131048/berlin/`, or `/reels/audio/271328201351336/`.

### 💼 Why use Instagram Content Scraper?

Using an Instagram scraper allows you to gather insights that are often restricted by the official API:

- **Track Competitors**: Monitor competitors' Instagram content, reels, and engagement over time to stay ahead of the market.
- **AI & ML Training**: Collect massive datasets for computer vision or NLP models from public posts and reels.
- **Influencer Discovery**: Monitor hashtag and location feeds to discover rising influencers and viral trends.
- **Data Pipelines**: Build custom dashboards by exporting Instagram data to your BI tools via the Apify API.
- **Content Archiving**: Automatically archive public content for reporting, compliance, or brand safety.

### 🚀 What can this Instagram scraper and API alternative do?

This tool is a robust extraction engine built for production-grade workflows, offering features that go far beyond basic profile scraping:

- **⚡ No Login/Account Required**: This **Instagram scraper** does not log in, does not access private data, and remains anonymous, protecting you from account bans.
- **🌍 Massive Coverage**: Extract data from almost any public Instagram source:
  - **User Profiles**: Scrape the entire post feed of any public profile.
  - **Instagram Reels Scraper**: Extract high-quality video metadata and direct MP4 URLs.
  - **Tagged & Reposts**: See how the community interacts with a specific profile.
  - **Instagram Hashtag Scraper**: Pull the latest or top posts from any `#hashtag` feed.
  - **Instagram Location Scraper**: Extract posts from specific geolocations.
  - **Audio/Music Feed**: Find every post using a specific song or audio ID.
  - **Curated Sections**: Dive into curated categories like Games, Music, Fashion, Beauty, and Photography.
- **🧭 Flexible Input Parsing**: Accepts full Instagram URLs, domain-only inputs, bare paths, and `@handle` formats, then normalizes them automatically.
- **🔄 Intelligent Pagination**: Automatically handles thousands of results using built-in continuation tokens (`max_id` and `end_cursor`).
- **🎞️ Deep Media Extraction**: Get direct access to raw video files, high-res images, and full metadata.

### 💎 The Apify Advantage

Combined with the Apify platform, this Actor becomes a scalable **Instagram API alternative** with professional features out of the box:

- **Proxy Rotation**: Automatically uses high-quality residential proxies to bypass rate limits and ensure stability.
- **Scheduling**: Keep your Instagram dataset updated by running the scraper every hour, day, or week.
- **Integrations**: Connect your data directly to Slack, Make, Zapier, or your own custom API.
- **Flexible Exports**: Download your datasets in **JSON, CSV, Excel, or HTML** formats instantly.

Together with Apify’s scheduling, monitoring, and API, this Actor works as a scalable Instagram data pipeline for production use.

### 📊 What Instagram data can you extract with this scraper?

| Field | Description | SEO Keyword |
| --- | --- | --- |
| **ID & Shortcode** | Unique identifiers for the post and its public URL. | Instagram ID |
| **Caption** | Full text description including all hashtags. | Instagram Caption |
| **Media URLs** | Direct links to high-res images or MP4 video files. | Instagram Media URL |
| **Engagement** | Current view counts, like counts, and comment counts. | Instagram Engagement |
| **Timestamp** | The exact date and time the content was published. | Instagram Date |
| **Owner Info** | Username, full name, and unique UserID. | Instagram UserID |
| **Location** | Name and ID of the tagged geolocation. | Instagram Location |

### 📖 How to scrape Instagram data with Instagram Content Scraper

1. Open [Instagram Content Scraper](https://apify.com/maxdz/instagram-scraper) on the Apify platform.
2. Add Instagram profile, reel, hashtag, location, or audio inputs to the **URLs** field. Full URLs work, but you can also use shorter forms like `nasa/reels`, `@nasa`, or `explore/tags/space/`. (See table below for formats).
3. (Optional) Select specific categories from the **Explore in sections** dropdown.
4. Set your **Max results** per URL or enable **Scrape all available results**.
5. Click **Start** and download your Instagram dataset in JSON, CSV, or Excel once finished.

#### Supported URL Formats & Content Types

The Actor accepts both canonical URLs and shortened Instagram-style inputs. For example, `https://www.instagram.com/nasa/reels/`, `instagram.com/nasa/reels`, `nasa/reels`, and `@nasa/reels` all resolve to the same source.

| Scrape Type | Example URL Format | Content Produced |
| --- | --- | --- |
| **Profile Posts** | `https://www.instagram.com/nasa/` or `@nasa` | All regular posts from the main grid. |
| **Reels** | `https://www.instagram.com/nasa/reels/` or `nasa/reels` | High-quality video metadata from the Reels tab. |
| **Tagged Posts** | `https://www.instagram.com/nasa/tagged/` or `@nasa/tagged` | Posts where the specific user is tagged. |
| **Reposts** | `https://www.instagram.com/nasa/reposts/` or `nasa/reposts` | Content shared/reposted by the profile. |
| **Hashtags (Tags)** | `https://www.instagram.com/explore/tags/space/` or `explore/tags/space/` | Public posts tagged with the specific hashtag. |
| **Locations** | `https://www.instagram.com/explore/locations/213131048/berlin/` or `explore/locations/213131048/berlin/` | Posts geolocated to a specific place. |
| **Audio/Music** | `https://www.instagram.com/reels/audio/271328201351336/` or `/reels/audio/271328201351336/` | All Reels using a specific audio track ID. |

> Instagram Content Scraper has multiple input options for advanced control. See the **Input tab** in Apify Console for all parameters and detailed tooltips.

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

This Actor uses **pay-per-event pricing** with a **$0.10 minimum total charge per run**.

| Charge | Free plan | Bronze-Diamond plans |
| --- | ---: | ---: |
| Actor start | $0.01 | $0.01 |
| Result saved to the default dataset | $0.005 per result | $0.0005 per result |

The Actor start event is charged once per GB of memory, with at least one event per run. The final cost depends mainly on how many profile, reel, hashtag, location, or audio-feed records are saved. Start with a small result limit and check the Actor's **Pricing** tab for the latest rates before starting a large run.

### 📥 Input & Output Examples

#### Input Example

```json
{
  "urls": ["https://www.instagram.com/nasa/"],
  "sections": ["10156104417160727"],
  "maxResults": 20
}
```

#### Output Example

```json
{
  "id": "354678123456789",
  "shortcode": "DBxYz123",
  "video_url": "https://scontent.cdninstagram.com/v/...",
  "view_count": 125400,
  "caption": "Falcon 9 landing at sunset #SpaceX #Space",
  "taken_at": 1737984000,
  "user": { "username": "spacex", "full_name": "SpaceX" }
}
```

### ⚖️ Is it legal to scrape Instagram?

Our scrapers are ethical and do not extract private user data such as emails, phone numbers, or direct messages. They only extract what users have chosen to share publicly on Instagram.

However, your results may still contain personal data. Personal data is protected by **GDPR** in the European Union and other regulations worldwide. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure, consult your legal counsel. For more information, read the [Apify blog post on the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

### 🛠 Other Instagram Scraping Tools

If you like this Actor, you might also find these Instagram tools useful:

- 📸 **[Instagram Posts Scraper](https://apify.com/api-ninja/instagram-posts-scraper)**: Collect posts, reels, tagged content, or reposts from public profiles.
- \#️⃣ **[Instagram Hashtag Scraper](https://apify.com/api-ninja/instagram-hashtag-scraper)**: Collect public posts from one or more Instagram hashtag feeds.

### 🆘 Support

If you encounter a bug or have a feature request, please visit the **Issues** tab. We actively maintain this tool and welcome your feedback!

**Keywords**: Instagram API Alternative, Instagram Content Scraper, Extract Instagram Reels, Instagram Hashtag Scraper, Instagram Location Scraper, Instagram Data Extraction.

# Actor input Schema

## `urls` (type: `array`):

Provide URLs for profiles, reels, hashtags, locations, or audio feeds. Examples: https://www.instagram.com/nasa/, https://www.instagram.com/explore/tags/travel/, or https://www.instagram.com/explore/locations/213131048/berlin-germany/,

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

The maximum number of items to fetch for each individual URL or section. This is ignored if 'Scrape all available results' is enabled.

## `scrapeAllResults` (type: `boolean`):

If enabled, the scraper will ignore the result limit and attempt to fetch all available content for each provided source.

## `sections` (type: `array`):

Select curated categories from the Instagram Explore tab to scrape content in specific niches.

## Actor input object example

```json
{
  "urls": [
    "https://www.instagram.com/badgalriri/",
    "https://www.instagram.com/badgalriri/reels",
    "https://www.instagram.com/badgalriri/tagged",
    "https://www.instagram.com/badgalriri/reposts",
    "https://www.instagram.com/explore/tags/travel",
    "https://www.instagram.com/explore/locations/213131048/berlin-germany/",
    "https://www.instagram.com/reels/audio/271328201351336/"
  ],
  "maxResults": 20,
  "scrapeAllResults": false
}
```

# Actor output Schema

## `results` (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 = {
    "urls": [
        "https://www.instagram.com/badgalriri/",
        "https://www.instagram.com/badgalriri/reels",
        "https://www.instagram.com/badgalriri/tagged",
        "https://www.instagram.com/badgalriri/reposts",
        "https://www.instagram.com/explore/tags/travel",
        "https://www.instagram.com/explore/locations/213131048/berlin-germany/",
        "https://www.instagram.com/reels/audio/271328201351336/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-ninja/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 = { "urls": [
        "https://www.instagram.com/badgalriri/",
        "https://www.instagram.com/badgalriri/reels",
        "https://www.instagram.com/badgalriri/tagged",
        "https://www.instagram.com/badgalriri/reposts",
        "https://www.instagram.com/explore/tags/travel",
        "https://www.instagram.com/explore/locations/213131048/berlin-germany/",
        "https://www.instagram.com/reels/audio/271328201351336/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("api-ninja/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 '{
  "urls": [
    "https://www.instagram.com/badgalriri/",
    "https://www.instagram.com/badgalriri/reels",
    "https://www.instagram.com/badgalriri/tagged",
    "https://www.instagram.com/badgalriri/reposts",
    "https://www.instagram.com/explore/tags/travel",
    "https://www.instagram.com/explore/locations/213131048/berlin-germany/",
    "https://www.instagram.com/reels/audio/271328201351336/"
  ]
}' |
apify call api-ninja/instagram-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,api-ninja/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/n1AtybM4tQM9yvHde/builds/ej0gYE782IG9gQgVu/openapi.json
