Delete tags using API

Is there a way to delete all the tags associated with no item? Maybe with API?

thanks!