# Instagram User ID Lookup API

> Convert an Instagram username into its numeric user ID, the internal identifier needed by most Instagram profile, posts and followers APIs.

Source: https://www.sandbase.ai/model/instagram/v3/user-id-by-username
API reference: https://www.sandbase.ai/model/instagram/v3/user-id-by-username/docs

## Facts

- Provider: Instagram
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, instagram
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `username` | string | yes |  |

## FAQ

### How do I use the Instagram User ID Lookup API?

Send a POST request to https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Instagram User ID Lookup API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Instagram User ID Lookup API accept?

Required: username (string). The Parameters table and the Playground on this page list every field.

### What does the Instagram User ID Lookup API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Instagram developer account or API key?

No. Instagram User ID Lookup runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Instagram API access separately.

## README

### Instagram User ID Lookup API

Pass an Instagram username and get the account's numeric user ID. Use it with the other Instagram APIs that require `user_id`.

#### Use cases

- Resolve handles collected from links or bios into stable IDs.
- Track accounts even after they change username.
- First step before fetching posts, reels or followers.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "nasa"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `username` | string | Yes | Instagram username |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "user_id": "528817151"
}
```

#### Related APIs

- [Bulk translate comments](/model/instagram/v3/bulk-translate-comments): Bulk translate Instagram comments Support translating multiple comments at once for better efficiency Comment IDs can be obtained from get_post_comments API.
- [Get comment replies](/model/instagram/v3/comment-replies): Get Instagram comment's child comments (replies) list Support pagination to fetch all replies Parent comment's comment_id can be obtained from get_post_comment…
- [Get explore feed](/model/instagram/v3/explore): V3 Explore provides a focused capability for applications, automation, and data workflows.
