AAA Lowest State Prices
https://api.sandbase.ai/v1/api/aaa/lowest-state-pricesReturns all states sorted by lowest average regular gas price ascending. Useful for identifying the cheapest states for gasoline.
- 料金
- $0.01USD / 回
- メソッド
- POST
- レスポンス
- 非同期 JSON
- パラメータ
- 必須 0 件 · 任意 0 件
プレイグラウンド
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
API README
AAA Lowest State Prices
Returns every US state with its average fuel figures per grade, sorted by regular gasoline from lowest to highest. It takes no input. Each row has values for regular, mid_grade, premium and diesel.
Use cases
- Find the cheapest states for regular gasoline for a road trip or fuel budget.
- Rank states by
regularin a dashboard or chart. - Compare
dieselandpremiumvalues across low-cost states for fleet planning. - Track how the cheapest states change by saving the response on a schedule.
Request
curl -X POST "https://api.sandbase.ai/v1/api/aaa/lowest-state-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.491,
"mid_grade": 3.8096,
"premium": 4.2414,
"regular": 3.3814,
"state": "North Carolina"
}
]
},
"status": "success"
}
Response fields
| Field | Meaning |
|---|---|
data.states[] | List of states. The list is sorted by regular, lowest first. |
data.states[].state | Full name of the state, for example North Carolina. |
data.states[].regular | Average value for regular gasoline in the state. Rows are ordered by this value. |
data.states[].mid_grade | Average value for mid-grade gasoline in the state. |
data.states[].premium | Average value for premium gasoline in the state. |
data.states[].diesel | Average value for diesel in the state. |
status | Result of the call. The value is success when the request worked. |
Notes
- This API has no parameters. Send an empty JSON object
{}. - Fuel values are plain numbers with up to four decimal places. The response does not show a currency or unit.
Pricing
$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開発を始める
最初のリクエストを送信
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/aaa/lowest-state-prices" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. 認証
SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
3. パラメータ
このAPIのパラメータスキーマは公開されていません。
4. レスポンス
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
関連 APIs
| API | 価格 | レスポンス |
|---|---|---|
AAA Lowest State Pricesこの API AAA | $0.01 / 回 | 非同期 JSON |
AAA | $0.01 / 回 | 非同期 JSON |
AAA | $0.01 / 回 | 非同期 JSON |
AAA | $0.01 / 回 | 非同期 JSON |
AAA | $0.01 / 回 | 非同期 JSON |
AAA | $0.02 / 回 | 非同期 JSON |
質問
FAQ
AAA Lowest State Prices API はどのように使いますか?
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/aaa/lowest-state-prices に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
AAA Lowest State Prices API の料金はいくらですか?
1回あたり $0.01、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
AAA Lowest State Prices API はどのパラメータを受け付けますか?
AAA Lowest State Prices は入力パラメータを取りません。空の JSON ボディを送信してください。
AAA Lowest State Prices API は何を返しますか?
JSON 結果です。このエンドポイントは非同期で実行されるため、レスポンスには完了した結果の取得方法が含まれます。 このページの README にサンプルレスポンスがあります。
AAA の開発者アカウントまたは API key は必要ですか?
いいえ。AAA Lowest State Prices は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。AAA の API アクセスを別途申請する必要はありません。
