API for getting List of country and their states

Is there any API for getting all countries and passing country get all States/Region and again passing State/Region get all cities in it

something like that:

https://restcountries.eu/