# How do I get all posts from a specific category?

**URL:** <https://meta.discourse.org/t/how-do-i-get-all-posts-from-a-specific-category/31589>\
**Category:** Feature\
**Created:** [July 31, 2015, 1:26am UTC](https://meta.discourse.org/t/how-do-i-get-all-posts-from-a-specific-category/31589 "2015-07-31T01:26:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![chenny408](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chenny408](https://meta.discourse.org/u/chenny408)\
**Post date:** [August 4, 2015, 4:35pm UTC](https://meta.discourse.org/t/how-do-i-get-all-posts-from-a-specific-category/31589/7 "2015-08-04T16:35:04Z")

</div>

awesome thanks.. anyone know how to use the Ruby gem to call this?  
[https://github.com/discourse/discourse\_api](https://github.com/discourse/discourse_api)

I see in the source code, but wasnt able to create the right parameters to successfully retrieve the query results.

```
  # @param term [String] a search term
  # @param options [Hash] A customizable set of options
  # @option options [String] :type_filter Returns results of the specified type.
  # @return [Array] Return results as an array of Hashes.
  def search(term, options={})
    response = get('/search/query', options.merge(term: term))
    response[:body]
  end

```

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-get-all-posts-from-a-specific-category/31589)._
