# ViaMichelin Scraper — Routes, Tolls & Fuel (`reventadata/viamichelin-scraper`) Actor

Route alternatives between any two places with distance, drive time, toll-gate costs, vignettes, fuel cost, CO2 and turn-by-turn roadsheet. Uses ViaMichelin route engine for France and Europe. Motorcycle tolls and Swiss vignettes included.

- **URL**: https://apify.com/reventadata/viamichelin-scraper.md
- **Developed by:** [reventadata](https://apify.com/reventadata) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 routes

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

## ViaMichelin Scraper — Routes, Tolls & Fuel

> **Unofficial.** This Actor is not affiliated with, authorised by, endorsed by,
> or in any way officially connected to ViaMichelin or the Michelin group.
> "ViaMichelin" is a trademark of its respective owner and is used here only to
> describe what this tool reads.

Route alternatives between any two places with **distance, drive time,
per-gate toll costs, vignettes, fuel cost, CO₂ and optional turn-by-turn
steps** — the full trip-cost picture for France and Europe in one call.

### Input

| Field | What it does |
|---|---|
| `routes` | `"Paris -> Lyon"`, or `"Paris -> Dijon -> Lyon"` with via-stops. Objects `{origin, destination, waypoints[]}` work too. `"48.85,2.35"` literals skip georesolve. |
| `mode` | `CAR`, `MOTORCYCLE` (reduced tolls), `BIKE`, `WALK`. |
| `constraint` | `NONE`, `NO_TOLL`, `NO_MOTORWAY`, `NO_VIGNETTE`, `NO_FERRY`, `NO_BORDER_CROSSING`, `NO_LOW_EMISSION_ZONE`. |
| `currency` | Cost currency, e.g. `eur`, `chf`, `gbp`. |
| `fuelPrice` | Optional €/L override. Omit for ViaMichelin's pump price. |
| `includeRoadsheet` | Turn-by-turn steps per alternative (extra requests, off by default). |
| `maxItems` | Row cap. |

No departure-time scheduling: the engine prices live traffic only.

### Output

One row per route alternative:

```json
{
  "origin": "Paris",
  "destination": "Lyon",
  "mode": "CAR",
  "routeLabel": "A6",
  "routeTypes": ["SHORTEST", "QUICKEST", "ECOLOGICAL"],
  "distanceKm": 463,
  "durationMin": 283.6,
  "tollCost": 41.3,
  "fuelCost": 59.56,
  "vignetteCost": 0,
  "totalCost": 100.86,
  "currency": "EUR",
  "tollGates": [{"name": "Villefranche-Limas", "amount": 41.3, "currency": "EUR"}],
  "co2kg": 66,
  "url": "https://www.viamichelin.fr/itineraires/resultats?from=Paris&to=Lyon&travelMode=CAR&tripConstraint=NONE"
}
```

(Sample from a real Paris → Lyon run, 2026-09-22.)

### FAQ

**Does it cover vignettes (Switzerland, Austria)?** Yes — e.g. Lyon → Geneva
returns the €44.50 "Vignette suisse" with its validity rule.

**Motorcycle tolls?** Yes, the engine discounts them (Paris → Lyon €24.80 vs
€41.30 by car, measured).

**Electric vehicles?** Yes — set `vehicle` to e.g. Tesla Model 3 with
`initialCharge`; rows carry kWh, charge cost and recharge stops. The energy
price input doubles as EUR/kWh for electrics.

**How fresh are toll prices?** Unknown to this Actor: costs are the engine's
live answers at run time, and the measured responses expose no tariff-version
field. `scrapedAt` records when each row was priced.

# Actor input Schema

## `routes` (type: `array`):

Origin/destination pairs to route. Strings accept place names (georesolved via ViaMichelin) or 'lat,lng'. Objects accept {origin, destination, waypoints\[]} with the same value shapes; waypoints are intermediate stops in order.

## `mode` (type: `string`):

Vehicle mode for every route: CAR, MOTORCYCLE, BIKE or WALK. Toll and fuel costs apply to motor modes only.

## `constraint` (type: `string`):

Passing preference applied to every route, e.g. NO\_TOLL returns toll-free alternatives. All values are accepted by the engine; on routes where a constraint cannot apply the result matches NONE.

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

ISO currency code for all cost fields, e.g. eur, usd, gbp, chf.

## `fuelPrice` (type: `number`):

Optional energy price in the selected currency: EUR per litre for fuel vehicles, EUR per kWh for electrics (measured: the engine multiplies kWh by this rate). Omit for ViaMichelin's default pump price.

## `vehicle` (type: `string`):

Optional vehicle by brand and model, e.g. Tesla Model 3. Resolved through the engine catalog; the top match's first motorization is used. Electric vehicles enable charge levels, consumption and charge stops. Omit for the default petrol car.

## `initialCharge` (type: `integer`):

Battery charge at departure, 0-100. Sent only when the resolved vehicle is electric; ignored otherwise with a warning.

## `withCaravan` (type: `boolean`):

When true, costs, duration and consumption adapt to towing. The route itself is unchanged.

## `includeRoadsheet` (type: `boolean`):

When true, fetches turn-by-turn steps per route alternative (one extra request per route). Off by default to keep runs cheap.

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

Maximum route-alternative rows to push to the dataset. Low prefill keeps the daily auto-test inside its time budget.

## Actor input object example

```json
{
  "routes": [
    "Paris -> Lyon"
  ],
  "mode": "CAR",
  "constraint": "NONE",
  "currency": "eur",
  "withCaravan": false,
  "includeRoadsheet": false,
  "maxItems": 10
}
```

# Actor output Schema

## `routes` (type: `string`):

Route alternatives: distance, duration, toll gates, vignettes, fuel and total cost.

# 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 = {
    "routes": [
        "Paris -> Lyon"
    ],
    "mode": "CAR",
    "constraint": "NONE",
    "currency": "eur",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("reventadata/viamichelin-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 = {
    "routes": ["Paris -> Lyon"],
    "mode": "CAR",
    "constraint": "NONE",
    "currency": "eur",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("reventadata/viamichelin-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 '{
  "routes": [
    "Paris -> Lyon"
  ],
  "mode": "CAR",
  "constraint": "NONE",
  "currency": "eur",
  "maxItems": 10
}' |
apify call reventadata/viamichelin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,reventadata/viamichelin-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/j7zcpkrdBxy6ugnA6/builds/YFaRihU2MmdUaCyrp/openapi.json
