
An API, short for application programming interface, is a set of rules that lets one program request data or an action from another program. The rules say how a request must look and what the reply will contain, so the two programs can cooperate without knowing anything about each other’s insides.
A real example makes the idea concrete. The World Bank publishes an API for its statistical series. We rechecked this request on October 16, 2026:
https://api.worldbank.org/v2/country/USA;BRA;IND/indicator/IT.NET.USER.ZS?format=json&date=2013:2025&per_page=100
Read left to right, the request has three parts. The address (api.worldbank.org/v2) says which service is being called and which version of its rules applies. The path names what is wanted: three countries, separated by semicolons, and one indicator, the share of people using the internet. The text after the question mark holds settings: JSON format, the years 2013 through 2025, and up to 100 rows per page. The reply was 39 rows, one for each country and year, such as United States, 2024, 94.69380188. The data behind the chart on our Digital Divide Explorer arrives the same way.
The conversation underneath
Most web APIs use HTTP, the protocol that also loads web pages. The standard that defines it, RFC 9110, calls HTTP “a stateless application-level protocol for distributed, collaborative, hypertext information systems.” Stateless means each HTTP request can be understood on its own. Applications can still maintain sessions or other state above HTTP.
Every reply carries a status code, a three-digit number that tells the sender how the request went. Mozilla’s developer documentation groups them by range:
- 200 to 299 mean success. A
200 OKto a request for data means the resource was fetched and sent back in the reply. - 400 to 499 are client-error responses. A
404 Not Foundmeans the server cannot find the thing requested. A429 Too Many Requestsmeans the sender hit a rate limit. - 500 to 599 are server-error responses, such as a service being temporarily unavailable.
A program that calls an API has to plan for each of those outcomes. It must also inspect the response body: a successful HTTP status does not prove that the requested data is present or usable.
What the documentation promises
An API’s documentation works as a contract. The World Bank’s page on call structure shows the settings you can use, and some of the details are easy to miss:
- Replies come back as XML unless you ask for JSON with
format=json. - Results are paged. The default is 50 rows per request, adjustable with
per_page, so a program that asks for a long series without checking the page count can silently receive only the first slice. - The API does not offer general sorting controls. Match records by country code and year rather than assuming a particular row order.
- An invalid request returns an error element instead of data.
Reading those notes before writing code saves the kind of mistake that produces a plausible chart from an incomplete download.
What an API does not tell you
An API delivers what the source holds, including its gaps. In the reply above, Brazil’s value for 2025 is null and so is the United States’. Software that receives a null has to decide what to do with it, and treating it as zero would be wrong. Our explorer leaves a gap instead.
An API also does not explain the numbers. The reply carries a value and a year; the definition of “individuals using the internet” lives in the indicator’s metadata. And access is different from permission to reuse. The World Bank’s entry for this series lists a CC BY 4.0 license and asks users to cite the International Telecommunication Union, so a program can fetch the data freely and still owe credit when it publishes the result.
APIs, pipelines, and AI agents
APIs often serve as the first step in a data pipeline: a scheduled job calls an API, stores the response, and passes it along. Our comparison of warehouses, lakes, and lakehouses describes places where that data often lands.
APIs also give AI systems their hands. When an AI agent books a meeting, queries a database, or posts a message, it usually does so by calling an API. Each call is an action with consequences, which is why our article on what an AI agent should be allowed to do matters here. It argues that the database account, not a prompt, should enforce an agent’s limits. The same principle applies to the credentials an agent uses to call an API, though that extension is ours. And because every dataset has an owner and a license, data governance decides which APIs a team may call and what it may do with the replies.
Questions to ask about any API
- What does the documentation say about paging, limits, and errors?
- What happens when a value is missing?
- Who owns the data, and what does its license require?
- Which version of the API does the program call, and what happens when that version is retired?
An API makes data easy to reach. Whether the data is complete, current, and permitted for your use still takes a human to check.
Sources and further reading
- World Bank Indicators API, IT.NET.USER.ZS, United States, Brazil, and India, 2013–2025: observations rechecked October 16, 2026; response source update October 8, 2026. Original data source: ITU; distributed by the World Bank under CC BY 4.0.
- World Bank Data Help Desk, API Basic Call Structures: URL structure, parameters, formats, paging, and errors.
- IETF, RFC 9110: HTTP Semantics: the definition of HTTP and its methods.
- MDN Web Docs, HTTP response status codes: status code classes and common codes.
- World Bank DataBank, series IT.NET.USER.ZS metadata: license and citation request.
Read next
Know someone who would find this useful?
Share it with a colleague or post it where your team talks about data.

The Data Behind AI
A 48-page illustrated guide to databases, search, and intelligent systems. No coding required.
Explore the book →