# Instagram Profile Scraper - Bio, Followers & Latest Posts (`lanternlab318/instagram-profile`) Actor

- **URL**: https://apify.com/lanternlab318/instagram-profile.md
- **Developed by:** [Lantern Lab](https://apify.com/lanternlab318) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.49 / 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 - Bio, Followers & Latest Posts

Give it Instagram usernames or profile URLs and get **one row per public profile**: name, bio, website and bio links, follower, following and post counts, verified and business badges, category, profile picture, and a summary of the profile's 12 newest posts. No Instagram login, no cookies, no account of your own. **$1.49 per 1,000 profiles.** See [Pricing](#pricing).

### What makes it different

- **One row per profile, nothing to stitch together.** The latest posts (caption, publish time, likes, comments, views, URL, pinned flag) are inside the profile row, at no extra charge.
- **Missing, refused and invalid are free - and labelled.** A name Instagram has no account for, an entry that is not a username, or a profile Instagram refused gets a free `input_status` row with a reason. A refused profile is never reported as "does not exist".
- **No duplicates.** `nasa`, `@NASA` and `https://www.instagram.com/nasa/` are read once. Two names that turn out to be the same account are written and charged once.
- **Real values or `null`.** A field Instagram did not send is `null`, never guessed. Private accounts are returned with their public profile fields and `latestPostsPartialReason: "private_account"`.
- **Bounded runs.** Each profile costs at most 3 requests (one retry on a residential IP after a refusal), and you can set a hard ceiling with `maxUpstreamRequests`.

### Input

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

| Field | What it does |
| --- | --- |
| `usernames` | `nasa`, `@nasa` or a profile URL, one per line. Repeats are read once. Up to 500 per run. |
| `maxPostsPerProfile` | How many of the newest posts to summarise in each row. Default 12 (the most Instagram lists with a profile); 0 leaves them out. |
| `maxUpstreamRequests` | Optional hard ceiling on requests. By default the Actor allows 3 per profile, so a run is never unbounded. |
| `proxyConfiguration` | Default: Apify Proxy (datacenter). A refused profile is retried on residential IPs. |

### Output

Every row has a `recordType`. Dataset views: Profiles, Inputs without a profile.

**profile** (charged)

```json
{
    "recordType": "profile",
    "userId": "528817151",
    "username": "nasa",
    "fullName": "NASA",
    "biography": "Making the seemingly impossible, possible. ✨",
    "externalUrl": "https://www.nasa.gov/",
    "bioLinks": [{ "title": "NASA.gov Homepage", "url": "https://www.nasa.gov" }],
    "followersCount": 104425096,
    "followsCount": 90,
    "postsCount": 4987,
    "highlightReelCount": 6,
    "isVerified": true,
    "isPrivate": false,
    "isBusinessAccount": true,
    "isProfessionalAccount": true,
    "businessCategory": "Government Agencies",
    "categoryEnum": "GOVERNMENT_ORGANIZATION",
    "profilePicUrl": "https://scontent-....cdninstagram.com/...",
    "profileUrl": "https://www.instagram.com/nasa/",
    "latestPostsRequested": 12,
    "latestPostsCount": 12,
    "latestPostsPartialReason": null,
    "latestPosts": [
        {
            "postId": "4021644945136250077",
            "shortcode": "DfPwMUfl2zd",
            "url": "https://www.instagram.com/p/DfPwMUfl2zd/",
            "type": "Image",
            "productType": null,
            "caption": "Calm on the outside, chaotic on the inside. 😵‍💫 ...",
            "hashtags": ["nasa", "galaxy", "space"],
            "publishedAt": "2026-11-02T16:37:45.000Z",
            "likeCount": 129337,
            "commentCount": 443,
            "viewCount": null,
            "displayUrl": "https://scontent-....cdninstagram.com/...",
            "isPinned": false
        }
    ],
    "inputValue": "nasa",
    "partial": false,
    "partialReason": null,
    "collectedAt": "2026-11-03T01:23:38.965Z"
}
```

`userId` is Instagram's own account ID and stays the same when the username changes. `businessCategory` is the category Instagram shows under the name (`null` when Instagram sends no name); `categoryEnum` is Instagram's own category code, which many brand accounts carry even when no name is sent. `bioLinks` are the real link targets, not Instagram's redirect. In `latestPosts`, `type` is `Image`, `Video` or `Sidecar` (a carousel) and `productType: "clips"` is a Reel; `publishedAt` is Instagram's publish time, `collectedAt` is when this run read the profile. `likeCount` and `viewCount` are `null` when the account hides them, and `viewCount` is only filled for videos. No e-mail addresses or phone numbers are collected.

**input_status** (free) - one per input that returned no profile: `inputValue`, `partial`, `partialReason`, `duplicateOf` (the earlier input that already returned the same account) and a plain-English `statusText`.

**RUN_SUMMARY** (free) - the last row, and the same object in the key-value store: profiles collected, private accounts, duplicate and unusable inputs, inputs without a profile by reason, requests sent, and why the run stopped if it stopped early.

#### Reasons

| Field and value | Meaning |
| --- | --- |
| `partialReason: "not_found"` | Instagram has no public account by that name (deleted, renamed, restricted or never existed). |
| `partialReason: "restricted"` | Instagram withholds the account from logged-out visitors (an age or region restriction, for example on alcohol brands). |
| `partialReason: "invalid_input"` | The entry is not a username or profile URL (for example a post link). Nothing was requested. |
| `partialReason: "blocked"` | Instagram refused the requests, also on residential IPs. Not a missing account. |
| `partialReason: "upstream_error"` / `"unexpected_shape"` | A request failed, or the answer was not in a shape the Actor knows. Not a missing account. |
| `partialReason: "upstream_request_cap"` / `"not_collected"` | The run reached `maxUpstreamRequests`; profiles after it were not read. |
| `partialReason: "charge_limit_reached"` | The maximum charge you set for the run was reached. |
| `latestPostsPartialReason: "private_account"` | The profile is private: its profile row is returned, its posts are not public. |

### Limits, stated up front

- **Public content only, no login.** Followers and following lists, Stories, highlights' contents and anything behind a login are out of scope.
- **Up to 12 latest posts.** That is what Instagram lists with a public profile. For more posts per profile, or for comments, use a full Instagram posts scraper.
- **Speed.** Profiles are read four at a time; measured runs take about 4-5 seconds per profile overall (roughly 7 minutes per 100), because Instagram answers some requests slowly and those are retried on a new IP.
- **Counts are Instagram's.** Follower and post counts are the numbers Instagram returns at collection time.

### Pricing

Pay per result: **$1.49 per 1,000 profiles** ($0.00149 per profile row). The latest-posts summary is included. `input_status` rows, the run summary, duplicates and any profile that could not be read are free.

### How it works

Plain HTTP requests to the public profile endpoint Instagram's own app uses for logged-out visitors, through Apify Proxy (datacenter by default, residential only as a fallback). One request per profile returns the profile and its 12 newest posts. No browser, no login, no cookies.

# Actor input Schema

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

One profile per line. "nasa", "@nasa" and "https://www.instagram.com/nasa/" are all accepted; repeats are read once. Each one returns one profile row. A name Instagram has no account for, or an entry that is not a username, returns a free input_status row saying so.

## `maxPostsPerProfile` (type: `integer`):

How many of the profile's newest posts to summarise inside its row (caption, publish time, likes, comments, views, URL). They come with the profile at no extra request or charge. 0 leaves them out. Private accounts have none and say so in latestPostsPartialReason.

## `maxUpstreamRequests` (type: `integer`):

Hard ceiling on the HTTP requests this run sends. At the ceiling collection stops: what was read is kept, profiles not reached are written with partialReason "upstream_request_cap" or "not_collected" and the run ends normally. Leave it empty and the Actor works one out from your input (3 per profile), so a run is never unbounded.

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

The proxy requests go through. The default (Apify Proxy, datacenter) is what this Actor is measured on. A profile Instagram refuses is retried up to twice on Apify residential IPs before it is marked partial.

## Actor input object example

```json
{
  "usernames": [
    "nasa",
    "natgeo"
  ],
  "maxPostsPerProfile": 12,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

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

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

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

```

## MCP server setup

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

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/Ba3A9ymuxKH3urLDl/builds/rFyz0F60cmSs1VcnD/openapi.json
