Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: ProofPrice Public transport fares (posted fare tables) API
termsOfService: https://proofprice.com/terms
contact:
name: ProofPrice
email: hello@proofprice.com
url: https://proofprice.com
license:
name: ProofPrice terms of use
url: https://proofprice.com/terms
x-logo:
url: https://proofprice.com/icon-512.png
version: 0.4.0
description: 'What did people actually pay for X, here, recently? Returns a price range from official open data: median, 10th–90th percentile, sample size, period, confidence, source and licence. Aggregates only; never individual records. The data keeps each source''s own licence: every answer names its source, that source''s licence and the attribution line to show, so reuse follows the publisher''s licence. The ProofPrice terms of use govern use of the API itself. Free, read-only, no API key. A few premium calls (price check, daily history) cost a few cents each after a free daily allowance, paid per call with x402; see https://proofprice.com/pricing and https://proofprice.com/pricing.json.'
servers:
- url: https://proofprice.com
tags:
- name: Public transport fares (posted fare tables)
description: 'Public transport fares: AU, CZ, ES, FR, GB, HK, IE, SG and TW. Sources: Opal card fare values by mode and distance band, Transport for NSW, Prague Integrated Transport (PID) posted fares, CNMC average monthly high-speed rail fare by route and operator (Madrid to Barcelona, Valencia, Alicante, Málaga, Sevilla), Île-de-France Mobilités posted fares: single tickets and Navigo passes, London Underground fares between stations (Transport for London, Unified API), MTR fares between stations (MTR Corporation open data), Irish taxi maximum fares (Taxi Regulation (Maximum Fares) Order 2024, S.I. No. 479/2024), MRT and LRT card fares by distance, Public Transport Council fare table, Trunk bus fares by distance, Public Transport Council fare table, Taipei Metro fares between stations (Taipei Rapid Transit Corporation open data) and Taiwan Railway (TRA) train fares between stations (Taiwan Railway Corporation open data).'
paths:
/api/v1/transport-fares:
get:
operationId: transportFares
tags:
- Public transport fares (posted fare tables)
summary: Public transport fares (posted fare tables) (AU, CZ, ES, FR, GB, HK, IE, SG and…
description: 'Use this when a user asks what a public transport journey costs under the published fare table, for example a metro ride of a given distance for an adult, senior or student, in Sydney and NSW (Opal) (country AU), Prague (country CZ), Spain high-speed rail (country ES), Paris region (country FR), London (Underground) (country GB), Hong Kong (MTR) (country HK), Ireland (taxi maximum fares) (country IE), Singapore (country SG), Singapore buses (country SG), Taiwan (Taipei Metro) (country TW) or Taiwan Railway (country TW). Returns the posted fare for the journey with the fare group, distance band and time band, the period, and the official source and licence. These are posted fares set by the operator or regulator, the same for everyone in a fare group, not amounts paid by individuals and not a ticket or a quote; there is no sample size and no range. How fresh: Sydney and NSW (Opal): updated when fares change (yearly, around 1 July); the table read 3 Nov 2026 carried the fares effective from 29 June 2026; Prague: the feed is rebuilt daily by the publisher; fares change only when the tariff changes; Spain high-speed rail: monthly series, published quarterly by CNMC (newest month read on 31 Oct 2026: June 2026); Paris region: updated by the publisher when fares change (the list read 29 Oct 2026 had been modified on 28 Oct 2026); London (Underground): updated by TfL when fares change (the annual change takes effect in March; the table read on 9 Nov 2026 runs 1 Nov 2026 to 1 Nov 2027); Hong Kong (MTR): updated by the MTR Corporation when fares change; the file read on 5 Nov 2026 was last modified 2 Apr 2026; Ireland (taxi maximum fares): fixed by statutory instrument; in operation from 1 December 2024 and unchanged until the National Transport Authority makes a new Order; Singapore: updated when fares change (yearly fare review; the table read 29 Oct 2026 carried the fares effective from 27 Dec 2025); Singapore buses: updated when fares change (yearly fare review; the table read 5 Nov 2026 carried the fares effective from 27 Dec 2025); Taiwan (Taipei Metro): irregular: updated by the operator when fares change; the file name carries its date; Taiwan Railway: irregular: updated by the operator when fares change (the dataset page shows ''last modified''); collected into our price library every day. Do not use for taxis or ride-hailing, flights, fuel, a personal quote or passes, or for countries that are not listed.'
parameters:
- name: country
in: query
required: true
description: 'AU = Australia (New South Wales only: Opal card fares for Sydney, Newcastle, Central Coast, Illawarra and the Blue Mountains from Transport for NSW, AUD, a posted tariff); CZ = Czechia (Prague and the PID region only: the posted adult single ticket from the PID open fare table, CZK, a posted tariff); ES = Spain (high-speed rail from Madrid to Barcelona, Valencia, Alicante, Málaga or Sevilla: CNMC''s monthly average posted web fare per operator, EUR; a posted fare, not tickets sold); FR = France (Île-de-France only: the Paris region single ticket and Navigo-type passes from the Île-de-France Mobilités tariff list, EUR, a posted tariff); GB = London Underground only (Transport for London posted adult fares between 20 central and main stations, GBP; buses, DLR, Elizabeth line, National Rail and the rest of Britain are not included); HK = Hong Kong (MTR train fares between two stations from the MTR Corporation''s open data, HKD, a posted tariff; Airport Express, Light Rail and MTR Bus not included); IE = Ireland (taxi MAXIMUM metered fare for a journey distance, from the National Transport Authority''s Order S.I. 479/2024, EUR, a regulated ceiling not an amount paid; no train, bus or Luas fares); SG = Singapore (MRT and LRT card fares per ride from the Public Transport Council fare table, SGD, a posted tariff; bus fares not included); SG = Singapore (trunk bus card and cash fares per ride from the Public Transport Council fare table, SGD, a posted tariff; add service=bus); TW = Taiwan (Taipei Metro fares between two stations from the operator''s open data, TWD, a posted tariff; other lines and operators not included); TW = Taiwan (Taipei Metro fares by default; add tw_operator=tra for Taiwan Railway fares between 22 main-city stations; TWD, posted tariffs)'
schema:
type: string
enum:
- AU
- CZ
- ES
- FR
- GB
- HK
- IE
- SG
- TW
- name: fare_type
in: query
required: false
description: 'Fare group (default adult). The groups available depend on the country notes. Australia (NSW Opal): adult (default); student = the Child/Youth Opal fare; senior = the Senior/Pensioner concession fare (capped at AUD 2.50 a day). workfare and disability are not available. Czechia (Prague): only adult (default); the open fare table has no reduced fares. Spain (rail): not used, CNMC publishes one average fare per route and operator; leave out. France (Île-de-France): adult = single ticket Métro-Train-RER (default); student = annual Imagine R student pass. Seniors and disabled people get percentage discounts, not a fixed fare. London (Underground): adult only (default); child, student and concession fares are not available. Hong Kong (MTR): adult (default), senior = the elderly concession fare, or disability = the concession fare for persons with a disability. student and workfare are not available. Ireland (taxi): not used; the maximum fare is the same for every passenger. Leave out. Singapore: adult (default), senior, student, workfare or disability. Singapore bus: adult (default), senior, student, workfare or disability. Taiwan (Taipei Metro): adult (default, the full fare), or senior / disability (both give the one concession fare for senior, Love and companion card holders and children in Taipei and New Taipei). student and workfare are not available.'
schema:
type: string
enum:
- adult
- senior
- student
- workfare
- disability
- name: distance_km
in: query
required: false
description: 'Journey distance in kilometres (default 5). The fare is looked up in the published distance band. Australia (NSW Opal): trip distance in km (default 5); the fare is read from the published band (train 0-10, 10-20, 20-35, 35-65, 65+ km; bus, light rail 0-3, 3-8, 8+ km; ferry 0-9, 9+ km). Czechia (Prague): not used, one ticket price covers any distance inside the tariff zones. Spain (rail): not used, the fare is per route; give route instead. France (Île-de-France): not used, the single ticket costs the same for any distance in the region. London (Underground): not used; the fare depends on the two stations, so give tfl_from and tfl_to. Hong Kong (MTR): not used; the fare depends on the two stations, so give from_station and to_station. Ireland (taxi): the journey distance in km (default 5); the maximum metered fare is worked out from the statutory tariff. Singapore: ride distance in km (default 5); the fare is read from the published 1 km band. Singapore bus: ride distance in km (default 5); the fare is read from the published band. Taiwan (Taipei Metro): not used; the fare depends on the two stations, so give origin_station and destination_station.'
schema:
type: number
minimum: 0
- name: travel_time
in: query
required: false
description: 'early = the discounted band before the morning peak where a country has one; other = all other times (default). Australia (NSW Opal): other = peak, the full fare (default); early = off-peak (30% cheaper on train, bus and light rail; ferries have no off-peak discount). Czechia (Prague): no early band; leave out. Spain (rail): not used, CNMC averages over departure times and purchase days; leave out. France (Île-de-France): no early band; leave out. London (Underground): not used; use tfl_time (peak or off-peak) instead. Hong Kong (MTR): not used; MTR fares do not change with the time of day in this table. Ireland (taxi): not used; use taxi_rate (standard, premium or special) to say when you travel. Singapore: early = before 7.45am on weekdays (discounted fares), other = all other times (default). Singapore bus: not used, trunk bus fares have no early-morning discount. Taiwan (Taipei Metro): not used; this fare table does not change with the time of day.'
schema:
type: string
enum:
- early
- other
- name: mode
in: query
required: false
description: 'AU (NSW Opal) only: train (default), bus, light_rail or ferry.'
schema:
type: string
- name: route
in: query
required: false
description: 'Spain (rail) only: Madrid-Barcelona (default), Madrid-Valencia, Madrid-Alicante, Madrid-Málaga or Madrid-Sevilla, or just the destination (Barcelona, Seville...).'
schema:
type: string
- name: operator
in: query
required: false
description: 'Spain (rail) only: total = all operators together (default), renfe-ave, renfe-avlo, iryo or ouigo. An operator CNMC did not see on that route in the newest month gives an error listing those it did.'
schema:
type: string
- name: tfl_from
in: query
required: false
description: 'GB only (required): the London Underground station you start at, by name such as "King''s Cross", "Victoria", "Oxford Circus" or "Heathrow Terminal 5" (20 central and main stations).'
schema:
type: string
- name: tfl_to
in: query
required: false
description: 'GB only (required): the London Underground station you end at, by name such as "Waterloo" or "Bank".'
schema:
type: string
- name: tfl_ticket
in: query
required: false
description: 'GB only: payg (Oyster or contactless pay as you go, default) or cash (single paper ticket).'
schema:
type: string
- name: tfl_time
in: query
required: false
description: 'GB only: peak (default, Mon-Fri 06:30-09:30 and 16:00-19:00) or off-peak. Ignored for cash and for journeys with one all-day fare.'
schema:
type: string
- name: from_station
in: query
required: false
description: 'HK only (required): the MTR station you start at, by English name such as ''Central'' or ''Tsim Sha Tsui''.'
schema:
type: string
- name: to_station
in: query
required: false
description: 'HK only (required): the MTR station you end at, by English name such as ''Mong Kok'' or ''Tung Chung''.'
schema:
type: string
- name: ticket
in: query
required: false
description: 'HK only: octopus (default, the Octopus card fare) or single (single-journey ticket; adult and senior only).'
schema:
type: string
- name: taxi_rate
in: query
required: false
description: 'IE only: standard (08:00-20:00 Mon-Sat, default), premium (20:00-08:00, Sundays and public holidays) or special (Sat/Sun 00:00-04:00, Christmas and New Year).'
schema:
type: string
- name: service
in: query
required: false
description: 'SG only: bus = trunk bus fares; leave out for MRT and LRT fares.'
schema:
type: string
- name: payment
in: query
required: false
description: 'SG bus only: card (default) or cash.'
schema:
type: string
- name: origin_station
in: query
required: false
description: 'TW only (required): the Taipei Metro station you start at, by English name such as ''Taipei Main Station'' or ''Tamsui'', or Chinese name such as 台北車站.'
schema:
type: string
- name: destination_station
in: query
required: false
description: 'TW only (required): the Taipei Metro station you end at, by English name such as ''Taipei 101'' or ''Songshan Airport'', or Chinese name such as 西門.'
schema:
type: string
- name: tw_operator
in: query
required: false
description: 'TW only: tra = Taiwan Railway (then origin_station and destination_station are stations such as Taipei, Taichung, Tainan, Kaohsiung, Hualien); leave out for Taipei Metro.'
schema:
type: string
- name: passenger
in: query
required: false
description: 'TW Taiwan Railway only: adult (default) or child.'
schema:
type: string
responses:
'200':
description: 'A price answer: median, 10th–90th percentile range, sample size, period, confidence, source and licence. For an official statistic: the published average or median (value, measure), its reference period, confidence, source and licence; the range fields and sample_size may be null. If the official source does not respond and ProofPrice holds a recent daily copy of it, you get that copy instead of an error: status is ok, period and as_of carry the snapshot date, the notice says so and extra.stale is true.'
headers:
X-ProofPrice-Stale:
description: 'Present only when the official source did not respond and the answer is ProofPrice''s own recent daily copy: snapshot=<date>. The body says so too (extra.stale is true).'
schema:
type: string
X-ProofPrice-Proof:
description: 'Signed Price Proof (only on status ok answers and real verdicts, when proofs are on): a compact JWS (EdDSA / Ed25519, typ proofprice-proof+jws) of what the official records showed. Check it free at /api/v1/proofs/verify or offline with the keys at /.well-known/proofprice-keys.json. See https://proofprice.com/proofs.'
schema:
type: string
Link:
description: 'With a proof: <https://proofprice.com/p/<jws>>; rel="proof", a page a person can open to see the proof checked.'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PriceAnswer'
'400':
description: Missing or invalid parameter, or a country that is not covered yet.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'502':
description: The official source could not be reached and ProofPrice holds no recent copy of it.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PriceAnswer:
type: object
properties:
query:
type: object
propertyNames:
type: string
additionalProperties: true
description: The request as understood, echoed back.
status:
type: string
enum:
- ok
- insufficient_data
- no_matches
description: ok = a figure is returned; insufficient_data = fewer than 5 matching records; no_matches = nothing matched.
price:
anyOf:
- type: object
properties:
currency:
type: string
description: ISO 4217 currency code, e.g. EUR.
unit:
type: string
description: What the price is per, e.g. 'per litre', 'per home', 'per kWh'.
value:
type: number
description: The headline figure. For ranges built from records it equals median.
measure:
description: 'What value is: median for ranges built from records; average or median for official statistics.'
type: string
enum:
- median
- average
median:
type:
- number
- 'null'
typical_low:
description: 10th percentile; null for official statistics that give no range.
type:
- number
- 'null'
typical_high:
description: 90th percentile; null for official statistics that give no range.
type:
- number
- 'null'
min:
type:
- number
- 'null'
max:
type:
- number
- 'null'
required:
- currency
- unit
- value
additionalProperties: true
description: The price. Null when there is not enough data to publish a figure (fewer than 5 records) or nothing matched.
- type: 'null'
sample_size:
description: Number of records behind the figure; null when the publisher does not say.
type:
- number
- 'null'
period:
description: The period the records cover (ISO dates), or the date of the snapshot when the answer comes from our copy.
type: object
properties:
from:
type:
- string
- 'null'
to:
type:
- string
- 'null'
required:
- from
- to
additionalProperties: true
confidence:
description: high = 50+ records, medium = 15–49, low = 5–14.
type: string
enum:
- high
- medium
- low
- insufficient
price_type:
description: transaction, posted_pump_price, posted_price, contract_price, reimbursement_price or official_statistic.
type: string
statistic:
description: 'Official statistics only: what kind of figure it is and the period the publisher states it for.'
type: object
properties:
measure:
type: string
enum:
- median
- average
reference_period:
type: string
note:
type: string
required:
- measure
- reference_period
additionalProperties: true
as_of:
description: When the answer was produced (ISO 8601); the snapshot date when the official source was down and the answer comes from our copy.
type: string
source:
type: object
properties:
id:
type: string
description: Source id, e.g. es-fuel.
name:
type: string
publisher:
type: string
description: Who publishes the data.
licence:
type: string
licence_url:
type: string
attribution:
type: string
description: The attribution line to show with the figure.
url:
type: string
description: The publisher's page for this data.
required:
- id
- name
- publisher
- licence
- licence_url
- attribution
- url
additionalProperties: true
description: Where the figure comes from, under which licence, and the attribution line to show.
method:
type: string
method_url:
type: string
summary:
type: string
description: One plain sentence an AI can quote.
notice:
type: string
description: Information, not a valuation or offer. Also says when the answer is our copy because the official source did not respond.
extra:
description: Source-specific details (for example cheapest stations). extra.stale is true when the answer comes from our copy of the source.
type: object
propertyNames:
type: string
additionalProperties: true
answer_id:
description: 'Audit trail: a stable id (hash of source id, normalised query, data period and method_version). The same question on the same data gives the same id; keep it with the reasoning that used the figure.'
type: string
method_version:
description: 'Audit trail: version of the way this source turns raw data into an answer (per source, default ''1'').'
type: string
retrieved_at:
description: 'Audit trail: when ProofPrice produced this answer (ISO 8601). For an answer from our own copy this is now, while as_of is the snapshot date.'
type: string
evidence:
description: 'Audit trail: what kind of evidence the figure is.'
type: object
properties:
type:
type: string
description: Same as price_type.
label:
type: string
description: Short name of the kind of evidence, e.g. 'Recorded sale prices', 'Official published average', 'Official published index', 'Posted shelf or pump price', 'Posted or listed price', 'Contract award value', 'Regulated reimbursement price'.
meaning:
type: string
description: One sentence on what this kind of evidence does and does not establish.
required:
- type
- label
- meaning
additionalProperties: true
reliability:
description: How far to trust the figure as a distribution of real prices. official_with_count = a published official figure with a record count; official_median_no_count = a published average or median with no record count (confidence 'high' there means the publisher is official, not that a count was checked); record_level = 15+ records we hold; thin = 5–14 records; stale = our copy because the official source did not respond; insufficient_data = no figure published.
type: string
enum:
- official_with_count
- official_median_no_count
- record_level
- thin
- stale
- insufficient_data
data_as_of:
description: ISO date (YYYY-MM-DD) of the newest data point behind the figure; null when unknown.
type:
- string
- 'null'
data_age_days:
description: Whole days between data_as_of and retrieved_at; null when data_as_of is null.
type:
- number
- 'null'
suggestions:
description: 'Short plain things to try next: widen the period or area, ask for an itemised quote. May be empty.'
type: array
items:
type: string
required:
- query
- status
- source
- summary
- notice
additionalProperties: true
description: 'A price answer: a range or an official statistic with sample size, period, confidence, source and licence.'
Error:
type: object
properties:
error:
type: string
description: What went wrong, in plain words.
detail: {}
required:
- error
additionalProperties: true
description: 'An error: a missing or invalid parameter (400) or an official source that could not be reached (502).'