(Originally written Saturday, 13 February 2021)
A while ago I was working on an open-source scooter map web application, and I wanted to add the locations of electric scooters that are offered for hire here in New Zealand by a company named Flamingo. I reached out to their support, and they helpfully provided me with details about their public API.
I figured someone else could also be looking for them, so here's how you can access it:
The Flamingo API returns data that follows the format of the GBFS standard (General Bikeshare Feed Specification). Each city has its own endpoint that contains information about the scooters available in the local area:
https://api.flamingoscooters.com/gbfs/wellington/gbfs.json
https://api.flamingoscooters.com/gbfs/christchurch/gbfs.json
These endpoints provide information about the feeds that are available to consume. For example, if you wanted to see which scooters are available in Wellington, you would use the `free_bike_status` endpoint:
https://api.flamingoscooters.com/gbfs/wellington/free_bike_status.json
Which should return something like this:
{ "success": true, "data": { "bikes": [ { "bike_id": "4129", "lat": -41.276589, "lon": 174.77937, "current_range_meters": 27132, "last_reported": 1611545465 }, { "bike_id": "8025", "lat": -41.288907, "lon": 174.803936, "current_range_meters": 28917, "last_reported": 1611545501 }, { "bike_id": "8430", "lat": -41.21483, "lon": 174.804965, "current_range_meters": 25620, "last_reported": 1611545449 }, { "bike_id": "8240", "lat": -41.312017, "lon": 174.782053, "current_range_meters": 19635, "last_reported": 1611545412 }, { "bike_id": "8412", "lat": -41.291181, "lon": 174.79007, "current_range_meters": 24276, "last_reported": 1611545523 }, { "bike_id": "8252", "lat": -41.278834, "lon": 174.771693, "current_range_meters": 24990, "last_reported": 1611545464 } ] } }