Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

AAA State Gas Prices

เอกสาร API
https://api.sandbase.ai/v1/api/aaa/state-gas-prices

Returns current average gas prices for all 50 US states plus DC across all four fuel grades (Regular, Mid-Grade, Premium, Diesel). States are listed in alphabetical order by full state name.

ราคา
$0.01USD / คำขอ
Method
POST
การตอบกลับ
Async JSON
พารามิเตอร์
0 จำเป็น · 0 ไม่บังคับ

Playground

อินพุต
ไม่มี schema ของอินพุต
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

AAA State Gas Prices

Returns the current average cost of gas for each US state and DC, based on AAA data. Each row covers Regular, Mid-Grade, Premium and Diesel. The request takes no input.

Use cases

  • Compare Regular gas costs between states to find the cheapest and most expensive places to fill up.
  • Estimate fuel costs for a road trip that crosses several states.
  • Build a state-by-state fuel cost table or map for a dashboard.
  • Track the gap between diesel and regular in each state for fleet planning.

Request

curl -X POST "https://api.sandbase.ai/v1/api/aaa/state-gas-prices" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

The result is returned in outputs[0].data.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "states": [
      {
        "diesel": 5.8537,
        "mid_grade": 4.1781,
        "premium": 4.5882,
        "regular": 3.73,
        "state": "Alabama"
      }
    ]
  },
  "status": "success"
}

Response fields

FieldMeaning
data.states[]One entry per state. The list is in alphabetical order by full state name.
data.states[].stateFull name of the state, for example Alabama.
data.states[].regularAverage cost of Regular gas in that state.
data.states[].mid_gradeAverage cost of Mid-Grade gas in that state.
data.states[].premiumAverage cost of Premium gas in that state.
data.states[].dieselAverage cost of diesel in that state.
statusShows success when the call worked.

Notes

  • Send an empty JSON object {} as the request body. There are no parameters.
  • Fuel values are plain numbers, such as 3.73 or 5.8537.
  • For the US-wide average, call AAA National Average.

Pricing

$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
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.01 ต่อการเรียกAsync JSON

คำถาม

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

ฉันจะใช้ AAA State Gas Prices API ได้อย่างไร?

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

AAA State Gas Prices API ราคาเท่าไร?

$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

AAA State Gas Prices API รับพารามิเตอร์อะไรบ้าง?

AAA State Gas Prices ไม่รับพารามิเตอร์อินพุต ส่ง JSON body ว่างเปล่า

AAA State Gas Prices API ส่งคืนอะไร?

ผลลัพธ์ JSON จุดเชื่อมต่อนี้ทำงานแบบอะซิงโครนัส ดังนั้นการตอบกลับจะบอกวิธีดึงผลลัพธ์ที่เสร็จแล้ว README บนหน้านี้มีตัวอย่างการตอบกลับ

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

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