How Subletting Works in NYC
Subletting is an option to consider, but always make sure that it is done with permission of the landlord. The last thing you want is to end up the "secret guests" in a building of snitchy neighbors in the apartment of a tenant who can barely pay the rent if your rent doesn't cover the entirety(!)
Also, think of it the other way around: You move into a building that is secured by keys or a building code, and some strange neighbor has strange guests coming in and out of the building that you don't even know belong in the building.
As for subletting, there are very specific laws, and a specific process is required for the tenant to get permission to sublet. This website does not provide legal advice, but here is some general information on subletting in general:
Things get tricky after this, so first, I'll defer to the Attorney General's Website, as well as Met Council on Housing stating again that it is best to always make sure that any sublet is being done with the consent of the landlord.
As for finding potential apartments for sublet, this is definitely something you can contact me about.