Sand AISand AI MAGI-2MAGI-2 ist jetzt auf SandBase: 1080p-Video mit nativem AudioJetzt testen

Instagram User ID Lookup

API-Dokumentation
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.

Preis
$0.008USD / Aufruf
Methode
POST
Antwort
JSON
Parameter
1 erforderlich · 0 optional
100 kostenlose Aufrufe / TagDie ersten 100 Aufrufe pro Tag kostenlos (organisationsweit geteilt) · Zurücksetzung um 00:00 UTC. Danach Abrechnung pro Aufruf.

Playground

Eingabe
Instagram username
AusgabeBeispiel
Antwortoutputs · 61 B · 7 Zeilen
[
  {
    "data": {
      "user_id": "1821100851"
    }
  }
]

Beispiele

Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.

API-README

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.

Mehr entdecken

Verwandte APIs

Alle APIs
APIPreisAntwort
Instagram$0.008 pro AufrufJSON
Instagram$0.008 pro AufrufJSON
Instagram$0.008 pro AufrufJSON
Instagram$0.008 pro AufrufJSON
Instagram$0.002 pro AufrufJSON
Instagram$0.008 pro AufrufJSON

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

Fragen

FAQ

Wie verwende ich die Instagram User ID Lookup API?

Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.

Was kostet die Instagram User ID Lookup API?

$0.008 pro Aufruf. Jede Organisation erhält 100 kostenlose Aufrufe pro UTC-Tag, gemeinsam über alle berechtigten SandBase APIs einschließlich dieser hier; danach wird jeder Aufruf zu diesem Preis von Ihrem SandBase-Guthaben abgerechnet. Es gibt kein Abo.

Welche Parameter akzeptiert die Instagram User ID Lookup API?

Erforderlich: username (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.

Was gibt die Instagram User ID Lookup API zurück?

Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.

Benötige ich ein Instagram-Entwicklerkonto oder einen API-Schlüssel?

Nein. Instagram User ID Lookup läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für Instagram API beantragen.