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

AAA Price Change By Metro

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.

料金
$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 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.

さらに探索

関連 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 Price Change By Metro API はどのように使いますか?

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

AAA Price Change By Metro API の料金はいくらですか?

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

AAA Price Change By Metro API はどのパラメータを受け付けますか?

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

AAA Price Change By Metro API は何を返しますか?

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

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

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