Traghettilines APItraghettilines.it ↗
Query the traghettilines.it catalog of Italian ferry routes and get per-sailing ticket prices, operator details, and departure times for any date.
What is the Traghettilines API?
The Traghettilines.it API covers two endpoints that expose the site's full catalog of roughly 1,900 bookable ferry routes and per-sailing price quotes. Use list_routes to discover port-to-port connections filtered by departure or arrival port name, then pass the returned route_id to search_prices to retrieve operator names, ship details, sailing times, duration, and ticket prices broken down by passenger category for a specific date.
curl -X GET 'https://api.parse.bot/scraper/2b0460d3-e616-4e01-a5a4-be8ca5ad4f5d/list_routes?arrival_port=Olbia&departure_port=Livorno' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace traghettilines-it-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: find ferry routes from Livorno and compare sailing prices."""
from parse_apis.traghettilines_it_api import TraghettiLines, RouteNotFound
client = TraghettiLines()
# Browse routes departing from Livorno
for route in client.routes.list(departure_port="Livorno", limit=5):
print(route.departure_port, "→", route.arrival_port, f"(route {route.route_id})")
# Pick the first matching route and search prices for a specific date
route = client.routes.list(departure_port="Livorno", arrival_port="Olbia", limit=1).first()
if route is not None:
try:
result = route.search_prices(date="2026-10-26", adults=2)
except RouteNotFound:
print("Route no longer available")
else:
print(f"{result.route.departure_port} → {result.route.arrival_port} on {result.date}")
print(f"{result.total_sailings} sailing(s), truncated={result.truncated}")
if result.notice:
print("Notice:", result.notice)
# Compare sailings by price and operator
if result.sailings:
for sailing in result.sailings:
print(
sailing.company, sailing.ship,
sailing.departure_time, "→", sailing.arrival_time,
f"({sailing.duration})",
f"from €{sailing.lowest_price_eur}" if sailing.lowest_price_eur is not None else "no price",
)
# Show quoted accommodation options
for acc in sailing.accommodations:
print(f" {acc.description}: €{acc.price_eur} ({acc.fare})")
print("exercised: routes.list / search_prices / sailings / accommodations")
Returns the catalog of bookable ferry routes (port-to-port, one direction each), optionally narrowed by a case-insensitive substring match on the departure and/or arrival port name or its area label (e.g. 'livorno', 'sardegna'). One upstream request; the full catalog is about 1,900 routes, so filtering is recommended. route_id is the identifier accepted by search_prices. An empty routes list is a valid result when no route matches the filters.
| Param | Type | Description |
|---|---|---|
| arrival_port | string | Substring to match against the arrival port name or area (case-insensitive). Omitted = no arrival filter. |
| departure_port | string | Substring to match against the departure port name or area (case-insensitive). Omitted = no departure filter. |
{
"type": "object",
"fields": {
"total": "number of routes returned after filtering",
"routes": "array of route records: route_id (string, use with search_prices), departure_port, departure_area, arrival_port, arrival_area, destination_id, destination_name",
"catalog_total": "number of routes in the site's full catalog before filtering"
},
"sample": {
"data": {
"total": 1,
"routes": [
{
"route_id": "57",
"arrival_area": "Sardegna",
"arrival_port": "Olbia",
"departure_area": "Centro Italia",
"departure_port": "Livorno",
"destination_id": 1,
"destination_name": "Sardegna"
}
],
"catalog_total": 1895
},
"status": "success"
}
}About the Traghettilines API
Route Discovery with list_routes
The list_routes endpoint returns the full catalog of bookable ferry routes indexed on traghettilines.it, with each record containing a route_id, departure_port, departure_area, arrival_port, and arrival_area. The catalog holds approximately 1,900 routes before any filtering. Two optional parameters — departure_port and arrival_port — accept case-insensitive substrings matched against the port name or its area label, so queries like 'livorno' or 'sardegna' work equally well. The response includes a catalog_total field showing the unfiltered catalog size alongside the total count after your filters are applied.
Sailing Schedules and Fares with search_prices
search_prices requires a route_id (from list_routes) and an ISO date string. It returns a sailings array where each entry includes the operating company, ship name, departure_time and arrival_time in local HH:MM format, crossing duration, a boarding_note, and quoted fares. Prices are calculated across three default accommodation categories — deck passage, reclining seat, and cabin — or you can pass an accommodation_code taken from a previous response's accommodations[*].code to price a single category exclusively. Passenger composition is controlled by five optional integer fields: adults (27–59), senior (60+), young (12–26), children (up to 11), and pets (0–9). The response echoes back the passengers object used for the quote so results are unambiguous.
Response Signals Worth Noting
When no sailings operate on the requested date, the notice field carries the site's own availability message rather than returning an empty array silently. The truncated flag indicates when the site lists more sailings than were priced in the response, and total_sailings gives the full count so you know whether to adjust your query. The route object embedded in the search_prices response mirrors the shape of list_routes.routes[*], which makes it straightforward to correlate results without a second lookup.
The Traghettilines API is a managed, monitored endpoint for traghettilines.it — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when traghettilines.it changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official traghettilines.it API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a fare-alert tool that polls
search_pricesdaily for a savedroute_idand notifies users when the lowest deck-passage price drops. - Generate a route map of Italian ferry connections by visualising
departure_areaandarrival_areafields fromlist_routes. - Compare crossing durations across operators on the same route and date using the
durationandcompanyfields insailings. - Price a family itinerary by passing specific
adults,children, andseniorcounts tosearch_pricesfor multiple routes. - Filter the catalog to all routes departing from Sardinia by passing
'sardegna'asdeparture_porttolist_routes. - Track accommodation availability for a specific cabin tier by supplying an
accommodation_codefrom a prior response to narrow the quote.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does traghettilines.it offer an official developer API?+
What does the `notice` field in `search_prices` mean?+
notice field contains the site's own explanatory message. When sailings are found, notice is null. Checking this field before iterating the sailings array avoids treating an empty array as an unexpected error.Can I retrieve round-trip pricing in a single call?+
search_prices call covers one direction on one date. Round-trip itineraries require two separate calls, one for each direction using the appropriate route_id for each leg. You can fork this API on Parse and revise it to add a combined round-trip endpoint.Does the API return seat-map or real-time cabin availability?+
How current is the route catalog returned by `list_routes`?+
search_prices. The catalog_total field lets you verify the full catalog size at query time.