San Marino doesn’t have its own airport. As such, in order to get there, you will have to fly into a nearby airport in Italy.
The best airports for San Marino are Rimini Federico Fellini Airport (RMI), Ancona-Falconara Airport (AOI), Bologna Guglielmo Marconi Airport (BLQ), and Forli Luigi Ridolfi Airport (FRL). They are all served by low-cost airlines, making it easy to get a cheap flight for the first part of your journey.
For most international visitors coming from outside of Italy, the best airport for San Marino is Bologna. This is because Bologna airport is served by more carriers from more destinations than any of the other airports.
For visitors coming from within Italy, the best airports for San Marino are Bologna, Ancona, and Rimini airports. This is because they are served by domestic flights, while Forli is only served by routes originating outside of Italy.
Whatever airport you choose, it is easy to get from there to San Marino. You can take a look at this page for more information about airport transfers and travel options.