As of Jetpack 1.9, the REST API can now access self-hosted WordPress blogs with the Jetpack plugin installed.

Instead of just building for the platform, you can build awesome applications that interact with WordPress in general. Any applications built using the API for will automatically work with Jetpack-enabled sites running Jetpack 1.9 or higher.

Check out our documentation, create an app, and get started today!

20 thoughts on “Using the REST API with self-hosted sites via Jetpack

  1. QUESTION: is there a link that explains why REST API can be useful and show examples? This sounds like something that would be a valuable tool but Google searches take me to technical explanations.

    It’s like I’m trying to find out about uses for a jackhammer and everything is telling me about air pressure, vibration, and safety precautions. But nothing plainly stating. “This is for busting up concrete when you need to get at piping underneath, or need to remove a section of bad road to repave it.”


    1. The REST API is provided specifically for developers to be able to programmatically interact with blogs (e.g. via raw data, rather than going to a webpage etc). It can be used for all sorts of things, including editing posts in a different interface, creating new posts based on user input in your own application, loading the content from a site, Following and Liking posts, etc. What it’s used for is kind of up to the developers who choose to use it :)

  2. More than a little confused how this works with a self hosted site.

    – Is everything still going through the public API – which then access our self hosted site (via Jetpack link)?

    – Is user authentication, authenticating against accounts that have been created on our own site, or is it just authenticating users who have accounts?

    – Any plans to release a rest api for self hosted sites that allows them to operate independently of

  3. The public JSON API is not working at all for my self-hosted site with JetPack installed and connected. Is there a tutorial that explains this? Also, the sites not hosted at the domain root. its in a subdirectory:

  4. I did not see this in the documentation: is it possible to get data for wordpress PAGES? Also, what about data that may be used by a plug-in, widget and so on?

    There is some great potential for using WP as the back-end for some great website experiences. I am excited to experiment!

  5. Possible to use this with ajax? Looks like even with self-hosted sites, you have CORS issues. How do you set the access-control-allow-origin header to make use of this? Setting a header at the beginning of response in my child theme does not make it into the response from the public api call. However, the filters in my child theme do effect the response and work great…

  6. I have another question. Can I make the API calls secure? I mean the api should only return results if the user is authorised to access the blog. I am using Jetpack to enable JSON and can not find a way to limit access to my posts.

  7. For some reason, the reply shows at the wrong place, please delete one of the replies at your will…
    Yes, it is a self-hosted public blog (user can not join, but posts are public). I am concerned that REST API will make it super easy to pick up the content. I only serve excerpts in the RSS feed. However, the REST API always provides full content by default.

  8. We currently don’t offer an option to disable public API calls (our view is that since the content is already public, it’s ok to offer it in another format) – if it’s a private blog we usually detect it and automatically disable the feature.

    I can mark your suggestion for having an option, though.

  9. I think, it will be a lot better if JSON API works like XML RPC. You should have an option to ask for user credentials before reading the full content of the posts. This way we can create a user with (minimum) read access and use it to call the API. Or else the API should return only the excerpt (or whatever is set for the RSS Feed).

    I hope to see this option in Jetpack some day.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s