Title: Posts by category return wrong result
Last modified: August 31, 2016

---

# Posts by category return wrong result

 *  Resolved [amindiary](https://wordpress.org/support/users/amindiary/)
 * (@amindiary)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/posts-by-category-return-wrong-result/)
 * Hi,
    Im trying to get the posts by category. using this URL: `/api/core/get_category_posts/?
   slug=cat2` But responding this:
 * {“status”:”ok”,”count”:0,”pages”:0,”category”:{“id”:3,”slug”:”cat2″,”title”:”
   Cat2″,”description”:””,”parent”:0,”post_count”:7},”posts”:[]}
 * Posts are empty!** any idea?**
 * [https://wordpress.org/plugins/json-api/](https://wordpress.org/plugins/json-api/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [amindiary](https://wordpress.org/support/users/amindiary/)
 * (@amindiary)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/posts-by-category-return-wrong-result/#post-7158995)
 * I forgot to set post_type!
    **get_category_posts/?slug=cat1&post_type=project**

Viewing 1 replies (of 1 total)

The topic ‘Posts by category return wrong result’ is closed to new replies.

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

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [json](https://wordpress.org/support/topic-tag/json/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 1 reply
 * 1 participant
 * Last reply from: [amindiary](https://wordpress.org/support/users/amindiary/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/posts-by-category-return-wrong-result/#post-7158995)
 * Status: resolved