# Instagram Username to ID Converter – Bulk Lookup (`scrapingmonkey/instagram-username-to-id`) Actor

Convert public Instagram usernames into numeric user IDs and profile identifiers. Submit a bulk list and export clean success or failed rows without login or cookies.

- **URL**: https://apify.com/scrapingmonkey/instagram-username-to-id.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## 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/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

Turn public Instagram usernames into stable numeric account IDs in seconds. **Instagram Username to ID Scraper** accepts a list of plain usernames, resolves each public account, and returns clean dataset rows ready for APIs, databases, enrichment pipelines, and exports.

No Instagram login, cookies, or manual browser work is required. Every accepted username produces an explicit `success` or `failed` result, so bulk jobs are easy to audit and retry.

| At a glance | Details |
|---|---|
| 📥 Input | One or more Instagram usernames, without `@` or profile URLs |
| 📤 Output | Numeric ID, PK, username, name, profile URL, picture, privacy, and verification status |
| 🔐 Login required | No |
| ⚡ Processing | Up to 5 usernames concurrently, with automatic retries |
| 💾 Delivery | Apify dataset with JSON, CSV, Excel, XML, and other export formats |

### What this Instagram username to ID converter returns 🔎

Instagram usernames can change, while the numeric user ID normally remains the account's stable identifier. This Actor resolves the current public profile behind each submitted username and returns the identifiers and profile fields most useful to applications.

You receive one dataset item per unique processed username. Successful rows contain the resolved account data. Failed rows preserve the original input and set unavailable result fields to `null`.

The Actor returns:

- Instagram numeric user ID and PK
- Current username and display name
- Canonical public profile URL
- Profile picture URL
- Private-account and verified-account flags
- A clear processing status for every saved row

### How to find an Instagram user ID 🚀

1. Open the Actor input page.
2. Add one or more plain usernames such as `openai` or `nike`.
3. Do not add `@`, spaces, or full Instagram profile links.
4. Click **Start**.
5. Open the dataset to download or integrate the results.

Example input:

```json
{
  "inputList": [
    "openai",
    "nike",
    "instagram"
  ]
}
```

Duplicate usernames are collapsed case-insensitively, preventing accidental duplicate lookups and duplicate output rows.

### Instagram user ID data fields 📦

| Field | Type | Meaning |
|---|---|---|
| `input` | string | Original username submitted to the Actor |
| `status` | string | `success` or `failed` |
| `type` | string or null | Result type, normally `profile` |
| `id` | string or null | Instagram numeric user ID |
| `pk` | string or null | Instagram primary key |
| `username` | string or null | Current account username |
| `name` | string or null | Public display name |
| `profile_url` | string or null | Canonical Instagram profile URL |
| `profile_picture_url` | string or null | Public profile image URL |
| `is_private` | boolean or null | Whether the account is private |
| `is_verified` | boolean or null | Whether Instagram marks the account as verified |

Complete successful dataset item:

```json
{
  "input": "nike",
  "status": "success",
  "type": "profile",
  "id": "13460080",
  "pk": "13460080",
  "username": "nike",
  "name": "Nike",
  "profile_url": "https://www.instagram.com/nike/",
  "profile_picture_url": "https://instagram.example/profile-picture.jpg",
  "is_private": false,
  "is_verified": true
}
```

Complete failed dataset item:

```json
{
  "input": "username_that_does_not_exist_12345",
  "status": "failed",
  "type": null,
  "id": null,
  "pk": null,
  "username": null,
  "name": null,
  "profile_url": null,
  "profile_picture_url": null,
  "is_private": null,
  "is_verified": null
}
```

Media URLs are supplied by Instagram and may expire or change. Download assets you need to retain long term.

### Input requirements and validation ⚙️

The input object has one required field:

| Parameter | Type | Required | Rules |
|---|---|---|---|
| `inputList` | array of strings | Yes | At least one plain Instagram username |

Accepted: `openai`

Rejected: `@openai`, `https://www.instagram.com/openai/`, empty strings, and invalid username formats.

An invalid item does not crash a mixed batch. It is stored as `failed`, while valid usernames continue processing. If the entire Actor input is missing or malformed, the run ends cleanly because there is no valid work to enqueue.

### Common use cases 🎯

#### CRM and database matching

Attach stable Instagram IDs to creator, customer, lead, or brand records instead of relying only on changeable usernames.

#### Social media data pipelines

Resolve usernames before calling downstream tools that require an Instagram user ID or PK.

#### Creator and competitor research

Convert a bulk list of account handles into structured IDs for enrichment, deduplication, and monitoring workflows.

#### Username-change tracking

Store the numeric ID as the durable key and compare the returned username over time.

### Pricing and billable results 💰

The exact charge depends on the pricing model displayed in the Actor's **Pricing** tab. This README does not invent a fixed price because Store pricing can change independently of the code.

Under dataset-item pricing, each saved dataset row is one billable result:

- A resolved username saves one `success` row.
- An invalid, unavailable, private, deleted, or unresolved username saves one `failed` row.
- Internal retry attempts do not create extra dataset rows.
- Case-insensitive duplicate usernames are normally processed once.

This behavior keeps costs predictable: submit 100 unique usernames and the completed dataset can contain up to 100 result rows.

### Use the Instagram ID lookup API 🔌

You can run the Actor from the Apify Console, REST API, schedules, webhooks, or an Apify client library. Replace `$ACTOR_ID` with the Actor ID shown in the API tab and `$APIFY_TOKEN` with your token.

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"inputList":["openai","nike"]}'
```

For synchronous integrations, use the Apify endpoint that runs an Actor and returns its dataset items. For larger jobs, start the run asynchronously and consume the dataset when the run finishes.

Useful integrations include Google Sheets, Make, Zapier, Slack, webhooks, cloud storage, and custom ETL pipelines.

### Reliability, retries, and failed usernames ⚠️

The Actor processes up to five inputs concurrently. Each network request can be attempted up to five times for temporary transport failures, throttling, selected HTTP errors, or Instagram login redirects. A fresh proxy is used for new requests.

Permanent input problems are not retried unnecessarily. Invalid username syntax fails immediately. A confirmed unavailable account becomes a `failed` row. Some profiles may use an HTML fallback when Instagram's primary profile endpoint is unavailable.

The run itself is designed to continue when a single username fails. A whole run can still fail for infrastructure-level problems such as an unavailable Apify dataset, an unrecoverable startup error, or failure while saving a result.

Instagram can change public endpoints or restrict access without notice. Public profiles may also become private, renamed, suspended, age-restricted, region-restricted, or deleted between runs.

### Frequently asked questions ❓

#### Can I submit full Instagram URLs?

No. This Actor intentionally accepts plain usernames only. Use `openai`, not `@openai` and not a profile link.

#### Does it work without an Instagram account?

Yes. The Actor does not ask you for Instagram credentials or cookies.

#### Can it convert multiple usernames in one run?

Yes. Put all usernames in `inputList`. They are processed concurrently and returned as independent dataset rows.

#### Why did I receive `failed`?

Typical causes include invalid syntax, a nonexistent or deleted account, restricted access, or repeated network blocking. The original username remains in `input` for diagnosis or later retry.

#### Is the numeric ID guaranteed never to change?

The numeric ID is substantially more stable than a username, but no scraper can guarantee Instagram's internal identifiers or platform behavior forever.

#### Can I export the results to CSV or Excel?

Yes. Open the run dataset and select the required export format.

### Support, responsible use, and related actors 🛟

If a reproducible public username fails, share the run ID, a safe sample input, and the approximate run time through the Actor's support channel. Do not publish private credentials or proxy URLs.

Use the Actor only for lawful purposes and public data. Follow applicable privacy, data-protection, intellectual-property, and platform rules. You are responsible for how collected data is stored and used.

# Actor input Schema

## `inputList` (type: `array`):

Add one Instagram username such as openai per item. Enter only the username without @ or a profile link. Each unique username produces one row with its numeric Instagram ID and available basic profile information. Invalid or unavailable usernames are saved with failed status.

## Actor input object example

```json
{
  "inputList": [
    "nike"
  ]
}
```

# Actor output Schema

## `profiles` (type: `string`):

One Dataset row for every processed unique profile. Successful rows contain the numeric Instagram user ID; failed rows retain the original input.

# 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 = {
    "inputList": [
        "nike"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/instagram-username-to-id").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 = { "inputList": ["nike"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/instagram-username-to-id").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 '{
  "inputList": [
    "nike"
  ]
}' |
apify call scrapingmonkey/instagram-username-to-id --silent --output-dataset

```

## MCP server setup

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

```

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/ZxdNfdPw1nigrLqr2/builds/CGOvRbtJcBM4atTiw/openapi.json
