Sunday, Nov 8, 2026|
Mode: demo
WordPress & CMS••8 min read

Understanding the WordPress REST API

A pragmatic guide to default WP endpoints, authentication models, query parameters, and custom route hooks.

Elena Rostova
Elena Rostova
Lead API Platform Engineer
ID #3Static Pre-rendered
Illustration showing JSON REST API requests and responses from WordPress
Illustration showing JSON REST API requests and responses from WordPress

Since WordPress 4.7, the core platform has included a native REST API located at /wp-json/wp/v2/. Understanding how this API functions is the bedrock of building any resilient decoupled publishing system.

Core Endpoints Overview

WordPress exposes standard endpoints for all default post types and taxonomies:

  • GET /wp-json/wp/v2/posts — Fetch paginated blog articles
  • GET /wp-json/wp/v2/categories — Retrieve taxonomy terms
  • GET /wp-json/wp/v2/tags — Access post tags
  • GET /wp-json/wp/v2/media — Query uploaded images, documents, and media metadata
  • GET /wp-json/wp/v2/users — Retrieve public author profile data

The Power of Query Parameters

By default, WordPress returns 10 items per page and sets headers such as X-WP-Total and X-WP-TotalPages. You can tailor requests using standard query parameters:

GET /wp-json/wp/v2/posts?_embed=1&per_page=12&categories=4&_fields=id,slug,title,excerpt,date,_links,_embedded

Using _embed=1 directs WordPress to resolve linked media (featured images) and author details into an _embedded object, sparing you from making N+1 API requests.

Common Pitfalls in Stock REST APIs

While powerful, the default REST API was designed as an all-purpose administrative API rather than a fine-tuned content delivery endpoint. Payloads often contain excess metadata, raw internal IDs, and complex nested objects that demand custom transformation.

Tags:#WordPress#REST API#Backend#JSON
Elena Rostova

Written by Elena Rostova

Lead API Platform Engineer

Elena specializes in API contract engineering, REST scalability, and headless CMS integrations.

Recommended Reading

Related Articles

Explore All →