Title: Comments
Last modified: August 21, 2016

---

# Comments

 *  Resolved [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * (@peterluit)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/comments-185/)
 * Just to follow up this one: [http://wordpress.org/support/topic/pages-100?replies=5](http://wordpress.org/support/topic/pages-100?replies=5)
 * I now can get posts and pages, even single ones by the right ID.
 * I do however use: [http://www.xxxx.nl/wp-json/posts/](http://www.xxxx.nl/wp-json/posts/)
   to get alle the posts
    I want to get alle the comments belonging to each post
 * I does not seem to work to use [http://www.xxxx.nl/wp-json/posts/comments](http://www.xxxx.nl/wp-json/posts/comments),
   but
    [http://www.xxxx.nl/wp-json/posts/5215/comments](http://www.xxxx.nl/wp-json/posts/5215/comments)
   for all the comments belnging to one post works?
 * How can I get all comments?
 * Thanks,
 * Peter
 * [https://wordpress.org/plugins/json-rest-api/](https://wordpress.org/plugins/json-rest-api/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * (@peterluit)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/comments-185/#post-5038158)
 * Well, it seems to be a bit of a holiday here…. Any ideas on how to get comments
   with the JSON-REST-API?
 *  Thread Starter [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * (@peterluit)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/comments-185/#post-5038159)
 * OK, I just found out that:
 * [http://www.xxxx.xx/wp-json/posts/ID/comments](http://www.xxxx.xx/wp-json/posts/ID/comments)
 * give me the comments on one specific post.
 *  Thread Starter [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * (@peterluit)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/comments-185/#post-5038160)
 * [http://www.xxxx.xx/wp-json/posts/0/comments](http://www.xxxx.xx/wp-json/posts/0/comments)
   seems to give all comments. The next question is how to get the right comments
   belonging to each post……
 *  Thread Starter [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * (@peterluit)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/comments-185/#post-5038169)
 * Nobody any idea in solving the above question?
 *  Thread Starter [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * (@peterluit)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/comments-185/#post-5038186)
 * Well, I figured it out. It is not possible to make this in one JSON ‘request’.
   As a matter of fact this is a loop in a loop.
 * First I use [http://www.xxxx.xx/wp-json/posts](http://www.xxxx.xx/wp-json/posts)
   to get all posts, it returns all ID’s of each post as one of the many resultfields.
 * Second I use: [http://www.xxxx.xx/wp-json/posts/](http://www.xxxx.xx/wp-json/posts/){
   ID}/comments in my native app CMS, where {ID} is the pointer to each orginal 
   post and that then brings up any comments belonging to that post.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Comments’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-rest-api_2e3641.svg)
 * [WP REST API (WP API)](https://wordpress.org/plugins/json-rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-rest-api/reviews/)

 * 5 replies
 * 1 participant
 * Last reply from: [Peter Luit](https://wordpress.org/support/users/peterluit/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/comments-185/#post-5038186)
 * Status: resolved