What is API (Application Programming Interface)?
A set of rules and protocols that allows different software applications to communicate and exchange data.
APIs define how software components interact. Web APIs (typically REST or GraphQL) allow applications to request and send data over HTTP. For example, a weather app uses a weather API to get forecast data.
REST APIs use standard HTTP methods (GET, POST, PUT, DELETE) and return JSON/XML. GraphQL APIs let clients specify exactly what data they need. API design principles include versioning, authentication, rate limiting, and clear documentation.