slugstringจำเป็น
List slug from the site URL path.
https://api.sandbase.ai/v1/api/stockanalysis/stock-listStocks from a curated stock list by URL slug. Returns the list title, description, stock count, and an array of stock entries with symbol, name, market cap, price, change, and revenue.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns a list of stocks from a StockAnalysis list page, plus the list's total stock count. It needs one input: the list slug from the site URL, such as biggest-companies.
spark1y next to each company name.curl -X POST "https://api.sandbase.ai/v1/api/stockanalysis/stock-list" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"slug": "biggest-companies"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | List slug from the site URL path. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"count": 53518,
"description": null,
"slug": "biggest-companies",
"stocks": [
{
"change": -1.83,
"country": "United States",
"isPrimaryListing": true,
"logo": "https://logos.stockanalysis.com/aapl.svg",
"logoDark": "https://logos.stockanalysis.com/aapl-dark.svg",
"marketCapUSD": 4937502977600,
"n": "Apple Inc.",
"no": 1,
"price": 338.32,
"priceCurrency": "USD",
"priceUSD": 338.32,
"s": "AAPL"
}
],
"title": null
},
"status": "success"
}
| Field | Meaning |
|---|---|
data.count | Total number of stocks in the list. The response shows only part of them in data.stocks. |
data.slug | The list slug that was requested. |
data.title / data.description | List title and description. Both can be null. |
data.stocks[].s / data.stocks[].n | Ticker symbol (such as AAPL) and company name. |
data.stocks[].no | Rank of the stock within the list, starting at 1. |
data.stocks[].price / data.stocks[].priceCurrency | Latest price and the currency it is quoted in. |
data.stocks[].priceUSD / data.stocks[].marketCapUSD | Price and market cap converted to US dollars. Use these to compare stocks across currencies. |
data.stocks[].change | Price change value for the stock, for example -1.83. |
data.stocks[].spark1y | Array of prices for a one-year sparkline chart. |
data.stocks[].country / data.stocks[].state | Country and state or region of the company. |
slug from the list page URL path on StockAnalysis, for example biggest-companies.isPrimaryListing and subtype, which you can use to filter results.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/stockanalysis/stock-list" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "biggest-companies"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
slugstringจำเป็นList slug from the site URL path.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
StockAnalysis Stock ListAPI นี้ StockAnalysis | $0.01 ต่อการเรียก | Async JSON |
StockAnalysis | $0.01 ต่อการเรียก | Async JSON |
StockAnalysis | $0.01 ต่อการเรียก | Async JSON |
StockAnalysis | $0.01 ต่อการเรียก | Async JSON |
StockAnalysis | $0.01 ต่อการเรียก | Async JSON |
StockAnalysis | $0.01 ต่อการเรียก | Async JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/stockanalysis/stock-list โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: slug (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
ผลลัพธ์ JSON จุดเชื่อมต่อนี้ทำงานแบบอะซิงโครนัส ดังนั้นการตอบกลับจะบอกวิธีดึงผลลัพธ์ที่เสร็จแล้ว README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น StockAnalysis Stock List ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง StockAnalysis API แยกต่างหาก