Topic 48

Try It on a Real API

Next Steps

Tandem kept every promise for ten chapters because it was built to keep them. Its documentation matched its behavior except where the book arranged otherwise, its errors arrived in the order that taught something, and even its rush hour ran to a schedule. Real APIs are not written by an author. This is the page where the training wheels come off.

What follows is a short shelf of real public APIs, free and beginner-kind as of 2026, plus the thing that matters far more than the shelf: a four-step ritual for approaching an API you have never seen. Ninety seconds from a cold start to a first response is the ordinary experience, not a lucky one. Think of it as the driving lesson that finally leaves the practice lot: same car, same controls, real traffic — and what you take with you is the instructor's voice, not the lot. Here the instructor's voice is the ritual. The shelf is only where you practice it.

The four moves, in order, on any API you meet
Docs foundone endpoint, read properly
Terms checkedkey, limits, price
Smallest GET sentnothing optional yet
Response readyou are in

The Approach Ritual

Four moves, in this order, for the rest of your career. Find the documentation and read the reference page for one endpoint, the way Chapter 6 taught: the address, the parameters, the shape of the answer. Check the terms: does it want a key, what limits are posted, what costs money past the free tier. Send the smallest possible GET, with nothing optional in it, from curl or the address bar. Read what came back, pretty-printed, finding the shape before the details.

Not one of those moves is new. That is the whole point of this page. You have done all four repeatedly on Tandem; doing them on an API nobody wrote for you is the same act with the safety net taken away, and the only way to discover the net was not holding you up.

One habit belongs inside move two, because beginners skip it and then feel ambushed. Read the limits before you write anything that loops. A free tier is a commons, and a commons has rules that exist whether or not you looked them up.

Playgrounds That Need No Key

Three names, all keyless as of 2026, all answering a plain GET from a browser or a terminal. Open-Meteo gives weather by coordinates with no sign-up at all, at api.open-meteo.com/v1/forecast, and it is the gentlest first contact on the list. {JSON} Placeholder serves fake blog posts, made for exactly this kind of practice, at jsonplaceholder.typicode.com/posts/1; nothing there is real, which makes it a safe place to try a POST. PokéAPI is deep, nested and paginated, at pokeapi.co/api/v2/pokemon/ditto, and it is a gymnasium for Chapter 4's nesting and Chapter 8's pages. (A shelf like this shifts under you, by the way — a fourth name this book once considered moved behind a key while the book was being written. The ritual is what lasts.)

Pick two, not one. The transfer this page is after happens on the second unfamiliar API, at the moment you notice you already know what to do.

One Key, One Step Up

Two more add exactly one new step, and it is the step Chapter 5 spent five topics on. GitHub's REST API answers many requests with no key at all, at a deliberately low hourly allowance; create a personal token in your account settings, send it in the Authorization header, and the allowance rises sharply. Its responses carry rate-limit headers, so you can watch your remaining budget fall with every call. That is Chapter 5 and Chapter 8 in one live lesson, quite possibly on an account you already have. Start at api.github.com/users/octocat.

NASA's APIs take the other common shape: a demo key printed in the documentation that anybody may use within tight limits, and your own key emailed a minute after you ask for it. Send api.nasa.gov/planetary/apod?api_key=DEMO_KEY and the astronomy picture of the day comes back as JSON, with a title, an explanation and an image address. Both providers have documentation worth reading for its own sake: clear reference pages, honest limits, examples that run.

A Worked Pass, Out Loud

Run the ritual on Open-Meteo, narrated. Move one: the documentation lists a forecast endpoint, and two of its parameters are required, the latitude and the longitude. Move two: the terms say free for reasonable non-commercial use, no key, with posted limits, so the manners from Chapter 8 apply from the first request. Move three: the smallest useful GET, using Old Market's coordinates because those are the two numbers you know by heart.

Move three: the smallest request that can succeed, sent by hand
curl "https://api.open-meteo.com/v1/forecast?latitude=47.21&longitude=8.55&current=temperature_2m,wind_speed_10m"

Move four: read the answer. It is a JSON object; the current weather sits in a field of its own, alongside a few facts about the place and its time zone. Objects inside objects, exactly as Chapter 4 drew them. Nothing there needed a skill you did not already have.

Now the wrinkle Tandem never had. Ask about the same place without naming what you want to know, and the request succeeds, healthily, with no weather in it whatsoever: coordinates, elevation, time zone, and that is all.

The same address, one parameter short: a success with no weather in it
curl "https://api.open-meteo.com/v1/forecast?latitude=47.21&longitude=8.55"

Tandem's stations endpoint always answered with everything it had. This one makes you name the measurements you want, and says so plainly on its first documentation page. That is the entire wrinkle, and it cost one visit to the docs to resolve. Notice what did not happen: no panic, no hunting for a tutorial, no message to a colleague. The kit held.

Where to Find a Hundred More

Several community-maintained directories list public APIs by category, with a column saying whether a key is needed. They are worth a bookmark and a slow scroll, because reading fifty one-line descriptions turns out to be a good way to learn what APIs are actually for. Judge any entry in thirty seconds: is there documentation, does it state its limits, and does it show an example request? An API that hides all three has told you something before you sent a single byte.

Common Confusions
  • "Real APIs will be harsher than the training one." Mostly they are messier in the documentation, not harsher on the wire. The mechanics are the ones you know, and Chapter 6 already warned you that docs drift behind reality. The ritual absorbs the mess.
  • "Free tier means free to hammer." Every entry on this shelf posts limits, and they apply from request number one. A free API is a commons paid for by somebody, and Chapter 8's manners are how you stay welcome in it.
  • "I should pick one best API and learn it properly." Tandem was that API, and it is finished. The assignment now is breadth: three APIs approached in one afternoon teach the transfer that another month of depth would not.
Why It Matters
  • First unassisted contact with a real API is this course's graduation exercise. Once it is behind you, "works with APIs" on a CV is simply a description of something you have done, which is a different feeling from hoping nobody asks.
  • The four-step ritual is the permanent takeaway. Every API you meet for the rest of your working life gets the same calm opening, and the ones that resist it have told you what they are worth.

Knowledge Check

What is the first move of the ritual on an API you have never used?

  • Read one endpoint's page in the documentation
  • Send the smallest request and see what comes back
  • Create an account so a key is ready when needed
  • Look for a tutorial someone wrote about that API

A free API's documentation posts a limit on how often you may call it. When does that limit start applying to you?

  • From request number one, key or no key
  • Only once you have registered for a key
  • Only when you start paying for the service
  • Never, since posted limits are only guidance

In the worked pass, a request without the weather parameter still succeeded. What did that teach?

  • That the provider returns an error naming the missing part
  • That some responses stay empty until you register a key
  • That a success can still hold nothing you wanted
  • That coordinates alone are never a valid request

Why does the page ask you to approach two or three APIs rather than one?

  • Because three keys give you a larger combined allowance
  • Because breadth is what proves the skill transferred
  • Because no single API contains every JSON shape
  • Because providers expect newcomers to compare them

You got correct