WordPress REST endpoint with JSON for Mobile App integration

Is there some REST API that WordPress supports, out of the box or through any plugin that exposes the same information exposed through the normal pages? (I.e. latest posts, filtering by categories etc.)

There seems to be a JSON API plugin but it seems to be very old and not maintained.

There also seems to be some plugin called Jetpack but not sure if it provides what I am looking for (seems more dedicated to content management rather than exposing it publicly).

I am trying to integrate a Mobile App with a WordPress Blog, and I need to find the best way to transfer the information to the application in terms of performance and also displaying it right. (Any ideas appreciated)

4 Answers
4

The REST API can be used for straight-up retrieval on any blog that has enabled it. Self-hosteds require an active choice to turn the JSON interface on in Jetpack but once it’s up it’s wide open.

This is not necessarily appreciated by everyone, and that’s somewhat understandable. I picked a blog ID at random here for the /posts/ call:

https://public-api.wordpress.com/rest/v1/sites/2833/posts/

That’s the full output. If you were trying to make life marginally harder for scrapers by only providing excerpts in your RSS feed then this pretty much undoes that. It’s a pretty false sense of security – if your blog is public then it’s scrapeable – but not everyone loves this fact.

For your purposes you can absolutely just use the API to pull individual posts and display them in an alternate manner.

Leave a Comment