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

Scrape public Instagram profile data by username, including follower counts, bio, profile picture, business details, and recent posts.

- **URL**: https://apify.com/cscrape/instagram-profile-scraper.md
- **Developed by:** [CScrape](https://apify.com/cscrape) (community)
- **Categories:** Social media, Automation
- **Stats:** 33 total users, 8 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Instagram Profile Scraper

Extract public Instagram profile information by providing a list of usernames. The Actor returns structured profile data, follower statistics, bio details, profile pictures, business fields, and recent post metadata.

### What it can extract

- Username and Instagram profile ID
- Full name and biography
- Follower, following, and post counts
- Profile picture URL and HD profile picture URL
- Verification, privacy, business, and professional account flags
- External profile URL
- Business category and business address data when available
- Highlight reel count and channel availability
- Recent posts with captions, hashtags, likes, comments, media type, dimensions, owner data, location name, and post URL

### Input

Provide an array of Instagram usernames:

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

Usernames can be provided with or without the @ prefix.

### Output

The Actor stores results in the default dataset. Each dataset item represents one requested Instagram profile.

If a profile cannot be fetched, the Actor returns a dataset item with the requested username and an error message instead of stopping the whole run.

#### Example output

This is a real output item produced for the `instagram` profile. The `latestPosts` array is shortened to one post for readability.

```json
{
  "username": "instagram",
  "id": "25025320",
  "fbid": "17841400039600391",
  "fullName": "Instagram",
  "biography": "Discover what's new on Instagram 🔎✨",
  "biographyWithEntities": {
    "raw_text": "Discover what's new on Instagram 🔎✨",
    "entities": []
  },
  "externalUrl": "http://help.instagram.com/",
  "profilePicUrlHd": "https://instagram.fbkk14-1.fna.fbcdn.net/v/t51.82787-19/550891366_18667771684001321_1383210656577177067_n.jpg?stp=dst-jpg_s320x320_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMxIn0&_nc_ht=instagram.fbkk14-1.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2gEY5B75F4geFAyGxDBwJJh2jE-6_XHITKmG_k02dsbOm17HhTj6HqAzDF-RlJKffF8&_nc_ohc=zQKhYsAesT4Q7kNvwF05OyZ&_nc_gid=NyKSbiH6GMRhPlNUtUF8fg&edm=AOQ1c0wBAAAA&ccb=7-5&oh=00_Af3yBy7Bv6E2Ul32Rh6YuqmTiBjPrgVcr59gcWjam-FFeA&oe=69F66267&_nc_sid=8b3546",
  "businessCategoryName": null,
  "businessAddressJson": null,
  "hasChannel": false,
  "highlightReelCount": 15,
  "isJoinedRecently": false,
  "followersCount": 700838408,
  "followsCount": 251,
  "postsCount": 8417,
  "isPrivate": false,
  "isVerified": true,
  "isBusinessAccount": false,
  "isProfessionalAccount": true,
  "profilePicUrl": "https://instagram.fbkk14-1.fna.fbcdn.net/v/t51.82787-19/550891366_18667771684001321_1383210656577177067_n.jpg?stp=dst-jpg_s150x150_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMxIn0&_nc_ht=instagram.fbkk14-1.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2gEY5B75F4geFAyGxDBwJJh2jE-6_XHITKmG_k02dsbOm17HhTj6HqAzDF-RlJKffF8&_nc_ohc=zQKhYsAesT4Q7kNvwF05OyZ&_nc_gid=NyKSbiH6GMRhPlNUtUF8fg&edm=AOQ1c0wBAAAA&ccb=7-5&oh=00_Af1uPJ-yXT9IWxqHq-ky7UETwtpfuO74EQgqVBXVzqcdpg&oe=69F66267&_nc_sid=8b3546",
  "latestPosts": [
    {
      "id": "3884653766514873681",
      "shortCode": "DXpEATUgJVR",
      "caption": "shredding in Peruvian sand ⛷️⁣\n⁣\n#InTheMoment⁣\n ⁣\nVideo by @mahuuuuuski ⁣\nMusic by @djsnake",
      "hashtags": [
        "InTheMoment"
      ],
      "likesCount": 549959,
      "commentsCount": 5454,
      "takenAtTimestamp": 1777306869,
      "isVideo": true,
      "mediaType": "GraphVideo",
      "productType": "clips",
      "dimensionsHeight": 1136,
      "dimensionsWidth": 640,
      "ownerUsername": "instagram",
      "ownerId": "25025320",
      "locationName": null,
      "displayUrl": "https://instagram.fbkk14-1.fna.fbcdn.net/v/t51.82787-15/673880953_18749023180001321_5372971300361207612_n.jpg?stp=dst-jpg_e15_tt6&_nc_ht=instagram.fbkk14-1.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2gEY5B75F4geFAyGxDBwJJh2jE-6_XHITKmG_k02dsbOm17HhTj6HqAzDF-RlJKffF8&_nc_ohc=I5ti_-CtC08Q7kNvwG_BFdE&_nc_gid=NyKSbiH6GMRhPlNUtUF8fg&edm=AOQ1c0wBAAAA&ccb=7-5&oh=00_Af37WlZ4OrBjaB2th17DO3znIOVZfMk8LJ6nqyR8yjE29w&oe=69F670D8&_nc_sid=8b3546",
      "thumbnailSrc": "https://instagram.fbkk14-1.fna.fbcdn.net/v/t51.82787-15/673880953_18749023180001321_5372971300361207612_n.jpg?stp=c0.248.640.640a_dst-jpg_e15_tt6&_nc_ht=instagram.fbkk14-1.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2gEY5B75F4geFAyGxDBwJJh2jE-6_XHITKmG_k02dsbOm17HhTj6HqAzDF-RlJKffF8&_nc_ohc=I5ti_-CtC08Q7kNvwG_BFdE&_nc_gid=NyKSbiH6GMRhPlNUtUF8fg&edm=AOQ1c0wBAAAA&ccb=7-5&oh=00_Af1QrjB7677RfVac5qU2n_IQc6zPyKJFYXRmZTKY0lJ2Dw&oe=69F670D8&_nc_sid=8b3546",
      "postUrl": "https://www.instagram.com/p/DXpEATUgJVR/"
    }
  ]
}
```

#### Profile fields

| Field | Description |
| --- | --- |
| `username` | Instagram username that was requested or returned by Instagram. |
| `id` | Instagram internal numeric user ID. |
| `fbid` | Facebook-linked identifier returned by Instagram when available. |
| `fullName` | Public display name of the profile. |
| `biography` | Profile bio text. |
| `biographyWithEntities` | Structured biography payload with raw text and detected entities. |
| `externalUrl` | External link from the profile bio. |
| `profilePicUrl` | Standard profile picture URL. |
| `profilePicUrlHd` | High-resolution profile picture URL. |
| `followersCount` | Number of followers. |
| `followsCount` | Number of accounts followed by the profile. |
| `postsCount` | Number of timeline posts. |
| `isPrivate` | Whether the profile is private. |
| `isVerified` | Whether the profile is verified. |
| `isBusinessAccount` | Whether the profile is a business account. |
| `isProfessionalAccount` | Whether the profile is a professional account. |
| `businessCategoryName` | Business category name when available. |
| `businessAddressJson` | Structured business address data returned by Instagram. |
| `hasChannel` | Whether the profile has a broadcast channel. |
| `highlightReelCount` | Number of story highlights on the profile. |
| `isJoinedRecently` | Whether Instagram flags the account as recently joined. |
| `latestPosts` | Array of recent posts returned from the public profile endpoint. |
| `error` | Short error message if the profile could not be fetched. |
| `errorMessage` | Detailed error information for debugging. |

#### Post fields

Each item in `latestPosts` can contain the following fields:

| Field | Description |
| --- | --- |
| `id` | Instagram post ID. |
| `shortCode` | Instagram shortcode used in the post URL. |
| `caption` | Post caption text. |
| `hashtags` | Hashtags parsed from the caption. |
| `likesCount` | Number of likes returned by Instagram. |
| `commentsCount` | Number of comments returned by Instagram. |
| `takenAtTimestamp` | Unix timestamp when the post was created. |
| `isVideo` | Whether the post is a video. |
| `mediaType` | Instagram media typename, for example `GraphImage`, `GraphVideo`, or `GraphSidecar`. |
| `productType` | Instagram product type when available. |
| `dimensionsHeight` | Media height in pixels. |
| `dimensionsWidth` | Media width in pixels. |
| `ownerUsername` | Username of the post owner. |
| `ownerId` | Instagram user ID of the post owner. |
| `locationName` | Location name attached to the post when available. |
| `displayUrl` | Main media display URL. |
| `thumbnailSrc` | Thumbnail image URL. |
| `postUrl` | Public Instagram post URL. |

### Notes

This Actor works with publicly available Instagram profile data. Some fields may be missing depending on the profile type, privacy settings, Instagram availability, or temporary access limits.

# Actor input Schema

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

Instagram usernames to scrape. You can provide them with or without the @ prefix.

## Actor input object example

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

# Actor output Schema

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

Dataset items produced by the Actor.

# 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": [
        "instagram",
        "natgeo"
    ]
};

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

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

```

## MCP server setup

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