# Instagram Profile Scraper - Profiles & Recent Posts (No Login) (`get_anything/instagram-scraper`) Actor

Scrape public Instagram profiles and their recent posts without login or an API key. Get followers, following, posts count, bio, verified status, plus each post's caption, likes, comments, views, type and timestamp. Camoufox-powered to pass bot detection. Export JSON/CSV.

- **URL**: https://apify.com/get\_anything/instagram-scraper.md
- **Developed by:** [Get Anything](https://apify.com/get_anything) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Profile Scraper - Profiles & Stats (No Login)

Scrape **public Instagram profile stats** without login, password, or an API key. Give it usernames (or profile URLs) and get followers, following, posts count, name, bio and profile picture.

Powered by **Camoufox** (a hardened, fingerprint-spoofing browser) which loads the real profile page and reads the public data Instagram exposes for SEO.

### ⚠️ Scope & honest limitations (read this)

Instagram has locked down anonymous access hard:

- **Profile stats: ✅ available** — followers, following, posts count, full name, bio, profile picture, from the public page's meta tags.
- **Post-level data (captions, likes, comments per post): ❌ requires login.** Instagram's `web_profile_info` API now returns **HTTP 401** for anonymous callers on every IP, even from a real browser. There is no reliable no-login path to a profile's posts. Fetching them needs authenticated sessions (a logged-in cookie), which this no-login Actor deliberately does not use.

So **v1 is a profile-stats / follower-tracking tool**, not a post scraper. If the API ever returns data for an IP, the Actor will also emit that profile's recent posts automatically — but treat that as a bonus, not the contract.

### Inputs

| Field | Type | Notes |
|---|---|---|
| `usernames` | array | Usernames (`nasa`, `@nasa`) or profile URLs. |
| `resultsLimit` | int | Max recent posts per profile *if* the API is reachable (usually 0 without login). |
| `includePosts` | bool | Attempt posts when the API is reachable. Default true. |
| `proxyConfiguration` | proxy | **Residential strongly recommended** — Instagram blocks datacenter IPs. |

### Output

One `type: "profile"` record per username:

```json
{
  "type": "profile",
  "username": "nasa",
  "url": "https://www.instagram.com/nasa/",
  "fullName": "NASA",
  "biography": "Explore the universe and discover our home planet with NASA.",
  "followersCount": 30200000,
  "followsCount": 79,
  "postsCount": 4161,
  "profilePicUrl": "https://…"
}
```

Plus `type: "post"` records only when the API is reachable for that IP (rare without login).

### How it handles blocking

Each profile runs in its own Camoufox session and **retries up to 3 times on fresh residential IPs**. Use a residential proxy for best results.

### Monetization (Apify Console → Publication → Monetization)

Wired events: `profile-scraped`, `post-scraped`.

# Actor input Schema

## `usernames` (type: `array`):

Instagram usernames (with or without @) or profile URLs, e.g. 'nasa' or 'https://www.instagram.com/nasa/'.

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

How many recent posts to return per profile (public profiles only). Instagram returns roughly the latest 12 without login.

## `includePosts` (type: `boolean`):

Also output each profile's recent posts. Turn off for profile records only.

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

Instagram blocks datacenter IPs. Residential proxy is strongly recommended.

## Actor input object example

```json
{
  "usernames": [
    "nasa"
  ],
  "resultsLimit": 12,
  "includePosts": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One profile record per username, plus one item per recent post.

# 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 = {
    "usernames": [
        "nasa"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("get_anything/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 = {
    "usernames": ["nasa"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("get_anything/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 '{
  "usernames": [
    "nasa"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call get_anything/instagram-scraper --silent --output-dataset

```

## MCP server setup

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