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.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
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.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
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 '{}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
state_codestringTwo-letter US state code (e.g. TX, CA). Omitting returns national highest recorded prices.
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
AAA Highest Recorded PricesAPI ini AAA | $0.01 per panggilan | JSON Asinkron |
AAA | $0.01 per panggilan | JSON Asinkron |
AAA | $0.01 per panggilan | JSON Asinkron |
AAA | $0.01 per panggilan | JSON Asinkron |
AAA | $0.01 per panggilan | JSON Asinkron |
AAA | $0.02 per panggilan | JSON Asinkron |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/aaa/highest-recorded-prices dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.01 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Tidak ada parameter yang wajib. Opsional: state_code (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Hasil JSON. Endpoint ini berjalan secara asinkron, jadi responsnya memberi tahu cara mengambil hasil yang sudah selesai. README di halaman ini menyertakan contoh respons.
Tidak. AAA Highest Recorded Prices berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API AAA secara terpisah.