Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

AAA Highest Recorded Prices

Dokumentacja API
https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices

Returns all-time highest recorded average gas prices for a specific state or nationally. If no state_code is provided, returns national records.

Cena
$0.01USD / wywołanie
Metoda
POST
Odpowiedź
Asynchroniczny JSON
Parametry
0 wymaganych · 1 opcjonalnych

Playground

Wejście
Two-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

AAA Highest Recorded Prices

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.

Use cases

  • Compare today's gas price with the national record for regular unleaded gas.
  • Show the record diesel price and its date in a fuel cost dashboard.
  • Check how close a state's current average is to its all-time high.
  • Add historical context to a news story about rising fuel prices.

Request

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.

Parameters

NameTypeRequiredDescription
state_codestringNoTwo-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.

Example response

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"
}

Response fields

FieldMeaning
data.locationThe area the records cover. The value is National when no state_code is sent.
data.highest_recordedMap 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.priceRecord average price for Diesel, as a string.
data.highest_recorded.Diesel.dateDate the Diesel record was set, in M/D/YY format.
statusShows success when the call worked.

Notes

  • Prices are returned as strings with four decimal places. Convert them to numbers before you do math.
  • Pass a two-letter code such as TX or CA in state_code to get records for one state.
  • To compare a record with current prices, call AAA National Average or AAA State Gas Prices.
  • The call runs asynchronously. Read the result from outputs[0].data after the task completes.

Pricing

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

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
AAA$0.01 za wywołanieAsynchroniczny JSON
AAA$0.01 za wywołanieAsynchroniczny JSON
AAA$0.01 za wywołanieAsynchroniczny JSON
AAA$0.01 za wywołanieAsynchroniczny JSON
AAA$0.01 za wywołanieAsynchroniczny JSON
AAA$0.02 za wywołanieAsynchroniczny JSON

Pytania

FAQ

Jak używać API AAA Highest Recorded Prices?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API AAA Highest Recorded Prices?

$0.01 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API AAA Highest Recorded Prices?

Nie są wymagane żadne parametry. Opcjonalne: state_code (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API AAA Highest Recorded Prices?

Wynik JSON. Ten endpoint działa asynchronicznie, więc odpowiedź informuje, jak pobrać gotowy wynik. README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego AAA lub klucza API?

Nie. AAA Highest Recorded Prices działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API AAA.