Web APIs
A Web API is a browser-provided interface that JavaScript can use to work with the page, storage, graphics, device capabilities, and more.
Choose a path
- Start with the problem you want to solve.
- Learn the smallest API example.
- Check support, permissions, accessibility, and fallback behavior.
Local reference paths
- DOM API
- Find and change the document tree with JavaScript.
- Canvas API
- Draw shapes, text, images, and animations.
- Console API
- Inspect values, errors, and timing while debugging.
- Web Storage
- Save small non-sensitive values in the browser.
- Geolocation API
- Request location with permission and privacy in mind.
- Constraint Validation API
- Use HTML constraints and inspect form validity.
- Drag and Drop API
- Move data while providing a keyboard alternative.
- View Transitions API
- Enhance DOM changes with optional motion.
Common rules
- Check feature support before calling an API.
- Handle permission denial and unavailable devices gracefully.
- Do not expose private data or treat client-side checks as server-side security.
- Test keyboard use, reduced motion, and slow or offline networks where relevant.