# redBus All-in-One API (`romy/redbus-all-in-one-api`) Actor

Unofficial always-on REST API for live redBus data: bus search, boarding/drop points, seat layout with per-seat pricing, reviews, amenities, and Things-To-Do cross-sell activities. Works across every redBus market (India, Indonesia, Peru, more). No account needed. Runs in Apify Standby.

- **URL**: https://apify.com/romy/redbus-all-in-one-api.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** Travel
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.90 / 1,000 cities returneds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

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

### What does redBus All-in-One API do?

**redBus All-in-One API** is a REST endpoint for live redBus data — bus search, boarding/drop points, full seat layout with per-seat pricing, reviews, amenities reference, and Things-To-Do cross-sell activities — across every redBus market (India, Indonesia, Singapore, Malaysia, Peru, Colombia, Cambodia, Vietnam, and more). All from a single always-on API powered by [Apify Standby](https://docs.apify.com/platform/actors/development/programming-interface/standby).

It talks directly to the same API the official [redBus](https://www.redbus.in/) Android app uses. No redBus account, no API key — call the endpoint, get JSON back.

### Why use redBus All-in-One API?

- **Genuinely multi-region from one base URL** — confirmed live across India, Indonesia, and Peru: the same endpoint, just a `country`/`countryName` header pair, returns that market's own locations and search results
- **No anti-bot wall on the core search path** — confirmed live, no CAPTCHA/WAF challenge on search, boarding points, amenities, reviews, or seat layout
- **Rich search results, not a thin stub** — each `/search` result already embeds amenities (ids), a parseable cancellation-policy rule string, live seat-availability counts, ratings, and fare, so most use cases need no further call at all
- **Full seat map with real per-seat pricing** — not just "available/unavailable", the exact fare breakdown (base fare, GST, convenience fee, ...) per seat
- **Always-on** — Standby mode means no cold start, responds in milliseconds
- **No account needed** — every endpoint works fully anonymously
- **Use cases:** fare/availability monitoring, route-price comparison, travel-content aggregation, review analysis

### Endpoints

| Method | Path                | Description                                                        |
| ------ | ------------------- | ------------------------------------------------------------------- |
| `GET`  | `/cities`           | Full location catalogue for a country (cities, areas, ferry ports)  |
| `GET`  | `/search`           | Bus search between two locations for a date                         |
| `GET`  | `/boarding-points`  | Boarding/dropping point name, address, time for one or more routes  |
| `GET`  | `/amenities`        | Static amenity id/name reference list (WIFI, charging point, ...)   |
| `GET`  | `/reviews`          | Reviews for one bus                                                  |
| `GET`  | `/seat-layout`      | Full seat map with per-seat pricing                                  |
| `GET`  | `/activities`       | Things-To-Do cross-sell activities in a city                         |

### How to use redBus All-in-One API

1. Open this Actor's Standby API URL (shown on the Actor's page, under the API tab).
2. Call any endpoint — for example:
   ```bash
   curl "https://romy--redbus-all-in-one-api.apify.actor/cities?country=IN&countryName=IND"
   curl "https://romy--redbus-all-in-one-api.apify.actor/search?sourceId=122&destinationId=124&doj=2026-12-04&sourceName=Bangalore&destinationName=Chennai"
   curl "https://romy--redbus-all-in-one-api.apify.actor/boarding-points?sourceId=122&destinationId=124&doj=2026-12-04&routeIds=50340027"
   curl "https://romy--redbus-all-in-one-api.apify.actor/amenities"
   curl "https://romy--redbus-all-in-one-api.apify.actor/reviews?busTypeId=1302&operatorId=23264"
   curl "https://romy--redbus-all-in-one-api.apify.actor/seat-layout?routeId=50340027&doj=2026-12-04&operatorId=23264"
   curl "https://romy--redbus-all-in-one-api.apify.actor/activities?cityId=122"
   # Indonesia, a different market, same endpoint:
   curl "https://romy--redbus-all-in-one-api.apify.actor/cities?country=ID&countryName=IDN"
   # Peru:
   curl "https://romy--redbus-all-in-one-api.apify.actor/search?sourceId=195105&destinationId=195106&doj=2026-12-04&sourceName=Lima&destinationName=Arequipa&country=PE&countryName=PER&currency=PEN"
   ```
   Every call needs your Apify API token, either as `Authorization: Bearer <token>` or `?token=<token>` — the Actor's page API tab has a ready-to-copy version with your token filled in.
3. Read the JSON response — no setup required.

### Parameters

**`GET /cities`**

| Param         | Type   | Default | Meaning                                                              |
| ------------- | ------ | ------- | ---------------------------------------------------------------------- |
| `country`     | string | `IN`    | ISO 3166-1 alpha-2 — `IN`, `ID`, `SG`, `MY`, `PE`, `CO`, `KH`, `VN`     |
| `countryName` | string | `IND`   | 3-letter code redBus itself uses — `IND`, `IDN`, `SGP`, `MYS`, `PER`, `COL`, `KHM`, `VNM` |

**`GET /search`** — `sourceId`/`destinationId`/`doj`/`sourceName`/`destinationName` required (ids+names from `/cities`).

| Param              | Type             | Meaning                                                    |
| ------------------ | ---------------- | ------------------------------------------------------------- |
| `sourceId`         | int, required    | From `/cities`                                                 |
| `destinationId`    | int, required    | From `/cities`                                                  |
| `doj`              | string, required | Date of journey, `YYYY-MM-DD`                                   |
| `sourceName`       | string, required | Display name from `/cities` — the upstream API requires this alongside the id, confirmed live |
| `destinationName`  | string, required | See `sourceName`                                                |
| `limit`            | int, default 20  | Results per page                                                |
| `offset`           | int, default 0   | Page offset                                                     |
| `country`/`countryName`/`currency` | string | See `/cities`; `currency` default `INR`              |

**`GET /boarding-points`** — `sourceId`/`destinationId`/`doj`/`routeIds` required.

`routeIds` is a comma-separated list (one or more `routeId` values from `/search` results) — one call returns boarding/dropping points for every route in the list, keyed by `routeId`.

**`GET /reviews`** — `busTypeId`/`operatorId` required (both from a `/search` result). A bus with no reviews yet comes back as `{"status": "DATAANOTFOUND"}` — not an error.

**`GET /seat-layout`** — `routeId`/`doj`/`operatorId` required (all from a `/search` result).

**`GET /activities`** — `cityId` required. Uses its own cityId space, separate from `/cities` — confirmed live a bus-search city id is not guaranteed to resolve here.

### Data notes

- **No account or login is required for any endpoint wrapped here.**
- **Multi-region is driven entirely by the `country`/`countryName` params on one shared endpoint**, not separate per-country URLs — confirmed live returning genuinely different, correct location/search data for India, Indonesia, and Peru.
- **`/search`'s results already carry most of what a caller needs without further calls**: an amenity id array (decode via `/amenities`), a parseable cancellation-policy rule string, a partial-cancellation flag, ratings/review count, fare, and seat-availability flags — so most use cases need no second call.
- **Every endpoint here was confirmed live with real data**, not just a 200 status: real multi-hundred-row bus inventories (operator names, bus types, fares), real boarding-point addresses and times, a real seat grid with per-seat fares, and real amenity/review payloads.

### Pricing

Pay-per-event, billed on each successful call. See the Actor's Pricing tab for current rates.

### Known limitations

- **Rail (train) search is not wrapped.** It depends on a fundamentally different, much heavier backend protocol than the rest of redBus's product, out of scope for this Actor.
- **Hotels and Metro are not wrapped — both require a real logged-in session.** Neither has a guest/anonymous path in the app's own account flow, which this Actor does not implement, by design (no login/OTP flow).
- **Ferry is not wrapped.** Its search consistently fails server-side regardless of input — most likely because Indonesia's dominant ferry operator requires an in-person/location-based flow rather than a plain online search, not just a missing parameter.
- **Things-To-Do (`/activities`) coverage is narrow.** Many cities return an empty result (no error) — it uses its own city-id space, separate from `/cities`, with no list of covered cities available ahead of time.
- This is an unofficial, reverse-engineered integration, not affiliated with or endorsed by redBus (ibibo Group / Redbus India). Behavior may change if redBus changes its API.

Found a bug or have a feature request? Use the Issues tab on this Actor's page.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `api` (type: `string`):

This Actor doesn't write to a dataset — every response is returned directly over HTTP by its Standby web server. See the README / web server OpenAPI schema (webServerSchema) for the full endpoint list and response shapes (GET /search).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/redbus-all-in-one-api").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("romy/redbus-all-in-one-api").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 '{}' |
apify call romy/redbus-all-in-one-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/redbus-all-in-one-api"
        }
    }
}
```

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/oHBERuhrrVOnN3fAx/builds/oswqkJXa2ZnIbxqgp/openapi.json
