REST API Handbook Edit
Using the WordPress REST API you can create a plugin to provide an entirely new admin experience for WordPress, build a brand new interactive front-end experience, or bring your WordPress content into completely separate applications.
The REST API is a developer-oriented feature of WordPress. It provides data access to the content of your site, and implements the same authentication restrictions — content that is public on your site is generally publicly accessible via the REST API, while private content, password-protected content, internal users, custom post types, and metadata is only available with authentication or if you specifically set it to be so. If you are not a developer, the most important thing to understand about the API is that it enables the block editor and modern plugin interfaces without compromising the security or privacy of your site.
What Is A REST API?
Note: The REST API is just one of many APIs provided by WordPress. You can find the documentation on these additional APIs here.
Using the WordPress REST API
WordPress already provides a rich set of tools and interfaces for building sites, and you should not feel pressured to use the REST API if your site is already working the way you expect. You do not need to use the REST API to build a WordPress theme or plugin.
admin-ajax, enabling you to spend less time accessing the data you need and more time creating better user experiences.
If you want a structured, extensible, and simple way to get data in and out of WordPress, you probably want to use the REST API.
For all of its simplicity the REST API can feel quite complex at first, so in this handbook we will attempt to break it down into smaller components to explain each part of the full puzzle.
Familiarize yourself with the key technical concepts behind how the REST API functions.
Learn more about how to interact with API resources and query for specific data in the Using the REST API section.
Once you’re comfortable with the default workings of the default routes and methods, discover how to add new data to the API or enhance and manipulate existing response objects in the Extending the REST API section.
For a comprehensive overview of the resources and routes available by default, review the API reference.