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

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

AAA State Price Details API की लागत कितनी है?

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

AAA State Price Details API कौन-से parameters स्वीकार करती है?

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

AAA State Price Details API क्या लौटाती है?

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

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

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