# BlaBlaCar Scraper — French Carpool & Bus Trip Search (`studio-amba/blablacar-scraper`) Actor

Scrape carpool and bus trip search results from blablacar.fr — departure/arrival times, prices, driver ratings, and vehicle type for any French route and date.

- **URL**: https://apify.com/studio-amba/blablacar-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 result scrapeds

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/platform/actors/running/actors-in-store#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

## BlaBlaCar Scraper

Scrape carpool and bus trip search results from blablacar.fr for any French
route and date — departure/arrival times, prices, driver ratings, and vehicle
type, straight from the site's own search page.

### Why use this actor?

BlaBlaCar doesn't publish an open API, and its search page (and even
`robots.txt`) sits behind a DataDome anti-bot wall that blocks plain requests
and datacenter proxies. This actor gets past that and returns the trips the
site itself renders for a given departure city, arrival city, and date —
useful for price monitoring on popular French intercity routes, comparing
carpool vs. bus vs. train pricing, or feeding a fare-tracking dashboard.
Prices, schedules, and driver info are pulled directly from BlaBlaCar's own
search results, not estimated or scraped from a third party.

### How to scrape BlaBlaCar data

1. Set `fromCity` and `toCity` to French city names (e.g. `"Paris"` and
   `"Lyon"`). Plain city names work — no need to look up internal place IDs.
2. Optionally set `date` in `YYYY-MM-DD` format. Leave it blank and the actor
   picks a near-future weekday automatically (see below).
3. Run the actor. It fetches `https://www.blablacar.fr/search?fn={fromCity}&tn={toCity}&db={date}`
   through Bright Data's Web Unlocker (the only way to get past DataDome
   reliably), then reads the trip data straight out of the page's own
   embedded hydration cache — the same JSON the site's frontend uses to
   render the results you see in a browser.
4. Results land in the dataset: one row per trip, with times, price,
   duration, vehicle type, and driver info when available.

Because the data comes from the live search page, this is a snapshot at the
time of the run. Re-run on a schedule if you need price trends over time for
a route.

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fromCity` | String | No | Departure city name (default: `"Paris"`) |
| `toCity` | String | No | Arrival city name (default: `"Lyon"`) |
| `date` | String | No | Travel date, `YYYY-MM-DD`. If omitted, a near-future weekday is computed automatically |
| `maxResults` | Integer | No | Ceiling on trips returned (default: 100). See Limitations — a single search page renders roughly 10-12 trips, so this ceiling is rarely reached |
| `proxyConfiguration` | Object | No | Included for schema completeness only. Requests go through Bright Data's Web Unlocker, not Apify Proxy, so this setting has no effect |
| `brightDataApiKey` | String (secret) | Yes\* | Bright Data API key with Web Unlocker access. \*Falls back to the `BRIGHT_DATA_API_KEY` environment variable if left empty |

#### Default date logic

When `date` is not supplied, the actor computes a near-future weekday: today
plus three days, nudged forward to the next Monday if that lands on a
Saturday or Sunday. If the runtime's system clock looks broken (an invalid
date, or a year before 2020), it falls back to a hardcoded known-good date
(`2026-08-03`, a Monday) instead of trusting a clock that might be wrong.
Update that fallback date periodically as the actor ages so it stays
reasonably "near future" even in the fallback path.

### Output

Each result is one trip from the search results for the requested route and
date.

| Field | Type | Example |
|-------|------|---------|
| `fromCity` | String | `"Paris"` |
| `toCity` | String | `"Lyon"` |
| `departureTime` | String (nullable) | `"2026-08-03T07:30:00"` |
| `arrivalTime` | String (nullable) | `"2026-08-03T13:40:00"` |
| `durationMinutes` | Number (nullable) | `370` |
| `price` | Number (nullable) | `19.99` |
| `currency` | String | `"EUR"` |
| `driverName` | String (nullable) | `"Malika"` — carpool trips only |
| `driverRating` | Number (nullable) | `4.8` — carpool trips only |
| `vehicleType` | String | `"carpool"`, `"bus"`, or `"train"` |
| `seatsAvailable` | Number (nullable) | not currently exposed by the site — always `null` today, kept for forward compatibility |
| `url` | String | Search results URL this trip was found on |
| `scrapedAt` | String | `"2026-07-13T00:57:43.208Z"` |

### Example output

```json
{
    "fromCity": "Paris",
    "toCity": "Lyon",
    "departureTime": "2026-08-03T07:30:00",
    "arrivalTime": "2026-08-03T13:40:00",
    "durationMinutes": 370,
    "price": 19.99,
    "currency": "EUR",
    "driverName": null,
    "driverRating": null,
    "vehicleType": "bus",
    "seatsAvailable": null,
    "url": "https://www.blablacar.fr/search?fn=Paris&tn=Lyon&db=2026-08-03",
    "scrapedAt": "2026-07-13T00:57:43.208Z"
}
```

```json
{
    "fromCity": "Paris",
    "toCity": "Lyon",
    "departureTime": "2026-08-03T02:30:00",
    "arrivalTime": "2026-08-03T07:00:00",
    "durationMinutes": 270,
    "price": 46.49,
    "currency": "EUR",
    "driverName": "Malika",
    "driverRating": 4.8,
    "vehicleType": "carpool",
    "seatsAvailable": null,
    "url": "https://www.blablacar.fr/search?fn=Paris&tn=Lyon&db=2026-08-03",
    "scrapedAt": "2026-07-13T00:57:43.208Z"
}
```

### Cost estimate

Each run makes exactly one page fetch through Bright Data's Web Unlocker per
route+date combination (roughly 10-12 results). At standard Apify pricing on
the PAY\_PER\_EVENT model, that works out to well under **$0.05 per run** for a
single route+date query — the actual Bright Data cost is a small fraction of
a cent per request, and compute time is a few seconds.

### Limitations — read this before relying on comprehensive coverage

This is a **top rides per route and date** actor, not a comprehensive
schedule scraper:

- **No pagination.** BlaBlaCar's search page renders roughly 10-12 trips in
  the initial HTML. The rest of the route's trips load via an authenticated
  XHR call from the logged-in frontend session, which DataDome blocks from
  outside a real browser session. This actor only reads what the first page
  render includes.
- **`maxResults` is a ceiling, not a target.** The default/prefill values
  (100/20) will not be filled — expect ~10-12 items per run regardless of how
  high you set `maxResults`. That is expected, not a bug.
- **BlaBlaCar's own results mix in train partner listings.** The search
  page's default view returns a blended carpool/bus/train result set (not
  carpool+bus only, despite the endpoint being named `trip/search`). This
  actor keeps train rows in the output (`vehicleType: "train"`) rather than
  silently dropping roughly half the results to match a narrower carpool/bus
  definition — filter on `vehicleType` in the dataset if you only want
  carpool or bus rows.
- **No per-trip deep link exists** in the search results payload — BlaBlaCar
  opens ride details client-side without a stable URL per trip. The `url`
  field is the search results page URL, the same for every row in a run.
- **`seatsAvailable` and driver details are best-effort.** Driver name and
  rating are only present for carpool trips (buses and trains have no
  individual driver in the data). Remaining seat counts are not exposed
  anywhere in the search payload at all — the field is kept in the output
  schema for forward compatibility but is always `null` today.
- **Want more coverage of a route?** Run this actor once per date you care
  about (e.g. daily for the next two weeks) rather than expecting one run to
  return a full schedule.

### Related Scrapers

Other travel actors in the Studio AMBA catalog:

- [tiqets-scraper](https://apify.com/studioamba/tiqets-scraper) — attraction
  and tour tickets
- [getyourguide-scraper](https://apify.com/studioamba/getyourguide-scraper) —
  tours, activities, and experiences
- [trainline-scraper](https://apify.com/studioamba/trainline-scraper) — train
  fares and schedules across Europe
- [flixbus-scraper](https://apify.com/studioamba/flixbus-scraper) — long-haul
  bus fares and schedules

### Need this data on a schedule, or a custom version?

We run this scraper as a managed service for businesses: scheduled runs,
deduplication, delta detection, and delivery to your inbox, Google Sheets,
or API — maintenance included. We can also build a custom version with your
exact fields and filters, or combine multiple sources into one feed.

See [studioamba.dev/services](https://studioamba.dev/services/) or email
<hello@studioamba.dev> for a free data sample.
We maintain 300+ European web scrapers and answer within one business day.

# Actor input Schema

## `fromCity` (type: `string`):

Departure city name, in French (e.g. "Paris").

## `toCity` (type: `string`):

Arrival city name, in French (e.g. "Lyon").

## `date` (type: `string`):

Travel date in YYYY-MM-DD format. Leave as-is or clear it to use an automatically computed near-future weekday.

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

Maximum number of trips to return. Note: BlaBlaCar's search page renders roughly 10-12 trips per route+date in a single page load (see Limitations in the README) — this is a ceiling, not a guarantee.

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

Included for schema completeness. This actor fetches pages through Bright Data's Web Unlocker (not Apify Proxy), so this setting has no effect on the actual requests.

## `brightDataApiKey` (type: `string`):

Bright Data API key used to reach blablacar.fr through the Web Unlocker zone (required to bypass DataDome). Falls back to the BRIGHT\_DATA\_API\_KEY environment variable if left empty.

## Actor input object example

```json
{
  "fromCity": "Paris",
  "toCity": "Lyon",
  "date": "2026-08-03",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "fromCity": "Paris",
    "toCity": "Lyon",
    "date": "2026-08-03",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/blablacar-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 = {
    "fromCity": "Paris",
    "toCity": "Lyon",
    "date": "2026-08-03",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "fromCity": "Paris",
  "toCity": "Lyon",
  "date": "2026-08-03",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call studio-amba/blablacar-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=studio-amba/blablacar-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/nCL2xrWLFPhOjGNcX/builds/PKYpuNEPYIFblGRE6/openapi.json
