AAA State Gas Prices
https://api.sandbase.ai/v1/api/aaa/state-gas-pricesReturns current average gas prices for all 50 US states plus DC across all four fuel grades (Regular, Mid-Grade, Premium, Diesel). States are listed in alphabetical order by full state name.
- मूल्य
- $0.01USD / कॉल
- मेथड
- POST
- प्रतिक्रिया
- Async JSON
- पैरामीटर
- 0 आवश्यक · 0 वैकल्पिक
प्लेग्राउंड
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
API README
AAA State Gas Prices
Returns the current average cost of gas for each US state and DC, based on AAA data. Each row covers Regular, Mid-Grade, Premium and Diesel. The request takes no input.
Use cases
- Compare Regular gas costs between states to find the cheapest and most expensive places to fill up.
- Estimate fuel costs for a road trip that crosses several states.
- Build a state-by-state fuel cost table or map for a dashboard.
- Track the gap between
dieselandregularin each state for fleet planning.
Request
curl -X POST "https://api.sandbase.ai/v1/api/aaa/state-gas-prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"states": [
{
"diesel": 5.8537,
"mid_grade": 4.1781,
"premium": 4.5882,
"regular": 3.73,
"state": "Alabama"
}
]
},
"status": "success"
}
Response fields
| Field | Meaning |
|---|---|
data.states[] | One entry per state. The list is in alphabetical order by full state name. |
data.states[].state | Full name of the state, for example Alabama. |
data.states[].regular | Average cost of Regular gas in that state. |
data.states[].mid_grade | Average cost of Mid-Grade gas in that state. |
data.states[].premium | Average cost of Premium gas in that state. |
data.states[].diesel | Average cost of diesel in that state. |
status | Shows success when the call worked. |
Notes
- Send an empty JSON object
{}as the request body. There are no parameters. - Fuel values are plain numbers, such as
3.73or5.8537. - For the US-wide average, 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.
बिल्डिंग शुरू करें
अपना पहला अनुरोध भेजें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/aaa/state-gas-prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. प्रमाणीकरण
अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
3. पैरामीटर
इस API के लिए कोई parameter schema प्रकाशित नहीं किया गया है।
4. रिस्पॉन्स
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
संबंधित APIs
| API | कीमत | प्रतिक्रिया |
|---|---|---|
AAA State Gas Pricesयह 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 Gas Prices API का उपयोग कैसे करें?
https://api.sandbase.ai/v1/api/aaa/state-gas-prices पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
AAA State Gas Prices API की लागत कितनी है?
$0.01 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
AAA State Gas Prices API कौन-से parameters स्वीकार करती है?
AAA State Gas Prices कोई input parameters नहीं लेता; एक खाली JSON body भेजें।
AAA State Gas Prices API क्या लौटाती है?
एक JSON result। यह endpoint asynchronously चलता है, इसलिए response आपको बताता है कि तैयार result कैसे प्राप्त करना है। इस पेज का README एक sample response शामिल करता है।
क्या मुझे एक AAA developer account या API key चाहिए?
नहीं। AAA State Gas Prices SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से AAA API access के लिए आवेदन करने की आवश्यकता नहीं है।
