AAA Ev Charging Prices
https://api.sandbase.ai/v1/api/aaa/ev-charging-pricesReturns national and per-state EV charging price data including cost per kWh and total charger counts for each state. Data sourced from a public Google Sheets dataset maintained by AAA.
- 价格
- $0.01美元 / 次调用
- 方法
- POST
- 响应
- 异步 JSON
- 参数
- 0 个必填 · 0 个可选
Playground
您的输出将显示在这里
完成输入,然后点击运行。
API README
AAA Ev Charging Prices
Returns the EV charging cost per kWh and the total number of chargers for each location, with one row per state. The request takes no input.
Use cases
- Compare the cost per kWh of EV charging across states.
- Rank states by total charger count to see where charging stations are most common.
- Estimate the cost of a full charge in a state by multiplying
ev_costperkwhby battery size in kWh. - Feed charging costs into a trip planning or fleet budgeting tool.
Request
curl -X POST "https://api.sandbase.ai/v1/api/aaa/ev-charging-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": {
"ev_data": [
{
"LOCATION_ID": "Alaska",
"LOCATION_NAME": "Alaska",
"LOCATION_STATE": "AK",
"LOCATION_TYPE": "ST",
"ev_costperkwh": "0.459",
"ev_totalchargers": "92"
}
]
},
"status": "success"
}
Response fields
| Field | Meaning |
|---|---|
data.ev_data[] | List of locations. Each item holds the charging cost and charger count for one location. |
data.ev_data[].LOCATION_NAME / data.ev_data[].LOCATION_ID | Name of the location, such as Alaska. In the sample rows both fields hold the same value. |
data.ev_data[].LOCATION_STATE | Two-letter state code, such as AK or AL. |
data.ev_data[].LOCATION_TYPE | Location type code. The sample rows show ST for each state. |
data.ev_data[].ev_costperkwh | Charging cost per kWh for the location, returned as a string such as 0.459. |
data.ev_data[].ev_totalchargers | Total number of chargers for the location, returned as a string such as 1008. |
status | Result of the call. The value is success when the data was returned. |
Notes
- Values such as
ev_costperkwhandev_totalchargerscome back as strings. Convert them to numbers before sorting or doing math. - Use
LOCATION_TYPEto filter rows by type, andLOCATION_STATEto match a row to a state code. - For gasoline figures instead of EV charging, 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.
开始构建
发送您的第一条请求
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/aaa/ev-charging-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 尚未发布参数 Schema。
4. 响应
这是该 API 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 Playground 中运行 API 以查看其响应。
探索更多
相关 APIs
| 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 |
问题
常见问题
如何使用 AAA Ev Charging Prices API?
向 https://api.sandbase.ai/v1/api/aaa/ev-charging-prices 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
AAA Ev Charging Prices API 的价格是多少?
每次调用 $0.01,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
AAA Ev Charging Prices API 接受哪些参数?
AAA Ev Charging Prices 不接受输入参数;请发送空的 JSON 请求体。
AAA Ev Charging Prices API 返回什么?
JSON 结果。此端点异步运行,因此响应会告诉您如何获取已完成的结果。 本页的 README 包含一个示例响应。
我需要 AAA 开发者账户或 API key 吗?
不需要。AAA Ev Charging Prices 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 AAA API 访问权限。
