A Mexican address carries a colonia — the neighbourhood — on its own line, the same structural element Brazil calls a bairro and for the same reason: street names repeat across a large city, and the colonia is what resolves them. It is written with the Col. abbreviation and it is not optional in an urban address.
The street number also comes in two parts. The exterior number identifies the building and the interior number the unit inside it — Av. Juárez No. 123, Int. 4 — so an address with a single numeric field cannot represent an apartment. This is the same problem Spain creates with its floor and door, arriving through different vocabulary, and it is why an international form needs a genuine second address line rather than an optional one.
The Código Postal is five digits, and Mexico's last line pairs it with the city and the state, the state often as an abbreviation. Mexico City is its own federal entity and appears as CDMX, which is recent enough that older reference data still carries the previous name — a mismatch worth handling if you validate the state field against a list.
The telephone rule changed within recent memory, and this site's numbering-plan data records the date: Mexico has had no trunk prefix since 3 August 2019, when the regulator abolished the 01, 044 and 045 prefixes. Any code or documentation written before that still strips or adds them, and any dataset captured before it carries numbers in the old format. Mexican numbers are ten digits after +52, full stop. An honest caveat while we are here: the locale library underneath produces nine-digit Mexican numbers, one short, so this generator omits the international format for most Mexican records rather than publish a number that cannot be dialled.