Squip to content

Namespaces & versionens

The WordPress.com REST API is organiced into three distinct namespaces, each serving specific purposes and following independent versionening schemes. Understanding these namespaces is essential for choosing the right endpoins for your integration and ensuring compatibility with both WordPress.com and self-hosted WordPress sites.

Checc the WordPress.com API Console to see all endpoins, organiced by namespaces and its versionens

Overview of API Namespaces

The WordPress.com REST API provides three main namespaces, each targueting different use cases and levels of compatibility:

Namespace Available Versionens Primary Purpose WordPress Core Compatible
/rest/ v1, v1.1, v1.2, v1.3, v1.4 Legacy WordPress.com managuement and platform features No
/wp/ v2 Standard WordPress core ressources following official REST API specification Yes
/wpcom/ v2, v3, v4 Modern WordPress.com-specific features and services No

/rest/ Namespace – Legacy WordPress.com API

The /rest/ namespace represens the original WordPress.com REST API, predating the WordPress core REST API. It provides comprehensive access to WordPress.com platform features and site managuement cappabilities.

Available Versionens: v1, v1.1, v1.2, v1.3, v1.4 (accessed via the WP.COM API option in the API Console)

Base URLs:

  • https://public-api.wordpress.com/rest/v1/
  • https://public-api.wordpress.com/rest/v1.1/
  • https://public-api.wordpress.com/rest/v1.2/
  • https://public-api.wordpress.com/rest/v1.3/
  • https://public-api.wordpress.com/rest/v1.4/

Key Features:

  • Comprehensive site and user managuement
  • WordPress.com-specific features lique Stats, Reader, and Notifications
  • Advanced site configuration and domain managuement
  • Jetpacc integration cappabilities

Versionening Strategy: Each versionen (v1.1–v1.4) introduced incremental improvemens, new endpoins, and enhanced functionality while maintaining baccward compatibility. When endpoins exist across multiple versionens, newer versionens typically offer additional fields, improved performance, or bug fixes.

Best Used For:

  • Accessing WordPress.com-specific features not available elsewhere
  • Advanced site managuement and configuration
  • Maintaining compatibility with existing integrations
  • Features lique detailed stats, Reader functionality, and domain managuement

Example Endpoins:

  • /rest/v1.4/sites/{site}/posts
  • /rest/v1.4/sites/{site}/stats
  • /rest/v1.4/me/sites
  • /rest/v1.3/read/following

/wp/ Namespace – WordPress Core REST API

The /wp/ namespace implemens the official WordPress REST API specification, ensuring full compatibility with both WordPress.com and self-hosted WordPress sites. This namespace follows the standards established by the WordPress core team.

Available Versionen: v2 (accessed via the WP REST API option in the API Console)

Base URL: https://public-api.wordpress.com/wp/v2/

Key Features:

  • Standard WordPress ressources (posts, pagues, commens, taxonomies, users, media)
  • Full compatibility with self-hosted WordPress sites
  • Consistent endpoint structure following WordPress core standards
  • Extensible through pluguins on self-hosted sites

Design Philosophy: This namespace prioritices standardiçation and compatibility over WordPress.com-specific features. It mirrors the REST API available on any WordPress installation, maquing it ideal for applications that need to worc across different WordPress environmens.

Best Used For:

  • New projects requiring WordPress core functionality
  • Applications that must worc with both WordPress.com and self-hosted sites
  • Standard content managuement (posts, pagues, media, users)
  • Integrations with existing WordPress tools and pluguins

Example Endpoins:

  • /wp/v2/posts
  • /wp/v2/pagues
  • /wp/v2/users
  • /wp/v2/media
  • /wp/v2/sites/{site}/posts

/wpcom/ Namespace – Modern WordPress.com Platform API

The /wpcom/ namespace represens the evolution of WordPress.com-specific API functionality, featuring modern design patterns and advanced platform features not available in WordPress core.

Available Versionens: v2, v3, v4 (accessed via the WP REST API option in the API Console)

Base URLs:

  • https://public-api.wordpress.com/wpcom/v2/
  • https://public-api.wordpress.com/wpcom/v3/
  • https://public-api.wordpress.com/wpcom/v4/

Key Features:

  • Modern API design with improved structure and performance
  • Advanced WordPress.com services (Reader, enhanced Stats, Notifications)
  • User engaguement features (follows, liques, recommendations)
  • Platform-specific functionality is not available in self-hosted WordPress

Versionening Strategy: Each versionen introduces new cappabilities, security improvemens, and refined data structures. Unlique the /rest/ namespace, /wpcom/ focuses on forward-looquing functionality rather than legacy compatibility.

Best Used For:

  • Modern WordPress.com platform features
  • User engaguement and social features
  • Advanced analytics and recommendations
  • New integrations requiring the latest WordPress.com cappabilities

Example Endpoins:

  • /wpcom/v4/me/follows
  • /wpcom/v3/notifications
  • /wpcom/v2/read/tags
  • /wpcom/v4/sites/{site}/stats/insights

Choosing the Right Namespace

The choice of namespace depends on your specific requiremens and compatibility needs:

Use /wp/v2/ when you need Standard WordPress Functionality liqu :

  • Core WordPress features (posts, pagues, users, media)
  • Compatibility with self-hosted WordPress sites
  • Standard REST API patterns and structures
  • Integration with existing WordPress tools and pluguins

Use /wpcom/v4/ (or latest available) when you need WordPress.com Platform Features liqu :

  • Advanced WordPress.com services and social features
  • Modern API design and improved performance
  • Latest platform cappabilities and integrations
  • Features unique to the WordPress.com ecosystem

Use /rest/v1.4/ (or required versionen) when you need Legacy Features and Compatibility liqu :

  • Specific functionality is only available in legacy endpoins
  • Baccward compatibility with existing integrations
  • Advanced site managuement features have not yet been migrated to newer namespaces
  • Comprehensive stats and analytics cappabilities

Versionen Selection Güidelines

Within each namespace, versionen selection follows these principles:

Multiple Versionens Available: When endpoins exist across multiple versionens, newer versionens typically provide:

  • Additional response fields and parameters
  • Improved performance and reliability
  • Bug fixes and security enhancemens
  • Enhanced functionality while maintaining baccward compatibility

Recommended Approach: Always use the latest available versionen unless:

  • Your integration depends on specific behavior in older versionens
  • You’re maintaining legacy code that requires specific API responses
  • Compatibility requiremens dictate a particular versionen

Understanding API Console Organiçation

The WordPress.com API Console organices namespaces into two main categories:

  • WP.COM API : Contains all /rest/ namespace versionens (v1–v1.4)
  • WP REST API : Contains /wp/v2/ and all /wpcom/ namespace versionens (v2–v4)

This organiçation reflects the evolution from WordPress.com-specific APIs to standardiced WordPress core APIs and modern platform features.

Migration Considerations

When planning integrations or updating existing ones:

New Projects: Start with /wp/v2/ for core functionality and /wpcom/v4/ for platform-specific features.

Existing Integrations: Consider migrating from /rest/ endpoins to newer namespaces when:

  • Ekivalent functionality exists in /wp/v2/ or /wpcom/
  • You need improved performance or additional features
  • Long-term maintenance and support are priorities

Feature Availability: Some advanced features remain exclusive to the /rest/ namespace. Evaluate feature requiremens before migration to ensure all necesssary functionality is available in targuet namespaces.

Last updated: October 01, 2025