G B F S
Shared mobility docks and availability
curl -X GET "https://example.com/gbfs/nearby-stations"fetch("https://example.com/gbfs/nearby-stations")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/gbfs/nearby-stations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/gbfs/nearby-stations"
response = requests.request("GET", url)
print(response.text)Empty
curl -X GET "https://example.com/gbfs/systems"fetch("https://example.com/gbfs/systems")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/gbfs/systems"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/gbfs/systems"
response = requests.request("GET", url)
print(response.text)Empty
One station with live availability
By systemId + stationId, or the station nearest lat/lng within radius metres.
Response Body
curl -X GET "https://example.com/gbfs/station"fetch("https://example.com/gbfs/station")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/gbfs/station"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/gbfs/station"
response = requests.request("GET", url)
print(response.text)Empty
Stations to switch to when one fills up or runs dry
Nearby stations within 700 m of lat/lng holding at least min (default 3) free docks (need=dock) or bikes (need=bike), excluding the original. Ranked by distance to toLat/toLng (where the traveller goes next) when given, else to the original. Requires the premium navigation permission.
Query Parameters
latRequirednumberlngRequirednumberneedRequiredstringminnumberMinimum:
1toLatnumbertoLngnumberResponse Body
curl -X GET "https://example.com/gbfs/station/alternatives?lat=0&lng=0&need=dock&min=1&toLat=0&toLng=0"fetch("https://example.com/gbfs/station/alternatives?lat=0&lng=0&need=dock&min=1&toLat=0&toLng=0")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/gbfs/station/alternatives?lat=0&lng=0&need=dock&min=1&toLat=0&toLng=0"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/gbfs/station/alternatives?lat=0&lng=0&need=dock&min=1&toLat=0&toLng=0"
response = requests.request("GET", url)
print(response.text)Empty