Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

Instagram User ID Lookup

Docs da API
https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username

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

Preço
$0.008USD / chamada
Método
POST
Resposta
JSON
Parâmetros
1 obrigatórios · 0 opcionais
100 chamadas grátis / diaAs primeiras 100 chamadas por dia são grátis (compartilhadas por organização) · Reinicia às 00:00 UTC. Depois, pagamento por chamada.

Playground

Entrada
Instagram username
SaídaExemplo
Respostaoutputs · 61 B · 7 linhas
[
  {
    "data": {
      "user_id": "1821100851"
    }
  }
]

Exemplos

Selecione um exemplo para carregar as entradas e o resultado no playground.

README da API

Instagram User ID Lookup API

Look up the numeric user ID (pk) of an Instagram account from its username. The ID stays the same when the account changes its username, so it is the safer key to store.

Use cases

  • Store a stable key for each account you track, so your records survive a rename.
  • Get the ID that Similar users and User brief require.
  • Match accounts across datasets that store IDs, such as exports or third-party tools.

Username or user ID: which to use

UsernameUser ID
Examplenasa528817151
Changes when the account renamesYesNo
Where you find itProfile URL, bio, mentionsNot shown on the profile; returned by APIs
Accepted byUser profile, User posts, User reels, followers and followingSimilar users, User brief

Use the username for one-off requests, since most Instagram APIs here accept it directly. Save the user ID next to it when you track accounts over time. If a request by username starts failing, look the stored ID up with Instagram ID to Username to find the new name. The Instagram ID lookup guide covers both directions.

Request

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"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
usernamestringYesInstagram username

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "user_id": "528817151"
}

Response fields

FieldMeaning
user_idNumeric user ID as a string.

Notes

  • Pass the username without @. Usernames that do not exist fail and are not charged.
  • To go the other way, use Instagram ID to Username.

Pricing

$0.008 per successful call. Failed calls, including lookups whose target does not exist, are not charged. It is included in the daily free quota of each organization.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
Instagram$0.008 por chamadaJSON
Instagram$0.008 por chamadaJSON
Instagram$0.008 por chamadaJSON
Instagram$0.008 por chamadaJSON
Instagram$0.002 por chamadaJSON
Instagram$0.008 por chamadaJSON

Guias:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

Perguntas

FAQ

Como eu uso a API Instagram User ID Lookup?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API Instagram User ID Lookup?

$0.008 por chamada. Cada organização recebe 100 chamadas grátis por dia UTC, compartilhadas entre as APIs elegíveis da SandBase, incluindo esta; depois disso, cada chamada é cobrada nesse valor do seu saldo SandBase. Não há assinatura.

Quais parâmetros a API Instagram User ID Lookup aceita?

Obrigatórios: username (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API Instagram User ID Lookup retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor Instagram ou de uma chave de API?

Não. Instagram User ID Lookup funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Instagram separadamente.