BYTETOOLS

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.

No API key requiredHTTPSFree tier

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
curl 'https://app.metrolisboa.pt/status/getLinhas.php'
JavaScript (fetch)
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);
Python (requests)
import requests

res = requests.get("https://app.metrolisboa.pt/status/getLinhas.php", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "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

ParameterTypeRequiredDescription
(no parameters)pathRequired`/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

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.