all templates
APIs & Data

Country Explorer

Search a country, see its flag, capital, population and languages.

Look up any country and get a tidy fact card — flag included, straight from the API. You'll learn to search, render a rich object, and format big numbers so a population actually reads nicely.

What's inside

  • Flag, capital, region, population, languages, currencies
  • Renders an image the API hands back
  • Formats large numbers with toLocaleString
  • Handles "no country found"
  • Free API, no key required

Quickstart

$ curl -LO https://devai.io/downloads/country-explorer.zip$ unzip country-explorer.zip && cd country-explorer$ open index.html   # or just double-click the file

Browse the code

The full source, exactly as the zip ships it.

loading…
Download .zip
loading tree…

about this tutorial

A devai.io starter tutorial — turning one rich API object into a clean card.