Skip to content

Instantly share code, notes, and snippets.

@ashley-hebler
Last active July 26, 2018 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashley-hebler/84f4b68d223ee4fa5814954e4a2b0f34 to your computer and use it in GitHub Desktop.
Save ashley-hebler/84f4b68d223ee4fa5814954e4a2b0f34 to your computer and use it in GitHub Desktop.
WordPress API chart

WordPress API chart

Source Prefix Pattern Example
Self Hosted time.com /wp-json/wp/v2/posts List posts
Public API public-api.wordpress.com /wp/v2/sites/$site/posts/ List posts
Public API WordPress.com Deprecated* public-api.wordpress.com /rest/v1.1/sites/$site/posts/ List posts

*Jetpack still relies on v1 for certain features. For example a POST request is made for the related feature. https://public-api.wordpress.com/rest/v1/sites/{$site}/posts/$post_id/related/

Key differences

  • Self Hosted can be extended and manipulated to meet custom needs.

  • The endpoints for the public api have a few more options like sites and menus, but those require authentication.

Developer Console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment