AAA Lowest State Prices
https://api.sandbase.ai/v1/api/aaa/lowest-state-pricesReturns all states sorted by lowest average regular gas price ascending. Useful for identifying the cheapest states for gasoline.
- Fiyat
- $0.01USD / çağrı
- Yöntem
- POST
- Yanıt
- Asenkron JSON
- Parametreler
- 0 gerekli · 0 isteğe bağlı
Oynatma Alanı
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
API README
AAA Lowest State Prices
Returns every US state with its average fuel figures per grade, sorted by regular gasoline from lowest to highest. It takes no input. Each row has values for regular, mid_grade, premium and diesel.
Use cases
- Find the cheapest states for regular gasoline for a road trip or fuel budget.
- Rank states by
regularin a dashboard or chart. - Compare
dieselandpremiumvalues across low-cost states for fleet planning. - Track how the cheapest states change by saving the response on a schedule.
Request
curl -X POST "https://api.sandbase.ai/v1/api/aaa/lowest-state-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.491,
"mid_grade": 3.8096,
"premium": 4.2414,
"regular": 3.3814,
"state": "North Carolina"
}
]
},
"status": "success"
}
Response fields
| Field | Meaning |
|---|---|
data.states[] | List of states. The list is sorted by regular, lowest first. |
data.states[].state | Full name of the state, for example North Carolina. |
data.states[].regular | Average value for regular gasoline in the state. Rows are ordered by this value. |
data.states[].mid_grade | Average value for mid-grade gasoline in the state. |
data.states[].premium | Average value for premium gasoline in the state. |
data.states[].diesel | Average value for diesel in the state. |
status | Result of the call. The value is success when the request worked. |
Notes
- This API has no parameters. Send an empty JSON object
{}. - Fuel values are plain numbers with up to four decimal places. The response does not show a currency or unit.
Pricing
$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Geliştirmeye başlayın
İlk isteğinizi gönderin
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
curl -X POST "https://api.sandbase.ai/v1/api/aaa/lowest-state-prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. Kimlik doğrulama
SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
3. Parametreler
Bu API için bir parametre şeması yayınlanmamış.
4. Yanıt
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
İlgili APIs
| API | Fiyat | Yanıt |
|---|---|---|
AAA Lowest State PricesBu API AAA | $0.01 çağrı başına | Asenkron JSON |
AAA | $0.01 çağrı başına | Asenkron JSON |
AAA | $0.01 çağrı başına | Asenkron JSON |
AAA | $0.01 çağrı başına | Asenkron JSON |
AAA | $0.01 çağrı başına | Asenkron JSON |
AAA | $0.02 çağrı başına | Asenkron JSON |
Sorular
SSS
AAA Lowest State 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/lowest-state-prices adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
AAA Lowest State 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 Lowest State Prices API'si hangi parametreleri kabul eder?
AAA Lowest State Prices hiçbir giriş parametresi almaz; boş bir JSON gövdesi gönderin.
AAA Lowest State 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 Lowest State 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.
