state_codestring
Two-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.
https://api.sandbase.ai/v1/api/aaa/highest-recorded-pricesReturns all-time highest recorded average gas prices for a specific state or nationally. If no state_code is provided, returns national records.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns the all-time highest recorded average gas prices from AAA, with the date each record was set. It takes an optional two-letter state_code. Without it, the API returns national records.
curl -X POST "https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
state_code | string | No | Two-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"highest_recorded": {
"Diesel": {
"date": "9/22/26",
"price": "6.5276"
},
"Regular Unleaded": {
"date": "6/14/22",
"price": "5.0165"
}
},
"location": "National"
},
"status": "success"
}
| Field | Meaning |
|---|---|
data.location | The area the records cover. The value is National when no state_code is sent. |
data.highest_recorded | Map of fuel type names to record entries. The sample has two fuel types: Diesel and Regular Unleaded. Each entry holds a price and a date. |
data.highest_recorded.Diesel.price | Record average price for Diesel, as a string. |
data.highest_recorded.Diesel.date | Date the Diesel record was set, in M/D/YY format. |
status | Shows success when the call worked. |
TX or CA in state_code to get records for one state.outputs[0].data after the task completes.$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/aaa/highest-recorded-prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
state_codestringTwo-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
AAA Highest Recorded PricesAPI นี้ AAA | $0.01 ต่อการเรียก | Async JSON |
AAA | $0.01 ต่อการเรียก | Async JSON |
AAA | $0.01 ต่อการเรียก | Async JSON |
AAA | $0.01 ต่อการเรียก | Async JSON |
AAA | $0.01 ต่อการเรียก | Async JSON |
AAA | $0.02 ต่อการเรียก | Async JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ไม่ต้องระบุพารามิเตอร์ ตัวเลือก: state_code (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
ผลลัพธ์ JSON จุดเชื่อมต่อนี้ทำงานแบบอะซิงโครนัส ดังนั้นการตอบกลับจะบอกวิธีดึงผลลัพธ์ที่เสร็จแล้ว README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น AAA Highest Recorded Prices ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง AAA API แยกต่างหาก