This section contains a reference for the REST API in WordPress - these are the basic routes that WordPress supports out of the box. Here you can find information about the endpoints available through the API, their parameters, response format, etc.
List of Basic WP Routes
All WP 5.9 Routes
/
/batch/v1
/oembed/1.0
/oembed/1.0/embed
/oembed/1.0/proxy
/wp/v2
/wp/v2/posts
/wp/v2/posts/(?P<id>[\\d]+)
/wp/v2/posts/(?P<parent>[\\d]+)/revisions
/wp/v2/posts/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)
/wp/v2/posts/(?P<id>[\\d]+)/autosaves
/wp/v2/posts/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/pages
/wp/v2/pages/(?P<id>[\\d]+)
/wp/v2/pages/(?P<parent>[\\d]+)/revisions
/wp/v2/pages/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)
/wp/v2/pages/(?P<id>[\\d]+)/autosaves
/wp/v2/pages/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/media
/wp/v2/media/(?P<id>[\\d]+)
/wp/v2/media/(?P<id>[\\d]+)/post-process
/wp/v2/media/(?P<id>[\\d]+)/edit
/wp/v2/menu-items
/wp/v2/menu-items/(?P<id>[\\d]+)
/wp/v2/menu-items/(?P<id>[\\d]+)/autosaves
/wp/v2/menu-items/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/blocks
/wp/v2/blocks/(?P<id>[\\d]+)
/wp/v2/blocks/(?P<parent>[\\d]+)/revisions
/wp/v2/blocks/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)
/wp/v2/blocks/(?P<id>[\\d]+)/autosaves
/wp/v2/blocks/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/templates
/wp/v2/templates/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w-]+)
/wp/v2/templates/(?P<parent>[\\d]+)/revisions
/wp/v2/templates/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)
/wp/v2/templates/(?P<id>[\\d]+)/autosaves
/wp/v2/templates/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/template-parts
/wp/v2/template-parts/(?P<id>([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w-]+)
/wp/v2/template-parts/(?P<parent>[\\d]+)/revisions
/wp/v2/template-parts/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)
/wp/v2/template-parts/(?P<id>[\\d]+)/autosaves
/wp/v2/template-parts/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/navigation
/wp/v2/navigation/(?P<id>[\\d]+)
/wp/v2/navigation/(?P<parent>[\\d]+)/revisions
/wp/v2/navigation/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)
/wp/v2/navigation/(?P<id>[\\d]+)/autosaves
/wp/v2/navigation/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)
/wp/v2/types
/wp/v2/types/(?P<type>[\\w-]+)
/wp/v2/statuses
/wp/v2/statuses/(?P<status>[\\w-]+)
/wp/v2/taxonomies
/wp/v2/taxonomies/(?P<taxonomy>[\\w-]+)
/wp/v2/categories
/wp/v2/categories/(?P<id>[\\d]+)
/wp/v2/tags
/wp/v2/tags/(?P<id>[\\d]+)
/wp/v2/menus
/wp/v2/menus/(?P<id>[\\d]+)
/wp/v2/users
/wp/v2/users/(?P<id>[\\d]+)
/wp/v2/users/me
/wp/v2/users/(?P<user_id>(?:[\\d]+|me))/application-passwords
/wp/v2/users/(?P<user_id>(?:[\\d]+|me))/application-passwords/introspect
/wp/v2/users/(?P<user_id>(?:[\\d]+|me))/application-passwords/(?P<uuid>[\\w\\-]+)
/wp/v2/comments
/wp/v2/comments/(?P<id>[\\d]+)
/wp/v2/search
/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)
/wp/v2/block-types
/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)
/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)
/wp/v2/global-styles/themes/(?P<stylesheet>[^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)
/wp/v2/global-styles/(?P<id>[\\/\\w-]+)
/wp/v2/settings
/wp/v2/themes
/wp/v2/themes/(?P<stylesheet>[^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)
/wp/v2/plugins
/wp/v2/plugins/(?P<plugin>[^.\\/]+(?:\\/[^.\\/]+)?)
/wp/v2/sidebars
/wp/v2/sidebars/(?P<id>[\\w-]+)
/wp/v2/widget-types
/wp/v2/widget-types/(?P<id>[a-zA-Z0-9_-]+)
/wp/v2/widget-types/(?P<id>[a-zA-Z0-9_-]+)/encode
/wp/v2/widget-types/(?P<id>[a-zA-Z0-9_-]+)/render
/wp/v2/widgets
/wp/v2/widgets/(?P<id>[\\w\\-]+)
/wp/v2/block-directory/search
/wp/v2/pattern-directory/patterns
/wp-site-health/v1
/wp-site-health/v1/tests/background-updates
/wp-site-health/v1/tests/loopback-requests
/wp-site-health/v1/tests/https-status
/wp-site-health/v1/tests/dotorg-communication
/wp-site-health/v1/tests/authorization-header
/wp-site-health/v1/directory-sizes
/wp-block-editor/v1
/wp-block-editor/v1/url-details
/wp/v2/menu-locations
/wp/v2/menu-locations/(?P<location>[\\w-]+)
/wp-block-editor/v1/export
Documentation for REST API
The WordPress REST API provides documentation for itself. It allows you to see the capabilities of a route: the route schema, what endpoints it has, and what parameters each endpoint can accept.
General documentation for the entire REST API can be obtained via a GET request to the main (root) route /wp-json/. Documentation for a specific route can be obtained by sending an OPTIONS request to it.
Example
For example, let's go to the site apirequest.io and send an OPTIONS request to the route (URL) http://demo.wp-api.org/wp-json/wp/v2/categories/1. In response, we will receive documentation for this route: