# redBus API Scraper (`rl1987/redbus-api-scraper`) Actor

Search redBus for bus services between two cities on a date (read-only). Returns operator, bus type, times, duration, fares, seats, rating, reviews and boarding/dropping points.

- **URL**: https://apify.com/rl1987/redbus-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 bus service rows

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## redBus Scraper 🗂️ — Scrape redBus.com Route ID, Operator, Bus type, Service

**redBus Scraper** — Search redBus for bus services between two cities on a date (read-only). Returns operator, bus type, times, duration, fares, seats, rating, reviews and boarding/dropping points. It reads redBus's own API directly, so it's **fast, reliable and complete** — no flaky HTML parsing, no headless browser. Export to **JSON, CSV, Excel, or an API**.

***

### ✨ Why use this redBus Scraper?

- 🟢 **No code required** — set your input, click **Start**, download your data.
- ⚡ **Fast & accurate** — reads redBus's own private API and returns structured JSON, not scraped HTML.
- 🧾 **Rich, structured data** — every field below, clean and ready to use.
- 🔁 **Full pagination** — collects results to your `maxItems` cap.
- 💸 **Transparent pay-per-result pricing** — pay only for the rows you get.
- 📤 **Export anywhere** — JSON, CSV, Excel, XML, or pull it live via the Apify API.

***

### 🎯 What can you do with redBus data?

- **Market & competitor research** — analyse redBus records at scale.
- **Price & availability monitoring** — track changes over time.
- **Data science & trend analysis** — build clean datasets.
- **Lead generation & enrichment** — feed redBus data into your own tools.

***

### 📥 What data does the redBus Scraper extract?

Each row includes: `id`, `travelsName`, `busType`, `serviceName`, `departureTime`, `arrivalTime`, `journeyDurationMin`, `dateOfJourney`, `minFare`, `maxFare`, `availableSeats`, `totalSeats`, `rating`, `numberOfReviews` …and more. See the full **Data table** below.

***

### 🚀 How to scrape redBus.com (3 steps)

1. **Set your input** — provide `source` or `destination` (see the table below; defaults work out of the box).
2. **Pick options** — filters, a `proxyConfiguration`, and a `maxItems` cap.
3. **Run & export** — click **Start**, then download the dataset as JSON/CSV/Excel or fetch it via the API.

***

### ⚙️ Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `source` | string | `Bengaluru` | City you are travelling from (e.g. Bengaluru). Resolved via the app's own autocomplete. |
| `destination` | string | `Chennai` | City you are travelling to (e.g. Chennai). Resolved via the app's own autocomplete. |
| `dateOfJourney` | string | `2026-08-25` | Travel date in YYYY-MM-DD format. |
| `pageSize` | integer | `20` | Number of services per request (max 100). |
| `maxItems` | integer | `100` | Maximum number of bus services to return (0 = all). |
| `proxyConfiguration` | object | Apify Proxy | Route requests through a proxy (Apify Proxy by default). |

#### Example input

```jsonc
{
  "source": "Bengaluru",
  "destination": "Chennai",
  "dateOfJourney": "2026-08-25",
  "pageSize": 20,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

***

### 📤 Output

Each result is a JSON object like this:

```jsonc
{
  "id": 47150520,
  "travelsName": "SABARI TRAVELS",
  "busType": "Bharat Benz A/C Sleeper (2+1)",
  "serviceName": "BGL - CHE  ",
  "departureTime": "2026-08-25 23:40:00",
  "arrivalTime": "2026-08-26 06:00:00",
  "journeyDurationMin": 380,
  "dateOfJourney": "2026-08-25",
  "minFare": 2089.0,
  "maxFare": 2639.0,
  "availableSeats": 24,
  "totalSeats": 37,
  "rating": 4.9,
  "numberOfReviews": "1275",
  "boardingPoint": "Madiwala",
  "droppingPoint": "Koyambedu",
  "source": "Bengaluru",
  "destination": "Chennai"
}
```

***

### 🧾 Data table

| Field | Type | Description |
| --- | --- | --- |
| `id` | number | Route ID |
| `travelsName` | text | Operator |
| `busType` | text | Bus type |
| `serviceName` | text | Service |
| `departureTime` | text | Departure |
| `arrivalTime` | text | Arrival |
| `journeyDurationMin` | number | Duration (min) |
| `dateOfJourney` | text | Date |
| `minFare` | number | Min fare |
| `maxFare` | number | Max fare |
| `availableSeats` | number | Seats available |
| `totalSeats` | number | Total seats |
| `rating` | number | Rating |
| `numberOfReviews` | number | Reviews |
| `boardingPoint` | text | Boarding point |
| `droppingPoint` | text | Dropping point |
| `source` | text | From |
| `destination` | text | To |

***

### 💰 Pricing — pay per result

This actor uses **pay-per-event** pricing: you pay only for the rows it delivers.

| You scrape | Price |
| --- | --- |
| **Bus service row** | **$1.00 per 1,000 rows** |

***

### 🔌 Use the redBus Scraper via API

Run it programmatically with the [Apify API](https://docs.apify.com/api/v2):

```bash
curl -X POST "https://api.apify.com/v2/acts/redbus-api-scraper/runs?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "source": "Bengaluru",
  "destination": "Chennai",
  "dateOfJourney": "2026-08-25",
  "pageSize": 20,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}'
```

Or with the Apify CLI: `apify call redbus-api-scraper -i input.json -o`.

***

### ❓ FAQ

**Do I need an account or API key for redBus?**

No. The actor talks to redBus's public/mobile API for you — you only need an Apify account.

**Do I need a proxy?**

A proxy is recommended for reliable runs; set `proxyConfiguration` (Residential is safest for geo-restricted or bot-protected sites).

**What export formats are supported?**

JSON, CSV, Excel, XML, JSONL, RSS, or live via the Apify API and dataset endpoints.

**Is scraping this legal?**

You are responsible for how you use the data. Scrape only public record data and comply with redBus.com's Terms and applicable law (e.g. GDPR/CCPA for personal data).

***

### 🛠️ How it works

The actor impersonates redBus's official app/site and calls its private API the same way the app does, then normalises each response into the flat record above. No browser, no HTML scraping — just clean, structured data.

***

### 📌 Good to know

- Scrape only public record data and respect redBus.com's Terms of Service and robots policy.
- For personal data, comply with GDPR/CCPA and applicable law — you are the data controller.
- Fields can be `null` when redBus doesn't expose them for a given record.

***

### ⭐ Found this useful?

Give the **redBus Scraper** a star on Apify and check out my other `apify-*-api-scraper` actors.

# Actor input Schema

## `source` (type: `string`):

City you are travelling from (e.g. Bengaluru). Resolved via the app's own autocomplete.

## `destination` (type: `string`):

City you are travelling to (e.g. Chennai). Resolved via the app's own autocomplete.

## `dateOfJourney` (type: `string`):

Travel date. Pick a date (YYYY-MM-DD) or use a relative value like "7 days" / "2 weeks". Leave empty for a week from today. redBus rejects past dates with an HTTP 200 error body rather than a 4xx, so a past date is normalised forward instead of silently returning nothing.

## `pageSize` (type: `integer`):

Number of services per request (max 100).

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

Maximum number of bus services to return (0 = all).

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

Which redBus market to search. City names and prices are market-specific: fares come back in that market's own currency (INR, SGD, MYR, IDR, VND, USD, COP, PEN).

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

Route requests through a proxy (Apify Proxy by default).

## Actor input object example

```json
{
  "source": "Bengaluru",
  "destination": "Chennai",
  "pageSize": 20,
  "maxItems": 100,
  "country": "india",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "source": "Bengaluru",
    "destination": "Chennai",
    "dateOfJourney": "",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/redbus-api-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 = {
    "source": "Bengaluru",
    "destination": "Chennai",
    "dateOfJourney": "",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/redbus-api-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 '{
  "source": "Bengaluru",
  "destination": "Chennai",
  "dateOfJourney": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rl1987/redbus-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/redbus-api-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/CTo6fbx8UwpCCPjgZ/builds/ezJpxnle92dyrvnSf/openapi.json
