# Trenitalia Le Frecce Train Search API

> Italian train timetables and fares from Trenitalia Le Frecce: station search and journey options

- Vendor: `trenitalialefreccetrainsearcha` · version 1.0 · category Transport · tags trenitalia api, italian trains api, train timetable api, frecciarossa api, train fares api, rail search api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/trenitalialefreccetrainsearcha
- This document: https://apiclay.com/docs/trenitalialefreccetrainsearcha.md
- OpenAPI 3.1: https://apiclay.com/api/trenitalialefreccetrainsearcha/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `trenitalialefreccetrainsearcha`
- Updated: 2026-11-18

## About

## Trenitalia Le Frecce Train Search API

Search Trenitalia's Le Frecce booking engine: find stations by name to get their ids, then list the journey solutions between two stations for a date and time with departure and arrival times, duration, changes, trains (Frecciarossa, Intercity, Regionale) and the lowest available fare.

Data comes from **lefrecce.it** (https://www.lefrecce.it). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/stations?name=roma` and `/stations?name=milano` for ids, then POST `/journeys` with both ids and a time.

### Routes

#### GET `/stations` - Station search
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| name | query | string | yes | Station or city name, e.g. `roma`, `milano`. |
| limit | query | number | no | Results (default 10). |

Returns: array of `id`, `name`, `displayName`, `timezone`, `multistation`.

#### POST `/journeys` - Journey solutions
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| departureLocationId | body | number | yes | Station `id` from `/stations`. |
| arrivalLocationId | body | number | yes | Station `id` from `/stations`. |
| departureTime | body | string | yes | `YYYY-MM-DDTHH:mm:ss.000` local time. |
| adults | body | number | yes | Adult passengers. |
| children | body | number | yes | Child passengers. |
| criteria | body | object | yes | `{frecceOnly, regionalOnly, noChanges, order, limit, offset}`. |

Returns: `solutions[]` with `solution` (`departureTime`, `arrivalTime`, `duration`, `nodes[]` per train with `train.name`, `price.amount`) and `searchId`.

### Caveats

- POST `/journeys` takes a JSON body like the playground sample. Prices are what Trenitalia shows at search time; booking is not supported.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by lefrecce.it.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /stations — Station search
- Gateway: `GET https://api.apiclay.com/v1/api/trenitalialefreccetrainsearcha/stations`
- Public query params: `name` (string, required), `limit` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### POST /journeys — Journey solutions
- Gateway: `POST https://api.apiclay.com/v1/api/trenitalialefreccetrainsearcha/journeys`
- Body sample (JSON):

```json
{"departureLocationId": 830008409, "arrivalLocationId": 830001700, "departureTime": "2026-12-01T08:00:00.000", "adults": 1, "children": 0, "criteria": {"frecceOnly": false, "regionalOnly": false, "noChanges": false, "order": "DEPARTURE_DATE", "limit": 5, "offset": 0}, "advancedSearchRequest": {"bestFare": false}}
```

- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/trenitalialefreccetrainsearcha/stations?name=<name>" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
