Juan Santamaría International Airport: For downtown Heredia, take an official orange airport taxi or arrange a reputable hotel/private transfer: roughly 25–45 minutes depending on traffic and about US$20–35. It is far more sensible with luggage than trying to piece together local buses. Do not use unlicensed drivers or blue-badge porteadores. There is no useful rail link from the terminal; the Alajuela rail station is about 2 km away.
Estación al Atlántico, San José: At commuter hours, the train to Heredia is the cleanest public-transport option: about 25–40 minutes, a low local fare (roughly ₡500–1,000), and Heredia station is walkable to the center. The catch is decisive: trains are limited to commuting periods and can be extremely crowded. Outside those hours, use a direct Heredia bus such as Amarillas from San José; allow 40–70 minutes in traffic.
Alajuela / San Joaquín rail corridor: A few commuter trains continue between Alajuela, San Joaquín, San Francisco and Heredia, but this is a timetable-dependent option rather than an airport transfer system. Use it only if its departure happens to fit your day; otherwise a road transfer via San Joaquín de Flores is quicker and simpler.