Title: Use with Rest API
Last modified: October 30, 2017

---

# Use with Rest API

 *  Resolved [poopertropper](https://wordpress.org/support/users/poopertropper/)
 * (@poopertropper)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/use-with-rest-api/)
 * Can this module be used with the REST API instead of templates. I’d rather just
   query the API and get a list of results in JSON format so I can build my own 
   interfaces. Thanks!

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

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/use-with-rest-api/#post-9635617)
 * Yes, but you have to create your own endpoint, as the regular search endpoint
   is not compatible with Relevanssi.
 * See this for ideas: [https://gist.github.com/msaari/fe2da6a584f690a213db733d596b0030](https://gist.github.com/msaari/fe2da6a584f690a213db733d596b0030)
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/use-with-rest-api/#post-9635620)
 * Also, for AJAX purposes, you can query Relevanssi directly using relevanssi_do_query(),
   and use the `fields` parameter to request just post IDs instead of full post 
   objects.
 *  Thread Starter [poopertropper](https://wordpress.org/support/users/poopertropper/)
 * (@poopertropper)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/use-with-rest-api/#post-9635736)
 * fantastic news thanks!

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

The topic ‘Use with Rest API’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [poopertropper](https://wordpress.org/support/users/poopertropper/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/use-with-rest-api/#post-9635736)
 * Status: resolved