# Flights from Madrid (MAD) to San Juan (SJU)

1 direct, 20 routes with 1 stop, 1651 with 2 stops. Straight-line distance 6380 km.

## Direct

Iberia flies direct, about 6387 km.

## Shortest routes

- MAD → SJU · 6387 km · about 540 min · 0 stops
- MAD → PUJ → SJU · 6827 km · about 673 min · 1 stop
- MAD → SDQ → SJU · 7085 km · about 693 min · 1 stop
- MAD → STI → SJU · 7208 km · about 681 min · 1 stop
- MAD → BOS → SJU · 8183 km · about 833 min · 1 stop
- MAD → JFK → SJU · 8347 km · about 823 min · 1 stop
- MAD → EWR → SJU · 8391 km · about 845 min · 1 stop
- MAD → LUX → SJU · 8457 km · about 825 min · 1 stop

## How to query this

- JSON: https://travel.buy-it.gr/api/v1/routes/MAD/SJU
- This page: https://travel.buy-it.gr/api/v1/routes/MAD/SJU.md
- HTML, English: https://travel.buy-it.gr/en/flights/MAD-SJU
- All routes: https://travel.buy-it.gr/api/search?from=MAD&to=SJU&maxStops=2
- Operating days for one leg: https://travel.buy-it.gr/api/leg?from=MAD&to=SJU
- Price a path on one date: https://travel.buy-it.gr/api/price?path=MAD,SJU&date=2026-10-10

Replace airport codes in any of those URLs. `path` is comma-separated IATA codes, 2 to 5 airports. `date` is YYYY-MM-DD. `carriers` is optional, legs joined by `|` and airlines inside a leg joined by `.`, for example `FR|LO`.

The first flight must leave on `date`. Each following flight may leave that same day or the next day, and must depart at least 90 minutes after the previous flight lands. A response with `partial: true` on a calendar lists days a source has seen. It does not prove the other days are empty.

No API key. Responses are JSON unless the URL ends in `.md`. Prices are euros. `total: null` means no fare was found for the first flight on that date.
