Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Instagram User ID Lookup

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.

料金
$0.008USD / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 1 件 · 任意 0 件
毎日 100 回まで無料1日あたり最初の 100 回は無料です(組織内で共有)· 00:00 UTC にリセットされます。それ以降は従量課金です。

プレイグラウンド

入力
Instagram username
出力例
レスポンスoutputs · 61 B · 7 行
[
  {
    "data": {
      "user_id": "1821100851"
    }
  }
]

例

例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。

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.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Instagram$0.008 / 回JSON
Instagram$0.008 / 回JSON
Instagram$0.008 / 回JSON
Instagram$0.008 / 回JSON
Instagram$0.002 / 回JSON
Instagram$0.008 / 回JSON

ガイド:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

質問

FAQ

Instagram User ID Lookup API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Instagram User ID Lookup API の料金はいくらですか?

1回あたり $0.008。各組織には UTC 日ごとに 100 回の無料呼び出しが付与され、この API を含む対象の SandBase API 全体で共有されます。それ以降は、各呼び出しが SandBase 残高からこの料金で課金されます。サブスクリプションはありません。

Instagram User ID Lookup API はどのパラメータを受け付けますか?

必須: username (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Instagram User ID Lookup API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。

Instagram の開発者アカウントまたは API key は必要ですか?

いいえ。Instagram User ID Lookup は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Instagram の API アクセスを別途申請する必要はありません。