Instagram Account Validation avatar

Instagram Account Validation

Pricing

Pay per usage

Go to Apify Store
Instagram Account Validation

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

Dwi Wahyu

Maintained by Community

Actor 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

FieldTypeRequiredDefaultDescription
usernamesstring[]Yes["nasa", "alex123", "nonexistent_user_xyz_987654"]Plain Instagram usernames to validate (e.g. "nasa" or "@nasa"). URLs are not accepted.
proxyConfigurationobjectNo{ "useApifyProxy": true }Apify Proxy configuration. Use "RESIDENTIAL" proxy group if plain/datacenter requests are blocked.
maxConcurrencyintegerNo4Maximum concurrent checks (between 1 and 5).
sessionCookiestring (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)

StatusexistsMeaning
"active"trueThe account exists and is a public profile (isPrivate: false).
"private"trueThe account exists and has the private flag enabled (isPrivate: true).
"not_found"falseInstagram indicates the account does not exist (httpErrorPage / PolarisErrorRoot / 404).
"suspended"trueInstagram indicates the account has been suspended, disabled, or restricted.
"unknown"nullThe account could not be classified due to an invalid input format, login wall, or retry-exhausted network error (details in error).

Note on null fields: This Actor never guesses values. If a field cannot be read publicly without authentication (such as isBusinessAccount on unauthenticated public HTML), it returns null.


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 build
npm install
npm run build
# Run locally with Apify CLI
apify run
# Authenticate and deploy to Apify Cloud
apify login
apify push