City Bikes API v2

Transportation API · Works globally · GBFS bike share data · No API key

TL;DR

City Bikes API aggregates bike share (bicycle rental) network data from cities around the world into a unified REST API. It provides real-time station status including available bikes, empty docks, station locations, and network metadata. The API exposes a list of all networks, detailed station information per network, and supports GBFS (General Bikeshare Feed Specification) data. No API key or registration required. Over 800+ bike networks in 50+ countries are indexed, making it the most comprehensive free bike share directory available.

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

No API key needed — just make a request!

How to Use This API

1. List All Networks

Returns every bike share network indexed by City Bikes:

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

Each network includes its id, name, city, country, GPS coordinates, and the company that operates it.

2. Get Network Details (Stations)

Get all stations for a specific network. Replace {network_id} with the network's ID from step 1:

http://api.citybik.es/v2/networks/velib

Returns station-level data: station name, latitude/longitude, free bikes, empty slots, and timestamp of last update.

3. Filter by Proximity (Using Network Location)

You can filter networks near GPS coordinates client-side after fetching all networks, or use the network's location field to calculate distances. There is no server-side geo-filtering endpoint, but the lightweight response makes client-side filtering fast.

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

4. Response Format

{
  "network": {
    "id": "velib",
    "name": "V\u00e9lib' M\u00e9tropole",
    "location": {
      "city": "Paris",
      "country": "FR",
      "latitude": 48.8566,
      "longitude": 2.3522
    },
    "stations": [
      {
        "id": "station-1",
        "name": "Station Name",
        "free_bikes": 5,
        "empty_slots": 10,
        "latitude": 48.857,
        "longitude": 2.353,
        "timestamp": "2026-06-16T10:00:00Z"
      }
    ]
  }
}

5. JavaScript — Find Nearby Bikes

fetch('http://api.citybik.es/v2/networks/velib')
  .then(r => r.json())
  .then(data => {
    const stations = data.network.stations;
    const available = stations.filter(s => s.free_bikes > 0);
    console.log(`V\u00e9lib' has ${available.length} stations with bikes`);
    available.forEach(s => {
      console.log(`${s.name}: ${s.free_bikes} bikes available`);
    });
  })
  .catch(err => console.error('City Bikes error:', err));

6. Python — Station Status Check

import requests

network_id = 'bixi-montreal'
resp = requests.get(f'http://api.citybik.es/v2/networks/{network_id}')
data = resp.json()

total_bikes = sum(s['free_bikes'] for s in data['network']['stations'])
total_docks = sum(s['empty_slots'] for s in data['network']['stations'])
print(f"Bixi Montreal: {total_bikes} bikes, {total_docks} empty docks")
print(f"Total stations: {len(data['network']['stations'])}")

7. Python — Find Networks by Country

import requests

resp = requests.get('http://api.citybik.es/v2/networks')
networks = resp.json()['networks']

# Find all networks in Germany
de_networks = [n for n in networks if n['location']['country'] == 'DE']
print(f"Germany has {len(de_networks)} bike networks:")
for n in de_networks:
    print(f"  \u2022 {n['name']} ({n['location']['city']})")
Try viewing all networks: http://api.citybik.es/v2/networks

Frequently Asked Questions

Do I need an API key?
No. City Bikes API is completely free and open. No registration or API key needed. Just make HTTP requests to the endpoints.
How many networks are available?
As of 2026, City Bikes indexes over 800 bike share networks across more than 50 countries. Coverage includes major cities in Europe, North America, Asia, and Australia. The list is updated periodically as new bike share systems launch.
What is GBFS and does City Bikes support it?
GBFS (General Bikeshare Feed Specification) is a standardized data format for bike share systems. City Bikes provides its own JSON format but many underlying networks also expose raw GBFS feeds. The API format is consistent regardless of the source system.
How fresh is the data?
Each station record includes a timestamp field showing when that station's status was last updated. Most networks update every 1-5 minutes in real time. The API caches data briefly to handle load, so there may be a 30-60 second delay from the source.
Can I get historical data?
The City Bikes API only serves current/real-time data. It does not provide historical station status. If you need historical data, you would need to poll the API at regular intervals and store results yourself.
How do I find the network ID for a city?
Call /v2/networks to get all networks, then search by city name. Network IDs are typically short lowercase strings (e.g., velib, bixi-montreal, citi-bike-nyc).
Is the API suitable for production apps?
Yes, many bike share apps use City Bikes as their primary data source. For high-traffic applications, consider caching network lists (they change infrequently) and polling station data from the specific network endpoint rather than the full list.

API Details

API URL
http://api.citybik.es/v2
Documentation
api.citybik.es
Category
Transportation
Authentication
Not Required
Geographic Coverage
Global — 50+ countries, 800+ networks
Response Format
JSON (application/json)
Rate Limits
None documented — reasonable use expected

What You Can Build