Some cities have their own (not really official AFAIK) codes that represent "any airport in this city", such as "NYC" meaning LGA, JFK, EWR, and maybe also HPN and/or SWF. I think these are mostly created by app/site developers but I could be wrong.
They're metropolitan area codes (https://en.wikivoyage.org/wiki/Metropolitan_area_airport_cod...). They're not consistently useful across sites because different sites connect to different backends (GDS) that may or may not accept them, but it's nice if you consistently use a site that does. Back when Hipmunk was alive QSF was useful to me because it used Sabre as the GDS and would translate it as {SFO, OAK, SJC}. Other sites would show you an airport in Algeria.
Edit: I should note that you should be careful when using these - at least once I accidentally booked a ticket that left from SFO and returned to SJC.
That's the term, it's been a while since I had to work with this stuff. I don't remember if I ever was able to use the metro codes to look up data from a GDS, but I do remember that I once ended up with a dataset where I had to heuristically disambiguate those codes from proper IATA codes; that sucked.