API design introduction
easy 24 minAn API is a contract: it says what a program may ask for and what it gets back, and it hides how the work is done.
Where it shows up
The same pattern appears across everyday software.
Stripe
Payments are offered as resources such as charges, customers and refunds, with test keys so developers can try every case.
Google Maps Platform
Maps, places and routes are used by other companies' apps through web APIs with keys and quotas.
GitHub
Repositories, issues and pull requests have REST addresses. The same data is also offered through GraphQL.
Phone apps and their backend
The app on your phone is a client of its company's private API. Old app versions stay installed for years, so the contract must last.
Partner integrations
Airlines, hotels and banks exchange data with partners through documented APIs instead of sharing databases.
Teams inside one company
Services owned by different teams talk only through APIs, so each team can change its storage without a meeting.