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.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
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.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
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 '{}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
state_codestringTwo-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
AAA Highest Recorded PricesQuesta API AAA | $0.01 per chiamata | JSON asincrono |
AAA | $0.01 per chiamata | JSON asincrono |
AAA | $0.01 per chiamata | JSON asincrono |
AAA | $0.01 per chiamata | JSON asincrono |
AAA | $0.01 per chiamata | JSON asincrono |
AAA | $0.02 per chiamata | JSON asincrono |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.01 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Nessun parametro richiesto. Facoltativi: state_code (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Un risultato JSON. Questo endpoint viene eseguito in modo asincrono, quindi la risposta indica come recuperare il risultato completato. Il README di questa pagina include una risposta di esempio.
No. AAA Highest Recorded Prices funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API AAA.