Movie starring Dustin Hoffman as Ratso Rizzo (from the Bronx) and a very young Jon Voight as Joe Buck (from Texas). It is the story of their misadventures trying to survive in New York City. Won Best Picture in 1969. Buck had come to NYC thinking he could make a living selling his body to women. When that plan failed, he resorted to seeking gay males as customers. The term midnight cowboy has been used meaning a male (straight or gay) who prowls for gay men who will pay him for sex.
I have seen Midnight Cowboy approximately 50 times.