Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

AAA Price Change By Metro

Dokumentasi API
https://api.sandbase.ai/v1/api/aaa/price-change-by-metro

Returns price changes for all metro areas within a given state, showing the difference between current and historical prices for each fuel grade. Includes yesterday_change, week_ago_change, month_ago_change, and.

Harga
$0.01USD / panggilan
Metode
POST
Respons
JSON Asinkron
Parameter
1 wajib · 0 opsional

Playground

Input
Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported.
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

README API

AAA Price Change By Metro

Returns gas and diesel changes since yesterday, last week, last month and last year for every metro area in a US state. It needs a two-letter state_code such as WA. Each metro lists changes for Regular, Mid-Grade, Premium and Diesel.

Use cases

  • Compare how fast Regular gas is moving in Bellingham, Bremerton and Olympia.
  • Flag metros where yesterday_change shows a sudden jump or drop.
  • Chart month over month and year over year fuel trends for a state.
  • Add local fuel trends to a logistics or fleet dashboard.

Request

curl -X POST "https://api.sandbase.ai/v1/api/aaa/price-change-by-metro" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state_code": "WA"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
state_codestringYesTwo-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "metro_price_changes": [
      {
        "changes": {
          "Diesel": {
            "month_ago_change": -0.179,
            "week_ago_change": -0.04,
            "year_ago_change": 2.101,
            "yesterday_change": -0.064
          },
          "Mid-Grade": {
            "month_ago_change": -0.349,
            "week_ago_change": 0.069,
            "year_ago_change": 1.144,
            "yesterday_change": -0.039
          },
          "Premium": {
            "month_ago_change": -0.332,
            "week_ago_change": 0.039,
            "year_ago_change": 0.995,
            "yesterday_change": 0.042
          },
          "Regular": {
            "month_ago_change": -0.356,
            "week_ago_change": -0.124,
            "year_ago_change": 1.012,
            "yesterday_change": -0.012
          }
        },
        "metro": "Bellingham"
      }
    ],
    "state": "Washington"
  },
  "status": "success"
}

Response fields

FieldMeaning
data.stateFull name of the state the metros belong to, such as Washington.
data.metro_price_changes[].metroName of the metro area.
data.metro_price_changes[].changesChanges for this metro, keyed by fuel grade: Regular, Mid-Grade, Premium and Diesel.
data.metro_price_changes[].changes.Regular.yesterday_changeDifference between the current Regular value and yesterday's value for this metro.
data.metro_price_changes[].changes.Regular.week_ago_change / month_ago_change / year_ago_changeDifference between the current Regular value and the value one week, one month or one year ago.
data.metro_price_changes[].changes.Diesel.yesterday_change / week_ago_change / month_ago_change / year_ago_changeThe same set of changes for Diesel.
data.metro_price_changes[].changes.Mid-GradeSame four change fields for Mid-Grade gas.
data.metro_price_changes[].changes.PremiumSame four change fields for Premium gas.
statusShows success when the call worked.

Notes

  • Pass the two-letter state code in state_code. The response returns the full state name in data.state.
  • The fuel grades are object keys under changes, and Mid-Grade includes a hyphen.
  • Change values are decimals with up to three places, such as -0.012. Negative values mean the current value is lower than the earlier one.

Pricing

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

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
AAA$0.01 per panggilanJSON Asinkron
AAA$0.01 per panggilanJSON Asinkron
AAA$0.01 per panggilanJSON Asinkron
AAA$0.01 per panggilanJSON Asinkron
AAA$0.01 per panggilanJSON Asinkron
AAA$0.01 per panggilanJSON Asinkron

Pertanyaan

FAQ

Bagaimana cara menggunakan API AAA Price Change By Metro?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/aaa/price-change-by-metro 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.

Berapa biaya API AAA Price Change By Metro?

$0.01 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API AAA Price Change By Metro?

Wajib: state_code (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API AAA Price Change By Metro?

Hasil JSON. Endpoint ini berjalan secara asinkron, jadi responsnya memberi tahu cara mengambil hasil yang sudah selesai. README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API AAA?

Tidak. AAA Price Change By Metro 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.