# Instagram Profile Scraper (Grabd) (`grabd/instagram-profile-scraper`) Actor

Public Instagram profile data and the 12 latest posts for a list of usernames. Same output as the official Instagram Profile Scraper, $1 per 1,000 complete profiles, nothing charged for missing or private ones.

- **URL**: https://apify.com/grabd/instagram-profile-scraper.md
- **Developed by:** [Grabd](https://apify.com/grabd) (community)
- **Categories:** Social media, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 (Grabd)

Get public Instagram profile data and each profile's 12 latest posts from a list of usernames or profile URLs. The output has the same shape as the official [Instagram Profile Scraper](https://apify.com/apify/instagram-profile-scraper), so it works as a drop-in replacement in existing pipelines.

**$1.00 per 1,000 profiles.** You pay only for public profiles that came back complete. Profiles that do not exist, private profiles, incomplete answers and anything not scraped are returned free, with the reason in the item.

On the free Apify plan each run scrapes the first 10 profiles, so you can try it. Any paid Apify plan removes the limit.

### What you get

One item per profile:

- **Profile**: `username`, `fullName`, `biography`, `followersCount`, `followsCount`, `postsCount`, `verified`, `private`, `isBusinessAccount`, `isProfessionalAccount`, `businessCategoryName`, `externalUrl`, `externalUrls`, `profilePicUrl`, `profilePicUrlHD`, `highlightReelCount`, `id`, `url`, `inputUrl`.
- **`latestPosts`**: the 12 most recent posts and reels, each with `shortCode`, `url`, `type`, `caption`, `hashtags`, `mentions`, `likesCount`, `commentsCount`, `videoPlayCount`, `timestamp`, `displayUrl`, `images`, `childPosts`, `ownerUsername`.

Example input:

```json
{ "usernames": ["natgeo", "@nasa", "https://www.instagram.com/nike/"] }
```

### Use it as an Instagram profile API

One synchronous call to the Apify API runs the Actor and returns the profiles in the response body, with no run to poll and no dataset to fetch afterwards:

```bash
curl -X POST "https://api.apify.com/v2/acts/grabd~instagram-profile-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "usernames": ["natgeo", "nasa"] }'
```

A synchronous call waits at most 5 minutes, so keep it to short lists. For long lists, start a normal run and read its dataset when it finishes. The Apify clients for JavaScript and Python work the same way.

### Switching from the official Instagram Profile Scraper

The input field is the same (`usernames`) and so are the output fields, including `latestPosts`. Change the Actor ID from `apify/instagram-profile-scraper` to `grabd/instagram-profile-scraper` and keep your parsing code.

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

$1.00 per 1,000 complete public profiles, each with its 12 latest posts, plus $0.00005 per run. There is no platform usage on top, and the free items listed below cost nothing. 100 profiles cost about $0.10.

### Items that are not charged

| Field in the item | What happened |
|---|---|
| `error: "not_found"` | The profile does not exist, was renamed, or is unavailable |
| `note` (with `private: true`) | Private account: only the header Instagram shows publicly, no posts |
| `warning` mentioning "Not charged" | Instagram returned an incomplete answer; retry later |
| `error: "temporarily_unavailable"` | Instagram did not answer after three attempts |
| `error: "invalid_username"` | The input is not a username or a profile URL (post URLs are not accepted) |
| `error: "daily_capacity_reached"` | See "Volume" below |
| `error: "free_plan_limit"` | Beyond the first 10 profiles of a run on the free Apify plan |

On very large accounts Instagram often does not return play counts in time: those profiles come back complete, with `videoPlayCount: null` on video posts and a `warning` saying so. They are charged as normal profiles.

### Volume

This Actor runs on capacity we reserve for it every day, shared by all its users. When the day's capacity is used up, the run stops, nothing more is charged, the remaining usernames come back as `daily_capacity_reached` items, and the status message says when capacity resets (midnight UTC).

**Need more than the shared daily capacity, or a guaranteed daily volume?** Open an issue in the Issues tab with your expected daily volume, and we will tell you what we can raise.

### Limits

- Public data only, read without logging in. No stories, no followers lists, no private content.
- No discovery: the Actor reads the profiles you list, it does not search for or suggest accounts.
- 12 latest posts per profile, no older posts.
- Speed: about 2 to 8 seconds per profile, a few profiles in parallel.

# Actor input Schema

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

Instagram usernames (natgeo, @natgeo) or profile URLs (https://www.instagram.com/natgeo/). Duplicates are scraped once. Post URLs are not accepted.

## Actor input object example

```json
{
  "usernames": [
    "natgeo",
    "nasa"
  ]
}
```

# Actor output Schema

## `profiles` (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 = {
    "usernames": [
        "natgeo",
        "nasa"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("grabd/instagram-profile-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": [
        "natgeo",
        "nasa",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("grabd/instagram-profile-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": [
    "natgeo",
    "nasa"
  ]
}' |
apify call grabd/instagram-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,grabd/instagram-profile-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/CAjVOaNSY7Gfl3Wpe/builds/pBEMGki7sOW67F1gm/openapi.json
