RepositoryTypeScript
MartinsOnuoha

MartinsOnuoha/countriesNowAPI

CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. 🌎

222stars
87forks
2issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: population-countries

#1 Repository of the month

1
TINIX TRENDING·Topic: cities

#1 Repository of the month

1
TINIX TRENDING·Topic: cities-data

#1 Repository of the month

CountriesNow API

CountriesNow

A curation of Countries data including (dial codes, states, cities, currencies, capitals etc) served over a REST API so you don't have to have them locally in your applications. This means lighter application sizes as you wouldn't have to install another package to use geo data. Please note that this doesn't guarantee complete or correct data, feel free to raise issues where necessary.

CleanShot 2022-03-17 at 9 19 17@2x

USAGE

The API does not require any form of Authentication or token.


const BASE_URL = 'https://countriesnow.space/api/v0.1/countries'

let getCountries = async () => {
  const response = await fetch(`${BASE_URL}`).then(response => response.json())
  const { data } = response

  data.forEach((country) => {
    console.log(country) // {"country": "Afghanistan", "cities": [ "Herat", "Kabul", "Kandahar", "Molah", ...]}
  })
}

The API does not require any form of Authentication or token.


Local Setup

git clone https://github.com/YourName/countriesNowAPI.git

Change directory

cd countriesNowAPI

Install packages

npm i

Start Project

npm start

Run test

npm run integration:test

Contribution

Please read the contribution guide here

Feel free to support and keep the API running

Buy Me A Coffee

✨ All thanks to this gist, datahub, and this repository for the data curated.

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
Synergy-Shock/country-codes-list

List of codes per country (languages, calling codes, currency codes, etc)

114
Nov 1, 2026
RepositoryPython
dr5hn/countries-states-cities-database

🌍 Discover our global repository of countries, states, and cities! 🏙️ Get comprehensive data in JSON, SQL, PSQL, SQLSERVER, MONGODB, SQLITE, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities

10.1k
Dec 1, 2026
RepositoryPHP
mledoze/countries

World countries in JSON, YAML, CSV and XML. Any help is welcome!

6.3k
Nov 17, 2026
RepositoryJavaScript
samayo/country-json

A simple data of the world by country each in JSON format.

1.2k
Sep 7, 2026
RepositoryPHP
nnjeim/world

A Laravel package which provides a list of the countries, states, cities, currencies, timezones, languages and IP Geolocation.

998
Oct 10, 2026
RepositoryJavaScript
georgique/world-geojson

GeoJson for all the countries, areas (regions) and some states.

526
Aug 24, 2026
RepositoryC#
egbakou/RESTCountries.NET

⚡Offline dotnet standard library to get information about countries

291
Nov 16, 2026
RepositoryPHP
sokil/php-isocodes

:star: PHP library providing ISO codes with localization: country (ISO 3166-1), subdivision (ISO 3166-2), language (ISO 639-3), currency (ISO 4217) and scripts (ISO 15924)

184
Sep 16, 2025
RepositoryPHP
igaster/laravel_cities

Find any country/city in the world. Get Long/Lat etc. Deploy geonames.org database localy. Optimized DB tree

180
Jan 17, 2023