Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
Use this code with your API KEY:
The response will look like this:
var url = "https://developer.nrel.gov/api/alt-fuel-stations/v1.json";
var options = {
fuel_type: "E85,ELEC",
state: "CA",
limit: "2",
api_key: "MY KEY",
format: "JSON"
}
$.get(url, options).then(function(resp) {
console.log(JSON.stringify(resp, null, " "));
});
The response will look like this:
{
"station_locator_url": "http://www.afdc.energy.gov/afdc/locator/stations/";,
"total_results": 4731,
"station_counts": {
"total": 16526,
"fuels": {
"E85": {
"total": 156
},
"ELEC": {
"total": 16370,
"stations": {
"total": 4575
}
},
"HY": {
"total": 0
},
"LNG": {
"total": 0
},
"BD": {
"total": 0
},
"CNG": {
"total": 0
},
"LPG": {
"total": 0
}
}
},
"fuel_stations": [
{
"access_days_time": "24 hours daily; pay lot",
"cards_accepted": null,
"date_last_confirmed": "2017-05-04",
"expected_date": null,
"fuel_type_code": "ELEC",
"id": 1495,
"groups_with_access_code": "Public",
"open_date": "1995-08-30",
"owner_type_code": "P",
"status_code": "E",
"station_name": "Sacramento County Public Garage",
"station_phone": "916-874-6227",
"updated_at": "2017-05-04T13:14:52Z",
"geocode_status": "GPS",
"latitude": 38.58431244,
"longitude": -121.4956055,
"city": "Sacramento",
"intersection_directions": "7th St & G St",
"plus4": null,
"state": "CA",
"street_address": "725 7th St",
"zip": "95814",
"bd_blends": null,
"e85_blender_pump": null,
"ev_connector_types": null,
"ev_dc_fast_num": null,
"ev_level1_evse_num": null,
"ev_level2_evse_num": null,
"ev_network": null,
"ev_network_web": null,
"ev_other_evse": "1 SP Inductive",
"hy_status_link": null,
"lpg_primary": null,
"ng_fill_type_code": null,
"ng_psi": null,
"ng_vehicle_class": null
},
{
"access_days_time": null,
"cards_accepted": null,
"date_last_confirmed": "2016-10-04",
"expected_date": null,
"fuel_type_code": "ELEC",
"id": 1517,
"groups_with_access_code": "Private - Government only",
"open_date": "1999-10-15",
"owner_type_code": "LG",
"status_code": "E",
"station_name": "LADWP - Truesdale Center",
"station_phone": null,
"updated_at": "2017-11-27T21:20:16Z",
"geocode_status": "200-8",
"latitude": 34.2491037,
"longitude": -118.3875613,
"city": "Sun Valley",
"intersection_directions": null,
"plus4": null,
"state": "CA",
"street_address": "11791 Truesdale St",
"zip": "91352",
"bd_blends": null,
"e85_blender_pump": null,
"ev_connector_types": [
"J1772"
],
"ev_dc_fast_num": null,
"ev_level1_evse_num": null,
"ev_level2_evse_num": 4,
"ev_network": null,
"ev_network_web": null,
"ev_other_evse": null,
"hy_status_link": null,
"lpg_primary": null,
"ng_fill_type_code": null,
"ng_psi": null,
"ng_vehicle_class": null
}
]
}