Metro de Lisboa (Line Status) API
Free Lisbon Metro line status feed with no key: current service state for all four lines in one tiny JSON response. Tested curl example and live response included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Metro de Lisboa (Line Status) API?
Metro de Lisboa publishes a small free endpoint giving the live service status of all four Lisbon Metro lines — Amarela, Azul, Verde and Vermelha — as a short JSON object with a text status and a severity code for each.
Metro de Lisboa's own status page reads this feed, and its virtue is its size: one request returns the entire network's state in about two hundred bytes. For a status widget, a lobby display or a monitoring check, that beats any general transit API, because there is nothing to filter and nothing to parse beyond four keys.
The lines are addressed by colour rather than by number — `amarela` yellow, `azul` blue, `verde` green, `vermelha` red — which matches how Lisbon signage and locals refer to them. Each line has a paired `tipo_msg_*` field carrying a severity code, with 0 meaning normal service; build your logic on that rather than on the Portuguese text, which is free-form prose and begins with a leading space. Note the status message itself is not translated, so an English interface will need to map the common phrases or display them as-is.
Quick facts
- Base URL
https://app.metrolisboa.pt/status- Authentication
- No key or account. It is the operator's own public status endpoint, undocumented for third-party use.
- Rate limit
- No published quota. Status changes rarely, so polling once a minute is generous.
- Pricing
- Free.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Metro de Lisboa (Line Status) API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch live service status for all four metro lines
GET https://app.metrolisboa.pt/status/getLinhas.php
curl 'https://app.metrolisboa.pt/status/getLinhas.php'const res = await fetch("https://app.metrolisboa.pt/status/getLinhas.php");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://app.metrolisboa.pt/status/getLinhas.php", timeout=20)
res.raise_for_status()
print(res.json()){
"resposta": {
"amarela": " Ok",
"azul": " circulação com atrasos. O tempo de espera pode ser superior ao normal.",
"verde": " Ok",
"vermelha": " Ok",
"tipo_msg_am": "0",
"tipo_msg_az": "0",
"tipo_msg_vd": "0",
"tipo_msg_vm": "0"
},
"codigo": "200"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
(no parameters) | path | Required | `/getLinhas.php` returns the status of every line in one response. getLinhas.php |
Response fields
resposta.amarelastring- Status of the Yellow line. " Ok" means normal service — note the leading space.
resposta.azulstring- Status of the Blue line, as free-form Portuguese text when service is disrupted.
resposta.verdestring- Status of the Green line.
resposta.vermelhastring- Status of the Red line.
resposta.tipo_msg_am / az / vd / vmstring- Severity code per line, abbreviated by colour. "0" indicates normal service; non-zero indicates disruption.
codigostring- Response code, "200" on success. It duplicates the HTTP status.
What you can build with the Metro de Lisboa (Line Status) API
- Show live Lisbon Metro line status in a travel or city app
- Drive a status board in an office or hotel lobby
- Alert commuters when their line reports delays
- Log disruption over time to measure line reliability
- Add a metro status widget to a Lisbon city guide
Common errors and how to fix them
Content-Type says text/html
The endpoint is a PHP script that does not set a JSON content type.
Fix: The body is valid JSON. Parse it directly rather than switching on the content type header.
String comparison against "Ok" fails
The value is " Ok" with a leading space.
Fix: Trim before comparing, or better, branch on `tipo_msg_*` where "0" means normal service and the text is only for display.
Status text is in Portuguese
The feed is not localised.
Fix: Map the common phrases yourself, or show the original. "Circulação com atrasos" means the line is running with delays.
CORS error in the browser
The endpoint sends no Access-Control-Allow-Origin header.
Fix: Fetch it server-side and re-serve it. The payload is tiny, so caching it for a minute costs nothing.
Metro de Lisboa (Line Status) API — frequently asked questions
Is the Metro Lisboa status feed free?
Yes, free with no key or account. It is the operator's own public endpoint, the one its status page uses, though it has never been formally documented for third-party consumption.
Which lines does it cover?
All four: Amarela (yellow), Azul (blue), Verde (green) and Vermelha (red). They are addressed by colour, which is how Lisbon signage and passengers refer to them.
How do I detect a disruption reliably?
Check the `tipo_msg_*` field for each line rather than the text. A value of "0" means normal service; anything else signals disruption, and the accompanying text explains it in Portuguese.
Does it give train times or arrivals?
No. This endpoint reports line-level service status only. Real-time arrival predictions require Metro de Lisboa's separate API platform, which is key-gated.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Validator
Free online JSON validator: validate JSON and find syntax errors with the exact line and column. See root type, key counts and depth — instant and 100% private.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
Metro de Lisboa (Line Status) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.