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
about this tutorial
A devai.io starter tutorial — turning one rich API object into a clean card.
More in APIs & Data
view allAPIs & Data
Weather Right Now
Type a city, get the live weather — your first two-step API call.
HTMLCSSJavaScriptfetch()+1
View template zip + preview
APIs & Data
GitHub Profile Card
Type a username, get their profile — your first taste of an API.
HTMLCSSJavaScriptfetch()+1
View template zip + preview
APIs & Data
Random Quote Machine
Load quotes from a data file and show a new one on demand.
HTMLCSSJavaScriptfetch()+1
View template zip + preview