Embed Italy transport prices (train, bus, ferry) on your travel blog. Free API access in exchange for a do-follow link to italyfare.com.
<script src="https://italyfare.com/widget.js"></script>
<div
data-italyfare-widget
data-from="rome"
data-to="florence"
data-apikey="YOUR_KEY"
></div>Send your blog URL to api@italyfare.com or visit https://italyfare.com/partner-api
Free tier: 1,000 requests/day.
GET https://italyfare.com/api/v1/partner/prices?from=rome&to=florence
X-API-Key: YOUR_KEY
Response:
{
"route": { "from": "rome", "to": "florence", "url": "https://italyfare.com/rome-to-florence" },
"results": [
{ "transport_type": "bus", "cheapest_eur": 4.99, "options": [...] },
{ "transport_type": "train", "cheapest_eur": 9.9, "options": [...] }
],
"disclaimer": "Prices are approximate and may change.",
"attribution": "Data provided by italyfare.com"
}Available routes: GET /api/v1/partner/routes (same API key required).
Required: include "Prices via italyfare.com" with a do-follow link near any widget or price table.
See the examples/ folder for React, Vue, and plain HTML implementations.