Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

AAA Highest Recorded Prices

Documentación de la 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.

Precio
$0.01USD / llamada
Método
POST
Respuesta
JSON asíncrono
Parámetros
0 obligatorios · 1 opcionales

Entorno de pruebas

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

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la 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 más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
AAA$0.01 por llamadaJSON asíncrono
AAA$0.01 por llamadaJSON asíncrono
AAA$0.01 por llamadaJSON asíncrono
AAA$0.01 por llamadaJSON asíncrono
AAA$0.01 por llamadaJSON asíncrono
AAA$0.02 por llamadaJSON asíncrono

Preguntas

FAQ

¿Cómo uso la API de AAA Highest Recorded Prices?

Envía una solicitud POST a https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.

¿Cuánto cuesta la API de AAA Highest Recorded Prices?

$0.01 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de AAA Highest Recorded Prices?

No se requieren parámetros. Opcionales: state_code (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de AAA Highest Recorded Prices?

Un resultado JSON. Este endpoint se ejecuta de forma asíncrona, así que la respuesta indica cómo obtener el resultado final. El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de AAA?

No. AAA Highest Recorded Prices funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de AAA por separado.