The Database Hub | Back4App
The Database Hub | Back4App
How it works
  • Log In
  • Sign Up

  1. Back4App
  2. World Continents, Countries, and Cities
Public

1210
5630
1210
5630
  • DatabaseDatabase
  • GraphQL API PlaygroundAPI Playground
  • Get Started GuideGet Started
  • IssuesIssues
  • ContributorsContributors
  • GraphQL API Playground
    API Playground
    Get Started Guide
    Get Started
    Issues
    Issues
    Contributors
    Contributors

  1. World Continents, Countries, and Cities

Database with all the continents, countries, states and cities of the world. This directory contains all 7 continents, 250 countries, 4k subdivisions (provinces, states, etc) and more than 127k thousand cities. All data can be retrieved and managed via APIs. User can also clone the database with all the data.

  • Cities
  • Github
  • Download
  • Kotlin
  • GIS
  • Python
  • Country Shape
  • Geography
  • Swift
  • Objective-C
  • Languages by Country
  • JSON
  • Continents
  • Shape
  • GraphQL API
  • Open-Source
  • Dart
  • Javascript
  • PHP
  • NodeJS
  • REST API
  • Flutter
  • Provinces
  • Java
  • Datasets
  • Countries
  • States
  • Languages
  • Countries by Continent

Get StartedFetch Data
ClassClassesDescription
ClassCity
Dataset with all the cities of the world. Information includes the name, country, population, Latitude, Longitude, City ID, Admin Code, and inform if the City is a capital.
ClassContinent
Dataset with all the continents of the world. Information includes the name and code.
ClassCountry
Dataset with all the countries of the world. Information includes the name, language spoken, country code, phone code, flag emoji, country capital, and the currencies.
ClassLanguage
Dataset with all the spoken languages in the world. It contains the name, code, and name in the native language.
ClassShape
Dataset with the GeoJson country shapes for all 250 countries.
ClassSubdivisions_States_Provinces
Dataset with all the subdivisions, states, and provinces by country.
NotesNotes

List of World Continents, Countries, and Cities

This is a very detailed database with data about the world continents, countries, and cities. The continent, country, state, city database has datasets as follows:

  • Dataset with all 7 continents
  • Dataset with all 250 countries
  • Dataset with all 127k cities in the world
  • Dataset with all 4.7k subdivisions, states, and provinces of the world
  • Dataset with all the languages spoken on each country
  • Dataset with the geographical shapes of each country

The list of countries and cities database is specially designed to meet developer’s needs. A developer is able to perform the following actions with the database:

  • Clone and make changes to the database
  • Connect any app to the database
  • Make queries and retrieve data from the database
  • Find relations between the fields
  • Download the database in a JSON format

Here some ways developer can benefit using the database of countries and states:

  • Insert data on autocomplete forms
  • Access/Retrieve data from different data sources under a single API Key
  • Run multiple queries on multiple datasets and centralize the results
  • Receive regular updates from the data sources the API Key is connected

Here are some easy-to-understand examples of the type of information you can retrieve using the database:

  • Countries by Continent
  • Cities by Country
  • Languages by Country

Below, details of the datasets available:

World Continents Dataset

This dataset provide the following information for each continent:

  • Continent Name in a String Format
  • Continent Code in a String Format

Example below:

  • Continent Name: Asia
  • Continent Code: AS

World Countries Dataset

This dataset provide the following information for each country:

  • Country Name in a String Format
  • Country Name Native Language in a String Format
  • Country Code in a String Format
  • Country Phone Code in a Number Format
  • Country Flag in a String Format (emoji)
  • Country Capital in a String Format
  • Country Currencies in a String Format

Example below:

  • Country Name: Germany
  • Country Name Native Language: Deutschland
  • Country Code: DE
  • Country Phone Code: 49
  • Country Flag:
  • Country Capital: Berlin
  • Country Currencies: EUR

World Cities Database

This dataset provide the following information for each city in the world:

  • City Name in a String format
  • City Country in a Pointer format
  • City Population in a Number format
  • City Location (Latitude / Longitude) in a Geopoint format
  • City ID in a Number format
  • City Admin Code in a String format
  • Capital or Not in a Boolean format

Example below:

  • City Name: Berlin
  • City Country: Germany
  • City Population: 3,426,354
  • City Location: 52.52437 / 13.41053
  • City ID: 2950159
  • City Admin Code: 16
  • Capital: True

Use the world cities API below to list all the cities from a country.

Get all cities from country api

Languages Spoken in the World

This dataset provide the following information for each city in the world:

  • Language Name in a String format
  • Language Code in a String format
  • Language Name in the Native format

Example below:

  • Language Name: German
  • Language Code: DE
  • Language Name: Deutsch

Subdivisions, States, and Provinces by Country Dataset

This dataset provide the following information for each subdivision of the world:

  • Country Code in a String format
  • Subdivision Type in a String format
  • Subdivision Code in a String format
  • Subdivision Name in a String format
  • All Cities of a Subdivision in a Relation format

Example below:

  • Country Code: US
  • Subdivision Type: State
  • Subdivision Code: AK
  • Subdivision Name: Alaska
  • Cities: List of cities of the Alaska state

Geo Json Shapes of All Countries

This dataset provide the following information for each country of the world:

  • Country Name in a Pointer format
  • Country Shape in a GeoJson format

Example below:

  • Country Name: Israel
  • geoJson: {"type":"MultiPolygon","coordinates":}

Get Started

The list of countries, states and cities in the world database allows developers to retrieve data via APIs. For example, a developer can get cities by country API using different programming languages.

  • NodeJS - Fetch Data with Node JS Code
  • JavaScript - Fetch Data with Java Script Code
  • Swift - Fetch Data with Apple Swift Code
  • Objective-C - Fetch Data with Apple Objective-C Code
  • Kotlin on Android - Fetch Data with Kotlin on Android
  • Kotlin - Fetch Data with Kotlin
  • Java on Android - Fetch Data with Java on Android
  • PHP - Fetch Data with PHP
  • Python - Fetch Data with Python
  • Java - Fetch Data with Java
  • Flutter - Fetch Data with Flutter
  • Dart - Fetch Data with Dart

Query examples you get can get answers using this database

How many continents are in the whole world ?

This one is quite simple and not even an API is required! Just go to the continents dataset and make a query to count the total number of continents. The answer is 7.

  • World Continents - Dataset with number of continents in the whole world

How many countries in Asia continent list?

Use relation between continents and countries. Please click on the link below to see all the Asia countries.

  • All countries in Asia - Dataset of all countries in Asia

What is the largest city in Asia by population?

Use the API playground, fetch data from the cities dataset and get the answer Shanghai.

Open-Source App on GitHub

Continents, Countries, and Cities Open Source App - Open Source Application Available on GitHub

FAQ – Frequently Asked Questions

How can I get an API key?

Getting a key is a simple and straightforward process. Please refer to the Connect Button on the top right hand side of this page. The process has 3 steps:

  • Login
  • Add a name to your app
  • Connect and get the API key

Takes less than 1 minute.

Can I use the same API Key for multiple databases?

Yes, you can integrate several databases under the same API Key.

What can I get for free?

The world cities database is free to download. You can use the hosting service for free up to 10k requests per month. More details in our Pricing Page.

What is an API request?

Every moment you execute a call to the database in the name of an application using a SDKs or an API, it counts as an API request. Logins, saves, queries are examples of operations calculated as API requests, among other types of operations.

What API types are supported?

The service works with two different API protocols:

  • GraphQL
  • REST

You can make queries, access, and retrieve data from a public dataset via a GraphQL API. If you clone the database, it’s possible to work with REST or GraphQL APIs.

What SDKs and Libraries are supported?

The list is pretty broad and the most common ones are:

  • iOS
  • Android
  • Javascript
  • Unity

Can I download the list of countries, states and cities in the world in JSON format?

Yes. To do that, please clone the app first and then download each class under a JSON format. For example, you can choose the class City and download the world cities JSON

How does the Database Hub works?

Please refer to How it Works page.

What is the data source?

  • United Nations
  • Geonames

What is the license?

Creative Commons Attribution 4.0 License

What is Back4app?

Back4app is a BaaS Service and will assist you in expediting the development and building astonishing applications much quicker versus a regular backend.

Or just use the clone button to create a copy of this app in your account and customize according to your needs.

Please see below other popular databases:

  • Coronavirus COVID-19
  • List of names by letter and by gender
  • List of Zip Codes by Country
  • Industries and Activities
  • CIP - Classification of Instructional Programs