Requests and Responses
What this is. An API is a way for one program to ask another program for something. On the web that almost always means: you send an HTTP request to an address, and you get back data rather than a page.
That is the whole idea. A web page is for a person; an API response is for a program.
Why this matters more than it sounds. Almost nothing useful is built from data you produced yourself. Weather, transit times, prices, library catalogues, census figures, museum collections: all of it lives somewhere else, and an API is how you reach it.
The skill is not the request. Anyone can write the request in ten minutes. The skill is everything around it: understanding what came back, what is missing, what it is safe to conclude, and how to behave on someone else's infrastructure.
✦ You are a guest
Nearly every API you use in this course is free and run by a library, a museum, a government or a volunteer. Someone pays for that server. Requesting politely, caching what you fetch, and identifying yourself are not optional courtesies; on several archives they are conditions of use.
Mark this lesson complete
Your progress is saved on this device. No account needed.