Countries API.

A simple yet powerful API that lets you fetch detailed information about any country like its name, code, capital city, currency, and more. Perfect for apps needing up-to-date global data in a clean and accessible format.

api/countries/label

Response:

{
  "countries": [
    {
      "_id": "TZ",
      "label": "Tanzania, United Republic of Tanzania"
    }
  ]
}

How do we query?

Query all countries.

Get all countries list by a single query.

ENDPOINT:

api/countries/all

By random number.

Get a random country from our countries list.

ENDPOINT:

api/countries/random

By label.

Find country by a label from our countries list.

{
  "label": "Tanzania" //string
}

By capital.

Find country by a capital from our countries list.

{
  "capital": "Harare" //string
}

By currency.

Find country by a currency from our countries list.

{
  "currency": "TZS" //string
}

By code.

Find country by a code from our countries list.

{
  "code": "+260" //string
}