The new Massachusetts short term rentals law applies to property rentals of less than 31 days. It includes an occupancy tax, statewide registry, insurance requirements, and inspections. Any property rented out for less than 14 days in one year is exempt.
Here are 2 great resources for information about the new law:
https://www.marealtor.com/members/legal-resources/short-term-rentals
https://www.mass.gov/info-details/short-term-rentals-frequently-asked-questions