City Bikes

Transportation API · Global · Bike share station data

TL;DR

City Bikes aggregates real-time bike share data from hundreds of systems worldwide — Paris (Vélib'), London (Santander Cycles), New York (Citi Bike), and hundreds more. Get network lists, individual station locations with GPS coordinates, real-time bike availability, and empty dock counts. Data is updated in near real-time from each system's official feed. Perfect for transit apps, commute planning tools, and urban mobility dashboards. No API key needed.

Quick start: https://api.citybik.es/v2/networks

No API key needed — just make a request!

All bike networks: https://api.citybik.es/v2/networks

How to Use This API

1. List All Networks

https://api.citybik.es/v2/networks

Returns all bike share systems globally with their IDs, company names, city, and country.

2. Get Specific Network (All Stations)

https://api.citybik.es/v2/networks/citi-bike-nyc

3. Find Networks by Location

https://api.citybik.es/v2/networks?fields=id,name,location

4. JavaScript — Nearest Station

async function nearestStation(networkId, userLat, userLng) {
  const resp = await fetch(
    `https://api.citybik.es/v2/networks/${networkId}`
  );
  const data = await resp.json();
  const stations = data.network.stations;
  
  let closest = null, minDist = Infinity;
  for (const s of stations) {
    if (s.free_bikes > 0) {
      const d = Math.hypot(s.latitude - userLat, s.longitude - userLng);
      if (d < minDist) { minDist = d; closest = s; }
    }
  }
  
  if (closest) {
    console.log(`Nearest: ${closest.name}`);
    console.log(`Bikes available: ${closest.free_bikes}`);
    console.log(`Empty docks: ${closest.empty_slots}`);
  }
}

nearestStation('citi-bike-nyc', 40.7580, -73.9855);

5. Python — Available Bikes in a City

import requests

def get_bike_availability(network):
    url = f'https://api.citybik.es/v2/networks/{network}'
    data = requests.get(url).json()
    stations = data['network']['stations']
    
    total_bikes = sum(s['free_bikes'] for s in stations)
    total_docks = sum(s['empty_slots'] or 0 for s in stations)
    
    print(f"Network: {data['network']['name']}")
    print(f"Stations: {len(stations)}")
    print(f"Total available bikes: {total_bikes}")
    print(f"Total empty docks: {total_docks}")

get_bike_availability('velib')

Frequently Asked Questions

Which cities are supported?
Hundreds of cities across North America, Europe, Asia, Australia, and South America. Major systems include Citi Bike (NYC), Vélib' (Paris), Santander Cycles (London), BIXI (Montreal), and many more.
Do I need an API key?
No. City Bikes is completely open and requires no authentication.
How often is data updated?
Update frequency depends on the underlying system, but most networks push updates every 1-5 minutes. The API reflects whatever each network's real-time feed provides.
What data is available per station?
Station name, GPS coordinates (latitude/longitude), number of available bikes, number of empty docks, and station status (active/closed).
Can I add my city's bike share system?
City Bikes is open source. If your city's system uses the GBFS standard, you can contribute by submitting a pull request to add the feed URL.
What is GBFS?
The General Bikeshare Feed Specification — an open data standard for real-time bike share information adopted by most major systems worldwide. City Bikes aggregates GBFS-compatible feeds.

API Details

API URL
https://api.citybik.es/v2/
Documentation
api.citybik.es
Category
Transportation
Authentication
Not Required
Geographic Coverage
Global — 600+ cities worldwide

What You Can Build