Best way to get dropdown with list of countries and cities

Hey everyone!

I’m building an app in which I need to allow users to select a Country from a dropdown (from all available countries in the world) and, subsequently a city (only showing those that belong to the country initially selected).

What’s the best/more efficient/fastest way to achieve this? For countries I guess I could either use a dropdown with the source value being an API call to a service such as REST Countries, or to import the list of all countries as Option Sets and pull them from there.

For cities, the Option Set approach is definitely not possible so …

Any suggestions on how to achieve this? Am I overcomplicating things?

Many thanks!

If you don’t want any more associative information (coordinates etc.) then you could probably achieve this by importing a couple of csvs like this one into your db:

Otherwise my go-to would be the google maps api, since the scope for additional features is high. May not make sense at all for what you’re trying to achieve however.