querystringจำเป็น
Keyword to search Instagram for; one or more words without special punctuation (e.g. coffee roastery).
https://api.sandbase.ai/v1/api/instagram/searchSearch Instagram for users, hashtags, or places by keyword and get matching results with names, counts, and links.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
This API searches Instagram by keyword and returns a list of matching results. Each result has a name, handle, ID, profile image, and link. It needs a query, and you can set type to user, hashtag, or place.
curl -X POST "https://api.sandbase.ai/v1/api/instagram/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "nasa"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Keyword to search Instagram for; one or more words without special punctuation (e.g. coffee roastery). |
limit | integer | No | Maximum number of results to return (1-20, default 20). |
requireFields | array | No | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example postsCount, and it is served only by a source that returns every one |
type | string | No | What to search for: user profiles, hashtags, or places (e.g. hashtag). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"items": [
{
"bio": "",
"followers": 0,
"following": 0,
"handle": "nasa",
"id": "528817151",
"image": "https://instagram.fsjc1-4.fna.fbcdn.net/v/t51.2885-19/29090066_159271188110124_1…",
"name": "NASA",
"postsCount": null,
"url": "https://www.instagram.com/nasa/",
"verified": true
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.items[].handle | The account username, without the @ sign. |
data.items[].name | The display name shown on the profile. |
data.items[].id | The numeric Instagram ID of the account, returned as a string. |
data.items[].url | Link to the profile page on Instagram. |
data.items[].verified | true when the account has the verified badge. |
data.items[].image | URL of the profile picture. |
data.items[].followers / data.items[].following | Follower and following counts. In this sample response they are 0 for every result, so do not rely on them for ranking. |
data.items[].bio | Profile biography text. It is an empty string in this sample response. |
data.items[].postsCount | Number of posts on the account. It is null in this sample response. |
found | true when the search returned results. |
data.items. A search with no match still succeeds and returns found: false.limit (1 to 20) to cap the number of results. There is no page parameter.postsCount came back as null in this sample. Pass requireFields: ["postsCount"] to route to a source that returns it. This can raise the price of the call.handle or id and call Instagram Profile or Instagram User Profile by ID.Billed at the actual cost of each call, about $0.0036 for the request above. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/instagram/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user",
"query": "nasa"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
querystringจำเป็นKeyword to search Instagram for; one or more words without special punctuation (e.g. coffee roastery).
typestringWhat to search for: user profiles, hashtags, or places (e.g. hashtag).
ค่าเริ่มต้น: "user"
ค่าที่เป็นไปได้: user, hashtag, place
limitintegerMaximum number of results to return (1-20, default 20).
requireFieldsarrayOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `postsCount`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a profile that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Instagram SearchAPI นี้ Instagram | เริ่มต้นที่ $0.0036 ต่อครั้ง | JSON |
Instagram | เริ่มต้นที่ $0.0011 ต่อครั้ง | JSON |
Instagram | เริ่มต้นที่ $0.001 ต่อครั้ง | JSON |
Instagram | เริ่มต้นที่ $0.0011 ต่อครั้ง | JSON |
Instagram | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
Instagram | เริ่มต้นที่ $0.0011 ต่อครั้ง | JSON |
คู่มือ:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/instagram/search โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
เริ่มต้นที่ $0.0036 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: query (string). ตัวเลือก: type (หนึ่งใน user, hashtag, place), limit (integer) และ requireFields (array). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Instagram Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Instagram API แยกต่างหาก