# Busbud Scraper - Bus & Train Departures and Fares (`bovi/busbud-scraper`) Actor

Scrape Busbud intercity bus and train departures for any route and date: operators, stations, times with timezones, duration, transfers, live fares with fee breakdown, seats left, amenities and booking links. No browser, no login.

- **URL**: https://apify.com/bovi/busbud-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Travel, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 97.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.75 / 1,000 busbud scraper - bus & train departures and fares

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Busbud Scraper - Bus & Train Departures and Fares

Export every bookable intercity departure that [Busbud](https://www.busbud.com) sells on a route: who runs it, when it leaves and arrives, how long it takes, how many transfers it needs, what a seat costs right now and the link to book it.

Busbud is a global marketplace for intercity coach and rail travel - Greyhound, FlixBus, Amtrak, ADO, Intercape, ALSA, National Express and hundreds more. This Actor reads the same JSON backend the Busbud website uses, over plain HTTP. No browser and no login are needed, so a run takes seconds.

### What it collects

One record per departure, sorted by departure time:

- **Route** - origin and destination city, region and country, plus the exact departure and arrival station.
- **Schedule** - departure and arrival as ISO timestamps with the local UTC offset, IANA timezones, duration in minutes and as text.
- **Transfers** - number of changes, `isDirect`, and the names of the transfer stations.
- **Live fare** - total price for your party, base fare, fees and taxes, currency, `isBookable` and the `bookableUntil` deadline.
- **Service** - operator(s), vehicle type (Bus / Train), fare class, train name and number, seats left, onboard amenities.
- **Booking link** - a Busbud deeplink that opens exactly this departure.

A busy corridor such as Boston to New York returns 100-200 departures per day.

### Input

| Field | Description |
| --- | --- |
| `startUrls` | Busbud route URLs, e.g. `https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg`. Results URLs and deeplinks work too. |
| `routeQueries` | City pairs as `Origin > Destination`, e.g. `Mexico City > Oaxaca`. Names are resolved with Busbud's city search. |
| `maxResults` | Maximum departures to save in total (default 50). |
| `departureDates` | Exact dates `YYYY-MM-DD`. Past dates and dates more than 330 days ahead are dropped. |
| `daysAhead` | When no dates are given: search the next N days starting tomorrow (default 1). |
| `currency` | Fare currency (USD, EUR, GBP, CAD, MXN, BRL, ZAR and more). |
| `adults` | Number of adult passengers; `price` is the total for all of them. |
| `directOnly` | Keep only departures without transfers. |
| `proxyConfiguration` | Optional Apify Proxy settings. |

Example input:

```json
{
  "startUrls": [{ "url": "https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg" }],
  "routeQueries": ["Mexico City > Oaxaca"],
  "daysAhead": 2,
  "currency": "USD",
  "adults": 1,
  "maxResults": 100
}
```

### Example output

A real record from a run:

```json
{
  "routeName": "Boston to New York City",
  "bookingUrl": "https://www.busbud.com/en/deeplink/drt2yz/dr5reg/eyJsZWdfaGFzaGVzIjpbImUyZDI2M2NhIl0sInJvdXRlX2lkcyI6WzM5ODk3NzQyXSwic2VhcmNoX2lkIjoiOTllYjljNjQ2YTcxY2NkY2UzMTU3OGQ5ZGY4YTY3YjRhNTg1MjQwYmUyNGRiYjFhY2NhMDMzNWMzOTc0YzdkNSIsInZlcnNpb24iOjJ9?outbound_date=2026-11-11&adults=1",
  "departureId": "8edf9571a5fcc40e515f6f5666ac6760f9a193acb610c6540e15c0c4e3a5d0d2",
  "originCity": "Boston",
  "originRegion": "Massachusetts",
  "originCountry": "United States",
  "originStation": "Boston (South Station)",
  "destinationCity": "New York City",
  "destinationRegion": "New York",
  "destinationCountry": "United States",
  "destinationStation": "NYC Midtown (31st St & 8th Ave)",
  "operator": "FlixBus",
  "departureTime": "2026-11-11T01:00:00-05:00",
  "arrivalTime": "2026-11-11T05:30:00-05:00",
  "departureDate": "2026-11-11",
  "departureTimezone": "America/New_York",
  "arrivalTimezone": "America/New_York",
  "durationMinutes": 270,
  "duration": "4h 30m",
  "transfers": 0,
  "isDirect": true,
  "price": 52.16,
  "priceCurrency": "USD",
  "basePrice": 44.99,
  "feesAndTaxes": 7.17,
  "passengers": 1,
  "availableSeats": 27,
  "isBookable": true,
  "bookableUntil": "2026-11-11T05:55:00Z",
  "vehicleType": "Bus",
  "serviceClass": "Classic",
  "serviceName": null,
  "serviceNumber": null,
  "operators": ["FlixBus"],
  "amenities": ["Wifi", "Power outlets", "AC", "Average seat", "Toilet"],
  "transferStations": [],
  "scrapedAt": "2026-11-10T06:11:02.069395Z"
}
```

`serviceName` and `serviceNumber` are filled for trains (for example `Northeast Regional`, `171`); `availableSeats` is empty when the operator does not publish seat counts.

### Pricing

Pay per result: you pay only for departures saved to the dataset, about **$0.005 per result ($5 per 1,000 departures)**. Check the Pricing tab for the current rate. Use `maxResults` to cap the cost of a run.

### Use cases

- Monitor competitor fares, schedules and seat availability on your corridors.
- Build a route database with real timetables and prices.
- Track how fares move as the travel date approaches.
- Compare bus and rail options between two cities.

### Notes

- Fares are live and change quickly; `scrapedAt` records when each search ran.
- Busbud sells about 11 months ahead, so dates beyond 330 days are skipped.
- Fare classes of the same train come as separate records that share a `departureId`.

# Actor input Schema

## `startUrls` (type: `array`):

Busbud route pages, for example https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg. Search result URLs (/bus-schedules-results/<from>/<to>) and departure deeplinks (/deeplink/<from>/<to>/...) work too.

## `routeQueries` (type: `array`):

Routes written as "Origin > Destination", for example "Mexico City > Oaxaca" or "Johannesburg > Cape Town". Each name is resolved against Busbud's own city index.

## `maxResults` (type: `integer`):

Maximum number of departures to save across all routes and dates.

## `departureDates` (type: `array`):

Exact departure dates in YYYY-MM-DD, for example 2026-12-24. Leave empty to use 'Days ahead' instead. Dates in the past or more than 330 days ahead are dropped with a log message.

## `daysAhead` (type: `integer`):

Used only when no exact travel dates are given: search the next N days starting tomorrow (one search per route per day).

## `currency` (type: `string`):

Currency Busbud quotes the fares in.

## `adults` (type: `integer`):

Number of adults the fare is priced for. The price field is the total for the whole party.

## `directOnly` (type: `boolean`):

Skip journeys that need a transfer.

## `proxyConfiguration` (type: `object`):

Optional. Busbud's backend usually answers without a proxy; switch Apify Proxy on if your runs get blocked.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg"
    }
  ],
  "maxResults": 50,
  "daysAhead": 1,
  "currency": "USD",
  "adults": 1,
  "directOnly": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with one record per departure.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/busbud-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 = {
    "startUrls": [{ "url": "https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/busbud-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 '{
  "startUrls": [
    {
      "url": "https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/busbud-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/busbud-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/8DtZfjwlQS1akJuxr/builds/HfMuPBnylGcPhU7YO/openapi.json
