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
प्रतिक्रिया
Async JSON
पैरामीटर
1 आवश्यक · 0 वैकल्पिक

प्लेग्राउंड

इनपुट
Two-letter US state code (e.g. TX, CA, NY, FL). All 50 states and DC are supported.
आउटपुटतैयार

आपका आउटपुट यहाँ दिखाई देगा

इनपुट पूरा करें, फिर Run पर क्लिक करें।

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 का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/aaa/price-change-by-metro पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

AAA Price Change By Metro API की लागत कितनी है?

$0.01 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

AAA Price Change By Metro API कौन-से parameters स्वीकार करती है?

आवश्यक: state_code (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

AAA Price Change By Metro API क्या लौटाती है?

एक JSON result। यह endpoint asynchronously चलता है, इसलिए response आपको बताता है कि तैयार result कैसे प्राप्त करना है। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक AAA developer account या API key चाहिए?

नहीं। AAA Price Change By Metro SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से AAA API access के लिए आवेदन करने की आवश्यकता नहीं है।