Back to Home
Chapter 1

What's an API?

The contract between systems

An API is a contract — a published, stable agreement about how one system asks another for something. Without it, you end up scraping HTML, parsing scratch formats, or sharing a database and praying nobody changes the schema. With it, two teams can change their internals freely as long as the contract holds. The contract is the real boundary.

System A
parses HTML
System B
exposes raw DB
ad-hoc parserscraped HTMLshared DB

Without a contract, any internal change on one side breaks every consumer that was poking at its internals.

Key takeaways
  • An API is a contract — a stable promise about request and response shape
  • Contracts decouple producer and consumer so they can evolve independently
  • Without a contract, you fall back to scraping, shared DBs, or ad-hoc parsing
  • Versioning the contract lets you change implementations without breaking clients