Weather widget
Fetch current weather for Philadelphia, New York, London, or Tokyo.
Learn by changing things
Working examples for the article “Getting Started with APIs.” Open a live demo, inspect the source, or download a complete starter pack and make it your own.
No key or signup required
Each example uses the same core pattern from the guide: fetch, parse, display. The source download includes the page and shared stylesheet.
Fetch current weather for Philadelphia, New York, London, or Tokyo.
Search for a country and display its flag, capital, languages, and currencies.
Look up a Pokémon by name or number and render its types and base stats.
Convert an amount between major currencies using current reference rates.
Find definitions, parts of speech, phonetics, and source links.
Keep API keys off the front end
These examples mirror the article’s server-side proxy pattern. Each ZIP contains working source, an environment-file template, a gitignore, and setup instructions. No real key is included.
Uses an environment variable and returns only the fields the browser needs.
Uses dotenv, input validation, a timeout, and an API route.
Uses python-dotenv, Requests, input validation, and a server-only key.
More from the article