---
title: "Instagram username to user id"
method: GET
path: "/v1/user-id"
tags: ["Profiles"]
---

# Instagram username to user id

`GET /v1/user-id`

## Request

- Base URL: `https://data.fastsocial.co`
- URL: `https://data.fastsocial.co/v1/user-id`
- Auth: API key in header `X-API-Key`

The numeric user id for a handle. Every endpoint also accepts either one directly, so you rarely need this.

Cost: **1 credit**.

## Query parameters

- `username` string
- `user_id` string

## Response `200`

OK

- object
  - `ok` unknown, required
  - `data` UserRef, required
    - `id` string
    - `username` string
  - `meta` Meta, required
    - `cache` 'hit' | 'miss' | 'stale'
    - `age_seconds` integer
    - `stale` boolean
    - `credits` integer
    - `credits_remaining` integer, nullable

## Other responses

- `400`: Error
- `401`: Error
- `404`: Error
- `422`: Error
- `429`: Error
- `451`: Error
- `502`: Error
- `503`: Error

---

[API](https://skmtc.dev/fastsocial/apis/fastsocial-instagram-data-api.md) · [All operations](https://skmtc.dev/fastsocial/apis/fastsocial-instagram-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fastsocial/apis/fastsocial-instagram-data-api/revisions/fe69c993e76a?raw)
