Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

AAA Highest Recorded Prices

Docs da 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.

Preço
$0.01USD / chamada
Método
POST
Resposta
JSON assíncrono
Parâmetros
0 obrigatórios · 1 opcionais

Playground

Entrada
Two-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da 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.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
AAA$0.01 por chamadaJSON assíncrono
AAA$0.01 por chamadaJSON assíncrono
AAA$0.01 por chamadaJSON assíncrono
AAA$0.01 por chamadaJSON assíncrono
AAA$0.01 por chamadaJSON assíncrono
AAA$0.02 por chamadaJSON assíncrono

Perguntas

FAQ

Como eu uso a API AAA Highest Recorded Prices?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API AAA Highest Recorded Prices?

$0.01 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API AAA Highest Recorded Prices aceita?

Nenhum parâmetro é obrigatório. Opcionais: state_code (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API AAA Highest Recorded Prices retorna?

Um resultado JSON. Este endpoint é assíncrono, então a resposta informa como buscar o resultado final. O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor AAA ou de uma chave de API?

Não. AAA Highest Recorded Prices funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do AAA separadamente.