Sand AISand AI MAGI-2MAGI-2 artık SandBase'de: yerel sesli 1080p videoŞimdi deneyin

AAA State Gas Prices

API dokümanları
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.

Fiyat
$0.01USD / çağrı
Yöntem
POST
Yanıt
Asenkron JSON
Parametreler
0 gerekli · 0 isteğe bağlı

Oynatma Alanı

Girdi
Kullanılabilir giriş şeması yok
ÇıktıHazır

Çıktınız burada görünecek

Girdileri tamamlayın, ardından Çalıştır'a tıklayın.

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.

Daha fazlasını keşfedin

İlgili APIs

Tüm APIs
APIFiyatYanıt
AAA$0.01 çağrı başınaAsenkron JSON
AAA$0.01 çağrı başınaAsenkron JSON
AAA$0.01 çağrı başınaAsenkron JSON
AAA$0.01 çağrı başınaAsenkron JSON
AAA$0.01 çağrı başınaAsenkron JSON
AAA$0.01 çağrı başınaAsenkron JSON

Sorular

SSS

AAA State Gas Prices API'sini nasıl kullanırım?

SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/aaa/state-gas-prices adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.

AAA State Gas Prices API'sinin fiyatı nedir?

çağrı başına $0.01, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.

AAA State Gas Prices API'si hangi parametreleri kabul eder?

AAA State Gas Prices hiçbir giriş parametresi almaz; boş bir JSON gövdesi gönderin.

AAA State Gas Prices API'si ne döndürür?

Bir JSON sonucu. Bu uç nokta asenkron çalışır; bu nedenle yanıt, tamamlanan sonucu nasıl alacağınızı söyler. Bu sayfadaki README'de örnek bir yanıt yer alır.

Bir AAA geliştirici hesabına veya API anahtarına ihtiyacım var mı?

Hayır. AAA State Gas Prices, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. AAA API erişimi için ayrıca başvuru yapmanız gerekmez.