API
API (Application Programming Interface)
A set window where programs talk to each other in an agreed way: 'give me this', 'save that'.
💡 It's a restaurant's order window. You can't walk into the kitchen, but you order at the window and the food comes out.
🤖 Say this to your AI
Call a public air-quality API and show today's air quality for my city on a card. Hide the API key in an environment variable, show a loading state while it fetches, and show a friendly message if it fails.
The key word is ‘API (Application Programming Interface)’. Including it helps AI understand you much more precisely.
📌 Good to know
What you send to an API is a 'request', what comes back is a 'response', and the address that receives requests is an 'endpoint'. There's also a 'rate limit' that blocks you if you call it too often.
When to use it
- When you want to bring outside features like weather, maps, payments, or AI into your site
- When your screens and your server send data back and forth
Also called: connect a service, integration, request, response, endpoint, rest api, fetch, third-party service