New York City is one of the most expensive cities in the world, and a large part of that expense is rent. But, before you take the plunge and sign a lease on a pricey apartment, here are some tips for NYC tenants.
New York State law includes landlord responsibilities in NYC for maintenance and safety. Many of these responsibilities are outlined in the Housing Maintenance Code (HMC) and Multiple Dwelling Law (MDL) of New York State, which the Department of Housing Preservation and Development (HPD) enforces. Here is a simple breakdown of what you should know.

Maintenance
Pests
If there are roaches, mice, or bedbugs in your apartment, your landlord is responsible for getting rid of them. The HPD recommends working with pest control services that practice integrated pest management (IPM). General prevention measures include building repairs to seal holes and leaks, extermination services, and proper garbage storage.
Mold
One of the tenants rights in NYC includes the right to a safe, mold-free home. Local Law 55 of 2018 requires that owners of buildings with three or more apartments keep their tenants' apartments free of mold and fix any leaks promptly to avoid mold growth and proliferation.
Heat and Hot water
According to New York City HPD, hot water must be provided throughout the year at a constant minimum temperature of 120 degrees Fahrenheit.
Heating must be provided between October 1st and May 31st, i.e., "heat season," under the following conditions:
Between 6:00 a.m. and 10:00 p.m., if the external temperature falls below 55 degrees, the inside temperature must be at least 68 degrees Fahrenheit.
Between 10:00 p.m. and 6:00 a.m., if the outside temperature falls below 40 degrees, the inside temperature must be at least 55 degrees Fahrenheit.
Safety

Fire Safety
According to the HPD, tenants are entitled to:
Self-closing doors in buildings with three or more apartments.
provided and installed by the landlord.
A fire escape plan posted inside every apartment door, common area, distributed to each dwelling, new tenants, and annually during fire prevention week.
Clear exits posted on fire escapes, hallways, and entrance doors to a building, including roof doors.
Outlet Covers
Electrical outlets in the public areas of residential buildings with three or more units must have outlet covers, caps, or other safety devices over the openings. Tamper-resistant outlets do not require such covers.
Window Guards
New York City requires installing approved window guards on all windows for buildings with three or more apartments. This includes first-floor bathrooms, windows leading to a terrace or balcony, common areas, and units occupied by a child 10 years of age or younger.
Smoke and Carbon Monoxide Detectors
Landlords must provide and install smoke detectors and at least one approved carbon monoxide detector in each unit, as well as written information for testing and maintaining the detectors. But if a tenant breaks or removes a sensor, they are required to replace it.
Lead Paint
The Childhood Lead Poisoning Prevention Act requires landlords to identify and remediate lead-based paint hazards in apartments occupied by young children. Landlords must also inspect units occupied by a child under age six and common areas for peeling paint, chewable surfaces, deteriorated subsurfaces, friction, and impacted surfaces.
For buildings built before 1960 (or between 1960 and 1978 if owners know that lead-based paint is present), owners are required to investigate and remove lead-based paint hazards upon turnover of an apartment, using safe work practices and trained workers.
Required Signs & Notices
Certificate of inspection visits: Owners must provide a framed inspection visit card issued by the HPD inspector.
Garbage collection notice: There must be a display of tamper-proof signs with the hours and method of garbage collection in the lobby unless the building has a 24-hour garbage chute.
Smoke and carbon monoxide detectors: Property owners need to post HPD-approved notices with smoke detector and carbon monoxide monitor requirements.
Notice of service interruption: Landlords must post a notice before making repairs or performing other work that might interrupt heat, water, gas, or electricity service for two or more hours.
Sources
https://www1.nyc.gov/site/hpd/services-and-information/tenants-rights-and-responsibilities.page
https://www.brickunderground.com/rent/nyc-landlord-requirements-and-what-is-not-provided
https://www1.nyc.gov/site/hpd/services-and-information/housing-quality-and-safety.page
https://ny.curbed.com/2017/8/30/16223330/new-york-landlord-tenant-rights
https://citybuildingowners.com/blog/landlord-responsibilities-new-york-city/
https://www.nycbar.org/get-legal-help/article/landlord-tenant/landlords-duties-obligations/