Instagram Account Validation
Pricing
Pay per usage
Instagram Account Validation
Validates Instagram usernames and returns account existence, status (active, private, not_found, suspended, unknown), and profile metrics.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Dwi Wahyu
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Instagram Account Validation Actor
An Apify Actor built in TypeScript that validates Instagram usernames in batches, determines whether each account exists, and returns its public profile status and metadata.
Features
- Batch Username Validation: Accepts one or more plain Instagram usernames (
"nasa"or"@nasa"), normalizes (strips leading@, trims whitespace, lowercases), and deduplicates them. - Strict Input Validation: Rejects URLs, usernames with spaces, usernames over 30 characters, or disallowed characters with an error record in the output dataset without crashing the run.
- Embedded Profile JSON Extraction: Extracts profile data directly from Instagram's embedded SSR JSON (
xig_user_by_igid_v2) and profile embed JSON (contextJSON), falling back to a headless Puppeteer browser only if embedded JSON is unavailable. - Conservative Concurrency & Backoff: Processes usernames with modest concurrency (3–5) and retries failed requests up to 3 times with exponential backoff. Retry-exhausted requests are marked
"unknown"with an error message rather than"not_found".
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
usernames | string[] | Yes | ["nasa", "alex123", "nonexistent_user_xyz_987654"] | Plain Instagram usernames to validate (e.g. "nasa" or "@nasa"). URLs are not accepted. |
proxyConfiguration | object | No | { "useApifyProxy": true } | Apify Proxy configuration. Use "RESIDENTIAL" proxy group if plain/datacenter requests are blocked. |
maxConcurrency | integer | No | 4 | Maximum concurrent checks (between 1 and 5). |
sessionCookie | string (secret) | No | — | Optional Instagram sessionid cookie to unlock authenticated isBusinessAccount detection if needed. Never logged or stored. |
Example Input
{"usernames": ["nasa","@alex123","nonexistent_user_xyz_987654","invalid username with spaces"],"proxyConfiguration": {"useApifyProxy": true},"maxConcurrency": 4}
Output
Every unique normalized input username produces exactly one item in the default dataset. Results are configured via .actor/dataset_schema.json to render as a table in Apify Console.
Output Fields
{"username": "nasa","exists": true,"accountStatus": "active","isPrivate": false,"isVerified": true,"isBusinessAccount": null,"fullName": "NASA","followersCount": 104384844,"followingCount": 90,"postsCount": 4967,"profileUrl": "https://www.instagram.com/nasa/","checkedAt": "2026-10-19T05:38:00.000Z","error": null}
Account Status Meanings (accountStatus)
| Status | exists | Meaning |
|---|---|---|
"active" | true | The account exists and is a public profile (isPrivate: false). |
"private" | true | The account exists and has the private flag enabled (isPrivate: true). |
"not_found" | false | Instagram indicates the account does not exist (httpErrorPage / PolarisErrorRoot / 404). |
"suspended" | true | Instagram indicates the account has been suspended, disabled, or restricted. |
"unknown" | null | The account could not be classified due to an invalid input format, login wall, or retry-exhausted network error (details in error). |
Note on
nullfields: This Actor never guesses values. If a field cannot be read publicly without authentication (such asisBusinessAccounton unauthenticated public HTML), it returnsnull.
Example Output Dataset
[{"username": "nasa","exists": true,"accountStatus": "active","isPrivate": false,"isVerified": true,"isBusinessAccount": null,"fullName": "NASA","followersCount": 104384844,"followingCount": 90,"postsCount": 4967,"profileUrl": "https://www.instagram.com/nasa/","checkedAt": "2026-10-19T05:38:00.000Z","error": null},{"username": "alex123","exists": true,"accountStatus": "private","isPrivate": true,"isVerified": false,"isBusinessAccount": null,"fullName": "Alex Pohl","followersCount": 5448,"followingCount": 450,"postsCount": 292,"profileUrl": "https://www.instagram.com/alex123/","checkedAt": "2026-10-19T05:38:01.000Z","error": null},{"username": "nonexistent_user_xyz_987654","exists": false,"accountStatus": "not_found","isPrivate": null,"isVerified": null,"isBusinessAccount": null,"fullName": null,"followersCount": null,"followingCount": null,"postsCount": null,"profileUrl": "https://www.instagram.com/nonexistent_user_xyz_987654/","checkedAt": "2026-10-19T05:38:01.500Z","error": null},{"username": "invalid username with spaces","exists": null,"accountStatus": "unknown","isPrivate": null,"isVerified": null,"isBusinessAccount": null,"fullName": null,"followersCount": null,"followingCount": null,"postsCount": null,"profileUrl": "https://www.instagram.com/invalid%20username%20with%20spaces/","checkedAt": "2026-10-19T05:38:00.000Z","error": "Invalid username: spaces are not allowed in Instagram usernames."}]
Local Development & Deployment
# Install dependencies and buildnpm installnpm run build# Run locally with Apify CLIapify run# Authenticate and deploy to Apify Cloudapify loginapify push