# Instagram Bot Detector (`louisdeconinck/instagram-bot-detector`) Actor

Instantly analyze Instagram profiles to detect fake followers, bot accounts, and artificial influencers. Get a precision 0-1 Bot Score based on engagement, ratios, and behavioral signals.

- **URL**: https://apify.com/louisdeconinck/instagram-bot-detector.md
- **Developed by:** [Louis Deconinck](https://apify.com/louisdeconinck) (community)
- **Categories:** Social media, AI, Other
- **Stats:** 1,441 total users, 40 monthly users, 99.5% runs succeeded, 6 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 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/platform/actors/running/actors-in-store#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 Bot Detector is an Apify Actor that analyzes Instagram profiles to detect bot accounts using multiple signals like follower ratios, username patterns, engagement metrics, and profile completeness.

### 🎯 Why detect Instagram bots?

Use cases:

- **Influencer Verification** - Verify that influencer accounts have real, engaged followers before partnerships
- **Community Moderation** - Identify and filter out bot accounts from your Instagram followers
- **Competitor Analysis** - Check if competitors are using bots to inflate their follower counts
- **Account Auditing** - Audit your own followers to understand the quality of your audience
- **Research** - Study bot patterns and behavior on social media platforms

### ✨ What can Instagram Bot Detector do?

This Actor allows you to:

- **Analyze multiple profiles** - Process multiple Instagram usernames or URLs in a single run
- **Calculate bot scores** - Get a 0-1 score indicating how likely an account is to be a bot
- **Detect fake influencers** - Identify accounts with bought followers through engagement analysis
- **Analyze posting patterns** - Detect automated posting through timing analysis
- **Handle private accounts** - Gracefully handle private accounts with adjusted scoring

### 🚀 How to detect Instagram bots?

1. Make a free Apify account here: [https://console.apify.com/sign-up](https://console.apify.com/sign-up?fpr=7p4wu)
2. Click on "Try for free"
3. Enter Instagram usernames (e.g., `instagram`, `therock`) or profile URLs (e.g., `https://instagram.com/therock`)
4. Click "Start" and wait for the Actor to complete
5. Download your data in JSON, CSV or Excel format

### 💡 What data will you receive?

Instagram Bot Detector extracts detailed information about each profile:

| Field | Description |
|-------|-------------|
| **userId** | Instagram user ID |
| **username** | Instagram username |
| **fullName** | Display name |
| **biography** | Profile bio text |
| **followers** | Number of followers |
| **following** | Number of accounts following |
| **posts** | Number of posts |
| **isVerified** | Whether the account is verified |
| **isPrivate** | Whether the account is private |
| **botScore** | Bot likelihood score (0-1, higher = more likely bot) |
| **humanScore** | Human likelihood score (0-1, higher = more likely human) |
| **confidence** | Confidence in the bot detection (0-1) |
| **isLikelyBot** | Boolean indicating if botScore > 0.5 |

### 🧮 How the scoring algorithm works

The bot detection algorithm analyzes multiple signals from an Instagram profile and combines them into a single **botScore** (0-1). Higher scores indicate a higher likelihood the account is a bot.

#### Scoring methodology

1. **Individual signal scores** - Each profile characteristic is evaluated and scored from 0 (not suspicious) to 1 (highly suspicious)
2. **Weighted combination** - Scores are combined using weighted averages, with stronger bot indicators having higher weights
3. **Fatal flags** - Certain conditions (like verified accounts) immediately classify an account as human
4. **Private account handling** - Content-based scores are set to `null` for private accounts since the data isn't accessible

#### Signal weights

| Signal | Weight | Description |
|--------|--------|-------------|
| **ratioScore** | 2.0 | Follower/following ratio is the strongest indicator |
| **fakeInfluencerScore** | 1.5 | Bought followers detection |
| **postsScore** | 1.5 | No posts is very suspicious |
| **profilePicScore** | 1.5 | Default avatar is a strong signal |
| **spamScore** | 1.3 | Spammy bio/URL content |
| **biographyScore** | 1.2 | Empty biography |
| **usernameScore** | 1.0 | Random/suspicious username patterns |
| **engagementScore** | 1.0 | Low engagement relative to followers |
| **postTimingScore** | 1.0 | Burst posting patterns |
| **followersScore** | 0.7 | Low follower counts |
| **followingScore** | 0.7 | High following counts |
| **fullNameScore** | 0.6 | Random/gibberish display names |
| **highlightsScore** | 0.5 | No story highlights |
| **accountAgeScore** | 0.5 | Recently joined accounts |
| **accountTypeScore** | 0.3 | Personal vs business accounts |
| **verifiedScore** | 0 (fatal) | Verified = definitely human |

***

### 📊 Output field reference

#### Profile information

| Field | Type | Description |
|-------|------|-------------|
| `userId` | string | Instagram's internal user ID |
| `username` | string | The account's handle (without @) |
| `fullName` | string | Display name shown on profile |
| `profilePicUrl` | string | URL to the profile picture |
| `biography` | string | Bio text (may be empty) |
| `externalUrl` | string | null | Website link in profile |
| `followers` | number | Total follower count |
| `following` | number | Number of accounts being followed |
| `posts` | number | Total number of posts |
| `isVerified` | boolean | Blue checkmark verification status |
| `isBusinessAccount` | boolean | Business account type |
| `isProfessionalAccount` | boolean | Creator/professional account type |
| `isPrivate` | boolean | Whether the account is private |
| `highlightReelCount` | number | Number of story highlights |
| `hasClips` | boolean | Whether account has Reels |
| `defaultProfilePic` | boolean | `true` if using Instagram's default avatar |

#### Computed metrics

| Field | Type | Description |
|-------|------|-------------|
| `followerFollowingRatio` | number | `followers / following` - Influencers typically have high ratios, mass-follow bots have very low ratios |
| `usernameEntropy` | number | Shannon entropy of username (0-1) - Higher values indicate more random/generated usernames |
| `averageEngagementRate` | number | null | `(avg likes + comments) / followers * 100` - Percentage engagement per post. `null` if no posts |
| `postTimingVariance` | number | null | Variance in hours between posts - Low variance with short gaps suggests automation |

#### Individual scores (0-1, higher = more suspicious)

| Field | Description | How it's calculated |
|-------|-------------|---------------------|
| `profilePicScore` | Default profile picture | `1` if using default Instagram avatar, `0` otherwise |
| `biographyScore` | Empty biography | `1` if bio is empty/whitespace, `0` otherwise |
| `postsScore` | No posts | `max(0, 1 - posts × 0.1)` - Reduced by 70% for recently joined accounts. `null` for private accounts |
| `highlightsScore` | No story highlights | `1` if no highlights, `0` otherwise. `null` for private accounts |
| `followersScore` | Low follower count | `max(0, 1 - log₁₀(followers + 1) / 3)` - Logarithmic scale where 1000+ followers → 0 |
| `followingScore` | High following count | `min(1, log₁₀(following + 1) / 3)` - Logarithmic scale where 1000+ following → 1 |
| `ratioScore` | Suspicious follower/following ratio | Mass-follow bots have ratio < 0.1 → score 1.0. Private accounts get 70% reduction |
| `usernameScore` | Suspicious username | Combines digit ratio, long number sequences, consecutive special characters (`__`, `..`), leading/trailing digits |
| `accountAgeScore` | Recently joined | `1` if `is_joined_recently` flag is true, `0` otherwise |
| `accountTypeScore` | Personal account | `0` for business/professional accounts, `0.3` for personal accounts |
| `verifiedScore` | Not verified | `0` if verified (triggers "definitely human"), `1` otherwise |
| `postTimingScore` | Burst posting pattern | Based on gaps between posts - Many posts within 30 minutes indicates automation. `null` if < 2 posts |
| `engagementScore` | Low engagement | `1 - log₁₀(engagement_rate × 10 + 1) / 3` with bonuses for high absolute engagement. `null` if no posts |
| `spamScore` | Spammy content | Detects spam keywords (crypto, dm for, follow4follow) and high-risk URLs (Telegram, URL shorteners) |
| `fullNameScore` | Random/gibberish name | High entropy + no normal structure = suspicious. International names (CJK, Cyrillic, etc.) get benefit of the doubt |
| `fakeInfluencerScore` | Bought followers | High follower ratio + ultra-low engagement (< 0.1%) → likely bought followers |

#### Final bot detection

| Field | Type | Description |
|-------|------|-------------|
| `botScore` | number | Final weighted bot likelihood score (0-1). Higher = more likely a bot |
| `humanScore` | number | `1 - botScore`. Convenience field for human likelihood |
| `confidence` | number | Confidence in the detection (0-1). Based on: (1) how many signals were available, (2) how extreme the score is |
| `isLikelyBot` | boolean | `true` if `botScore > 0.5` |

***

#### Output example

```json
{
	"userId": "77183297419",
	"username": "minajjjray",
	"fullName": "minajjjray",
	"profilePicUrl": "https://instagram.fbkk12-2.fna.fbcdn.net/v/t51.2885-19/573323465_1219825463302212_7278921664109726296_n.png?stp=dst-jpg_e0_s150x150_tt6&cb=8438d1d6-849f285f&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xNTAuYzIifQ&_nc_ht=instagram.fbkk12-2.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2QEZpDwos_dxCnk-1sN_wEAAfF2BLdpd1rVj8A32fUX-lyV9qKE9jfh1hy_G9_6qzYE74I3fFVvDvTi-zW2J-6TR&_nc_ohc=k4JGjKyu-qYQ7kNvwEHdC5N&_nc_gid=vjf5WU0qwnJiIGlrWluAkg&edm=AJ1X7eQBAAAA&ccb=7-5&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.3-ccb7-5-cb8438d1d6-849f285f&oh=00_AfkLbbGdNCxxeSmBSf5GUlrzxqKgKlbhRRnVWkKVHs5AgA&oe=694380AA&_nc_sid=1cea78",
	"biography": "",
	"externalUrl": null,
	"followers": 8,
	"following": 29,
	"posts": 0,
	"isVerified": false,
	"isBusinessAccount": true,
	"isProfessionalAccount": true,
	"isPrivate": false,
	"highlightReelCount": 0,
	"hasClips": false,
	"defaultProfilePic": true,
	"followerFollowingRatio": 0.27586206896551724,
	"usernameEntropy": 0.7966576244513051,
	"averageEngagementRate": null,
	"postTimingVariance": null,
	"profilePicScore": 1,
	"biographyScore": 1,
	"postsScore": 1,
	"highlightsScore": 1,
	"followersScore": 0.6819191635202251,
	"followingScore": 0.4923737515732208,
	"ratioScore": 0.8,
	"usernameScore": 0,
	"accountAgeScore": 0,
	"accountTypeScore": 0,
	"verifiedScore": 1,
	"postTimingScore": null,
	"engagementScore": null,
	"spamScore": 0,
	"fullNameScore": 0.3,
	"fakeInfluencerScore": 0,
	"botScore": 0.5490229353808581,
	"humanScore": 0.4509770646191419,
	"confidence": 0.5592183483046865,
	"isLikelyBot": true
}
```

### 📥 Input

The Actor accepts these input parameters:

- `usernames` (array, required): List of Instagram usernames (e.g., `instagram`, `@therock`) or profile URLs (e.g., `https://instagram.com/therock`) to analyze for bot detection.

#### Input example

```json
{
  "usernames": [
    "instagram",
    "therock",
    "https://instagram.com/cristiano"
  ]
}
```

### 💰 How much does it cost to detect Instagram bots?

This actor is extremely cost-effective. Check the "Pricing" tab for more details.

With Apify's **free tier**, you get $5 of platform credits monthly for free, which you can use to test this actor for free.

Do you need to analyze more profiles? [Upgrade to a paid plan](https://apify.com/pricing?fpr=7p4wu) which includes more platform credits and discounted pricing.

**Tips**:

- Provide multiple usernames in your input, that way you only pay the actor start cost once.
- If you are doing a large run, consider increasing the RAM used per run to analyze faster. When doing a small run decrease the RAM used to reduce the actor start costs.
- Upgrade to a higher plan to get discounted pricing. Link: [https://apify.com/pricing](https://apify.com/pricing?fpr=7p4wu)

### 🔗 Integrate with your workflows

This Actor integrates seamlessly with:

- **Automation platforms** - Build no code workflows with [Make.com](https://www.make.com/en/register?pc=louisdeconinck), n8n, and Zapier
- **Webhooks** - Trigger actions when analysis completes through [webhooks](https://docs.apify.com/platform/integrations/webhooks?fpr=7p4wu)
- **Schedulers** - Run regularly to monitor follower quality with Apify's [Scheduler](https://docs.apify.com/schedules?fpr=7p4wu)
- **API** - Start runs and access data programmatically with the [Apify API](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor?fpr=7p4wu)
- **Google Sheets** - Export directly to spreadsheets

### 👥 Who made this Actor?

Gordian is a specialised Apify web scraping agency founded by Louis Deconinck.

Louis is a top 1% Apify developer, Oxford University IT graduate, and creator of 70+ scrapers used by 1,000+ data professionals every month. He has scraped 10,000,000+ pages bypassing the most advanced anti-scraping protections.

- Apify AI Agent Hackathon Winner
- 300+ contributions in Apify Discord
- Former senior data engineer in EU banking

Looking for a custom data solution? Get in touch.

### 🤖 More excellent Apify Actors by us

- [Instagram Profile Scraper](https://apify.com/louisdeconinck/instagram-profile-scraper?fpr=7p4wu) - Scrape Instagram profile data
- [Instagram Story Scraper](https://apify.com/louisdeconinck/instagram-story-scraper?fpr=7p4wu) - Download Instagram stories with captions
- [Skool Scraper](https://apify.com/louisdeconinck/skool-scraper?fpr=7p4wu) - Scrape Skool community data

### ❓ FAQ

#### Is it legal to scrape Instagram?

Yes, web scraping publicly available data is legal. This scraper only extracts information that is publicly visible.

For more information on web scraping legality, read this blog post: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal?fpr=7p4wu)

#### How accurate is the bot detection?

The bot detection uses multiple signals and provides a confidence score. Accounts with higher confidence scores and extreme bot scores (close to 0 or 1) are more reliable. Verified accounts are automatically marked as human.

#### Can I export data to CSV or Excel?

Yes, Apify supports exporting dataset results in multiple formats: JSON, CSV, Excel (XLSX), HTML, XML and RSS.

#### What happens if Instagram changes their API?

We monitor the API structure and update the Actor when changes occur. If you encounter issues, please report them in the Issues tab.

#### How does the scoring work?

The Actor calculates individual scores (0-1) for various signals like profile picture, username patterns, follower ratios, and engagement. These are combined using weighted averages to produce a final bot score. Private accounts receive special handling since some data isn't accessible.

#### How do I get started?

[Make a free Apify account](https://console.apify.com/sign-up?fpr=7p4wu) to claim your free $5 usage and start detecting bots today by clicking "Try for free".

# Actor input Schema

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

List of Instagram usernames (e.g., 'therock', '@instagram') or profile URLs (e.g., 'https://instagram.com/therock') to analyze for bot detection.

## Actor input object example

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

# Actor output Schema

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

No description

## `scores` (type: `string`):

No description

## `metrics` (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": [
        "instagram",
        "therock"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("louisdeconinck/instagram-bot-detector").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "therock"
  ]
}' |
apify call louisdeconinck/instagram-bot-detector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=louisdeconinck/instagram-bot-detector",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3R9pWxyCy9C2hRJfY/builds/3pD0Wuw5fE8QFjr8Y/openapi.json
