Title: Rest API select filter syntax
Last modified: May 10, 2025

---

# Rest API select filter syntax

 *  Resolved [simplifydata](https://wordpress.org/support/users/simplifydata/)
 * (@simplifydata)
 * [1 year ago](https://wordpress.org/support/topic/rest-api-select-filter-syntax/)
 * I can successfully use the select endpoint to retrieve rows from my tables. Now
   I want to filter the results. I’m pretty sure I need to use the search_columns
   and search_column_fns parameters, but I cannot figure out the syntax and I can’t
   find any documentation. Everything I try just results in all rows being returned.
   That table has 700k rows, so that’s not really an option!
 * Specifically, I’m querying a table called wp_give_donationmeta. I need to find
   all rows where meta_key=”_give_payment_form_id” and meta_value=342749. 
   The SQL
   query would be:select donation_id from wp_give_donationmeta where meta_key=”_give_payment_form_id”
   and meta_value=342749;What I’ve tried:search_columns: {“meta_key”: “_give_payment_form_id”,“
   meta_value”: 342749}search_column_fns: {“meta_key”:” = “, “meta_value”: ” = “}
   Also tried: ” = “, “like”, ” like “, “equal”, “equals”, and finally tried just
   leaving that parameter out entirely.
 * More generally, where do I find documentation about how to construct complex 
   filters, which might have several ANDs and ORs?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frest-api-select-filter-syntax%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Kim L](https://wordpress.org/support/users/kimmyx/)
 * (@kimmyx)
 * [1 year ago](https://wordpress.org/support/topic/rest-api-select-filter-syntax/#post-18461126)
 * Hi [@simplifydata](https://wordpress.org/support/users/simplifydata/),
 * Thanks for the post! We responded to your ticket regarding this.
 * Could you take a look?
 * Thank you! 🙏

Viewing 1 replies (of 1 total)

The topic ‘Rest API select filter syntax’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kim L](https://wordpress.org/support/users/kimmyx/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/rest-api-select-filter-syntax/#post-18461126)
 * Status: resolved