Sand AISand AI MAGI-2ตอนนี้ MAGI-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 / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
1 จำเป็น · 0 ไม่บังคับ
100 คำขอฟรี / วันคำขอ 100 ครั้งแรกต่อวันฟรี (ใช้ร่วมกันภายในองค์กร) · รีเซ็ตเวลา 00:00 UTC จากนั้นคิดค่าบริการตามจำนวนคำขอ

Playground

อินพุต
Instagram username
เอาต์พุตตัวอย่าง
การตอบกลับoutputs · 61 B · 7 บรรทัด
[
  {
    "data": {
      "user_id": "1821100851"
    }
  }
]

ตัวอย่าง

เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground

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

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Instagram User ID Lookup API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/instagram/v3/user-id-by-username โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Instagram User ID Lookup API ราคาเท่าไร?

$0.008 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ SandBase ของคุณ ไม่มีค่าสมาชิกรายเดือน

Instagram User ID Lookup API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: username (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Instagram User ID Lookup API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Instagram ไหม?

ไม่จำเป็น Instagram User ID Lookup ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Instagram API แยกต่างหาก