# Flights from Madrid (MAD) to Mexico City (MEX)

1 direct, 49 routes with 1 stop, 3484 with 2 stops. Straight-line distance 9066 km.

## Direct

Aeromexico, Iberia flies direct, about 9080 km.

## Shortest routes

- MAD → MEX · 9080 km · about 730 min · 0 stops
- MAD → MCO → MEX · 9100 km · about 949 min · 1 stop
- MAD → CLT → MEX · 9108 km · about 911 min · 1 stop
- MAD → ATL → MEX · 9117 km · about 912 min · 1 stop
- MAD → PHL → MEX · 9137 km · about 905 min · 1 stop
- MAD → JFK → MEX · 9139 km · about 930 min · 1 stop
- MAD → IAD → MEX · 9141 km · about 956 min · 1 stop
- MAD → EWR → MEX · 9144 km · about 944 min · 1 stop

## How to query this

- JSON: https://travel.buy-it.gr/api/v1/routes/MAD/MEX
- This page: https://travel.buy-it.gr/api/v1/routes/MAD/MEX.md
- HTML, English: https://travel.buy-it.gr/en/flights/MAD-MEX
- All routes: https://travel.buy-it.gr/api/search?from=MAD&to=MEX&maxStops=2
- Operating days for one leg: https://travel.buy-it.gr/api/leg?from=MAD&to=MEX
- Price a path on one date: https://travel.buy-it.gr/api/price?path=MAD,MEX&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.
