# CityBikes Bike Share Scraper (`parseforge/citybikes-scraper`) Actor

Scrapes bike-share networks and stations from the CityBikes API. Returns each network as a flat row with optional live station details. Filter by network ID, country, or city.

- **URL**: https://apify.com/parseforge/citybikes-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 3 total users, 1 monthly users, 90.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### CityBikes Bike Share Scraper

**Scrape global bike-share network and station data from the CityBikes API, up to a million networks per run.** Every network comes with its company, location, and station counts. Optionally include live station details. Export to CSV, JSON, Excel, or XML.

The CityBikes API aggregates real-time feeds from over 700 bike-share systems worldwide, but querying it programmatically means handling pagination and rate limits yourself. This Actor reads the public CityBikes endpoints directly, lets you target a single network by ID or filter by country and city, and returns each matching network as a clean, flat row.

| Who uses it | What they scrape CityBikes for |
|---|---|
| Urban mobility researchers | Comparing bike-share network density across cities. |
| Data journalists | Tracking the expansion or contraction of bike-share services in a region. |
| App developers | Building a dataset of station locations and network IDs for a mapping project. |
| Transportation analysts | Monitoring which operators are active in a given country. |

### What it does

This Actor collects bike-share networks and their stations from the CityBikes API and returns each network as a flat row, with optional station details.

- 🌐 **Global network list:** Fetch all available bike-share networks with their company name, city, country, and station count.
- 🎯 **Single network focus:** Provide a network ID like 'citi-bike-nyc' or 'velib' to get that network's full station list.
- 🗺️ **Country and city filters:** Narrow results to a specific country code or city name when listing networks.
- 📊 **Station details toggle:** Optionally include live station data such as free bikes, empty docks, and coordinates for each network.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with CityBikes data

**🗺️ Map all bike-share networks in a country.**

A transportation analyst runs the Actor with a country code to get every network and its station count for a national mobility report.

**🚲 Monitor a specific network's station status.**

An app developer fetches live station data for 'citi-bike-nyc' to populate a real-time availability map.

**📈 Compare bike-share coverage across cities.**

A researcher collects networks for multiple cities and compares station density and operator diversity.

**🔍 Discover new networks by city name.**

A journalist enters a partial city name to find all bike-share systems operating in that metropolitan area.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key required** | Reads the public CityBikes API with no registration or authentication. |
| **Fixed flat schema** | Every network and station row follows the same predictable structure for easy analysis. |
| **Flexible targeting** | Query one known network or discover all networks in a country or city. |
| **Built-in pagination** | Handles API pagination automatically so you get complete datasets. |

### How it compares

This Actor focuses on the CityBikes API for network and station data, while the competitor below also scrapes the same source.

| Feature | ParseForge | CityBikes Bike-Share Network & Station Scraper |
|---|---|---|
| Scrapes CityBikes API | Yes | Yes |
| Filter by country code | Yes | Not listed |
| Filter by city name | Yes | Not listed |
| Target a single network by ID | Yes | Not listed |
| Optional station details toggle | Yes | Not listed |
| Configurable max items per run | Yes | Not listed |

### Configure the run

Drive the Actor with a specific network ID, or list all networks and filter by country code and city name. The station details toggle lets you control the depth of data collected. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10
}
```

A larger pull:

```json
{
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.0065 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.65 |
| 1,000 results | $6.50 |
| 10,000 results | $65.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [CityBikes Bike Share Scraper](https://apify.com/parseforge/citybikes-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to CityBikes through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/citybikes-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your Network ID, Country Code, or City filter is spelled correctly. If you are using a Network ID, it overrides country and city filters. Try running without any filters to see all available networks.

**The run is very slow with Include Stations enabled.**

Fetching station details for every network requires an additional API call per network. To speed up the run, disable Include Stations or reduce the Maximum networks count.

**I got fewer networks than my Maximum networks setting.**

The Actor stops when it has collected the requested number of networks or when there are no more networks matching your filters. The CityBikes API has a finite list of networks.

**Some station fields are empty or null.**

The CityBikes API returns data as reported by each bike-share operator. Some operators may not provide all fields, such as empty docks or free bikes, for every station.

**The Network ID I used is not working.**

Network IDs can change. Visit the CityBikes website to confirm the current slug for your target network. The ID is case-sensitive and usually lowercase with hyphens.

### FAQ

| Question | Answer |
|---|---|
| What is the CityBikes API? | CityBikes is a free, open API that aggregates real-time data from over 700 bike-share systems worldwide. It provides network metadata and live station availability in a standardized format. |
| Do I need an API key to use this Actor? | No. The Actor reads the public CityBikes API endpoints directly. No registration, API key, or authentication is required. |
| How do I get stations for a specific network? | Set the Network ID field to the network's slug, such as 'citi-bike-nyc' or 'velib'. The Actor will fetch all stations for that network. |
| Can I filter networks by country? | Yes. Use the Country Code field with a 2-letter ISO code like 'US', 'FR', or 'DE' to return only networks in that country. |
| What does the 'Include Stations' toggle do? | When enabled, the Actor fetches station-level details for each network, including free bikes, empty docks, latitude, and longitude. This makes the run slower but richer. |
| How many networks can I scrape in one run? | You can set the Maximum networks field up to 1,000,000. The Actor will stop after collecting that many networks. |
| What format is the output data? | The Actor returns data in a flat, tabular format. You can export your dataset to CSV, JSON, Excel, or XML from the Apify platform. |
| Does this Actor get historical bike-share data? | No. The CityBikes API provides only current, real-time snapshots. This Actor captures the state of networks and stations at the moment of the run. |
| Can I search for networks by city name? | Yes. The City field accepts a partial city name and returns all networks whose city matches that string. |
| What is a network ID? | A network ID is a unique slug that identifies a bike-share system on CityBikes, like 'citi-bike-nyc' for New York's Citi Bike or 'bicing' for Barcelona's system. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by CityBikes. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `maxItems` (type: `integer`):

Maximum number of bike networks to collect per run.

## `networkId` (type: `string`):

Fetch all stations from a specific network (e.g. 'citi-bike-nyc', 'velib'). Overrides country/city filters.

## `country` (type: `string`):

Filter networks by 2-letter country code (e.g. US, FR, DE).

## `city` (type: `string`):

Filter networks by city name (partial match).

## `includeStations` (type: `boolean`):

When listing networks, also fetch station counts and details for each (slower).

## Actor input object example

```json
{
  "maxItems": 10,
  "includeStations": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/citybikes-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parseforge/citybikes-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parseforge/citybikes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/citybikes-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KzxsFgtBQJH9YTnJM/builds/aiG59Uwpg5ICdcyJM/openapi.json
