An API (Application Programming Interface) is a set of rules and protocols that allow different software applications to communicate with one another. In the context of WordPress, the best-known API is the WordPress REST API.
WordPress REST API
The WordPress REST API enables developers to communicate remotely with a WordPress website. With it you can:
- Retrieve content: request blog posts, pages and other content in JSON format.
- Create content: create new posts or pages via external applications.
- Update content: modify existing content without logging into the WordPress dashboard.
- Headless WordPress: use WordPress as a back end whilst a different framework (such as Astro or Next.js) handles the front end.
Commonly used WordPress APIs
- REST API: for retrieving and editing WordPress data via HTTP requests.
- Plugin API: hooks and filters that allow plugins to extend the functionality of WordPress.
- Settings API: for creating settings pages in the WordPress dashboard.
- WooCommerce API: specifically for managing products, orders and customers in WooCommerce.