Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

AAA State Price Details

APIドキュメント
https://api.sandbase.ai/v1/api/aaa/state-price-details

Returns detailed gas price data for a specific state including current prices for all fuel grades, historical averages (yesterday, week ago, month ago, year ago), and all-time highest recorded prices with their dates.

料金
$0.01USD / 回
メソッド
POST
レスポンス
非同期 JSON
パラメータ
必須 1 件 · 任意 0 件

プレイグラウンド

入力
Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

API README

AAA State Price Details

Returns AAA gas prices for one US state. Each fuel grade has a current price and past prices from yesterday, a week ago, a month ago and a year ago, plus the highest recorded price with its date. Send a two-letter state_code.

Use cases

  • Show the current Regular and Diesel price for a state in a fuel cost calculator.
  • Compare today's Washington price with the price a month ago and a year ago to chart a trend.
  • Check how far current diesel prices sit below the highest recorded diesel price for a state.
  • Compare Regular, Mid-Grade and Premium prices in a state to estimate the cost of a higher grade.

Request

curl -X POST "https://api.sandbase.ai/v1/api/aaa/state-price-details" \
  -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": {
    "highest_recorded": {
      "Diesel": {
        "date": "9/23/26",
        "price": "7.4697"
      },
      "Regular Unleaded": {
        "date": "5/20/26",
        "price": "5.7887"
      }
    },
    "prices": {
      "Diesel": {
        "current": 7.2512,
        "month_ago": 7.3739,
        "week_ago": 7.2642,
        "year_ago": 4.9787,
        "yesterday": 7.2685
      },
      "Mid-Grade": {
        "current": 5.4442,
        "month_ago": 5.7645,
        "week_ago": 5.5587,
        "year_ago": 4.5651,
        "yesterday": 5.4577
      },
      "Premium": {
        "current": 5.7146,
        "month_ago": 6.0237,
        "week_ago": 5.8074,
        "year_ago": 4.8184,
        "yesterday": 5.7243
      },
      "Regular": {
        "current": 5.1925,
        "month_ago": 5.4891,
        "week_ago": 5.3047,
        "year_ago": 4.2855,
        "yesterday": 5.203
      }
    },
    "state_code": "WA",
    "state_name": "Washington"
  },
  "status": "success"
}

Response fields

FieldMeaning
data.state_code / data.state_nameThe two-letter code and full name of the state the prices describe.
data.prices.Regular.currentCurrent price for Regular fuel in the state. Mid-Grade, Premium and Diesel use the same structure under data.prices.
data.prices.Diesel.currentCurrent price for Diesel in the state.
data.prices.Regular.yesterday / data.prices.Regular.week_ago / data.prices.Regular.month_ago / data.prices.Regular.year_agoRegular price at each earlier point in time. The other grades have the same keys, so you can compare change over time.
data.highest_recordedHighest recorded price for each fuel grade, with the date it was recorded. Each entry holds a price string and a date string in M/D/YY format.
data.highest_recorded.Diesel.price / dateHighest recorded Diesel price and the date it was recorded.
statusShows success when the call worked.

Notes

  • Use the two-letter postal code for state_code, such as WA. The description says all 50 states and DC are supported.
  • Current and past prices under data.prices are numbers. Prices under data.highest_recorded are strings.
  • The grade names differ between sections: data.prices uses Regular, while data.highest_recorded labels the regular grade Regular Unleaded. Mid-Grade and Premium appear only under data.prices.
  • For city-level prices in a state, call AAA Metro Prices By State. For a national figure, call AAA National Average.

Pricing

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

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
AAA$0.01 / 回非同期 JSON
AAA$0.01 / 回非同期 JSON
AAA$0.01 / 回非同期 JSON
AAA$0.01 / 回非同期 JSON
AAA$0.01 / 回非同期 JSON
AAA$0.01 / 回非同期 JSON

質問

FAQ

AAA State Price Details API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/aaa/state-price-details に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

AAA State Price Details API の料金はいくらですか?

1回あたり $0.01、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

AAA State Price Details API はどのパラメータを受け付けますか?

必須: state_code (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

AAA State Price Details API は何を返しますか?

JSON 結果です。このエンドポイントは非同期で実行されるため、レスポンスには完了した結果の取得方法が含まれます。 このページの README にサンプルレスポンスがあります。

AAA の開発者アカウントまたは API key は必要ですか?

いいえ。AAA State Price Details は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。AAA の API アクセスを別途申請する必要はありません。