APIs & Data
Random Quote Machine
Load quotes from a data file and show a new one on demand.
Click a button, get a fresh quote. It reads from a bundled JSON file — the exact same fetch pattern as a live API, but reliable and offline. You'll learn to load data and pick a random item without repeats.
What's inside
- Fetches a local quotes.json data file
- Random selection that avoids repeating itself
- The same fetch pattern used for live APIs
- Runs from a one-line local server
- Light & dark mode, no dependencies
Quickstart
$ curl -LO https://devai.io/downloads/random-quote.zip$ unzip random-quote.zip && cd random-quote$ python3 -m http.server 8000 # then open http://localhost:8000
about this tutorial
A devai.io starter tutorial — loading data with fetch, the reliable way to practice it.
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
Currency Converter
Convert between currencies at today's real exchange rates.
HTMLCSSJavaScriptfetch()+1
View template zip + preview