Title: WP REST API FIlter meta query
Last modified: January 30, 2017

---

# WP REST API FIlter meta query

 *  [chsuit00](https://wordpress.org/support/users/chsuit00/)
 * (@chsuit00)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wp-rest-api-filter-meta-query/)
 * Hi, i want to filter the events by teams or league. But both queries doesnt work
   and give the full results.
 * [http://test.wasserball-kirchheim.de/wp-json/sportspress/v2/events?filter%5Bsp_league%5D=bw-pokal](http://test.wasserball-kirchheim.de/wp-json/sportspress/v2/events?filter%5Bsp_league%5D=bw-pokal)
 * [http://test.wasserball-kirchheim.de/wp-json/sportspress/v2/events?filter%5Bmeta_key%5D=sp_team&filter%5Bmeta_value%5D=4422](http://test.wasserball-kirchheim.de/wp-json/sportspress/v2/events?filter%5Bmeta_key%5D=sp_team&filter%5Bmeta_value%5D=4422)
 * For example the search query is working:
    [http://test.wasserball-kirchheim.de/wp-json/sportspress/v2/events?search=”SSV](http://test.wasserball-kirchheim.de/wp-json/sportspress/v2/events?search=”SSV)
   Ulm 1846 vs WBG Villingen/Schwenningen”
 * What i am doing wrong?
 * Thanks

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

 *  [Roch](https://wordpress.org/support/users/rochesterj/)
 * (@rochesterj)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wp-rest-api-filter-meta-query/#post-8718383)
 * Hi!
 * Thanks for reaching out and I’m sorry for the trouble
 * What is wrong with your queries exactly?
 * Please let us know so we can elaborate this to our dev team check.
 * Thanks!
 * Kind Regards,
    -Roch
 *  Thread Starter [chsuit00](https://wordpress.org/support/users/chsuit00/)
 * (@chsuit00)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wp-rest-api-filter-meta-query/#post-8719255)
 * hi,
 * the first and second queries doesnt filter anything. They give alwasy the full
   results. In the second query i want to filter for events by teamid 4422, but 
   i get the events for all teams. Even the first result of the query doesnt match
   the filter.
    The third query is working.
 * Thanks
 *  Thread Starter [chsuit00](https://wordpress.org/support/users/chsuit00/)
 * (@chsuit00)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/wp-rest-api-filter-meta-query/#post-8866165)
 * Hello,
 * any news about this problem?
 * Thanks
 *  Thread Starter [chsuit00](https://wordpress.org/support/users/chsuit00/)
 * (@chsuit00)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/wp-rest-api-filter-meta-query/#post-8894318)
 * Hello again,
 * i want to filter the events by an specific team id. But it doesnt work.
 * Here ist my query:
    [http://test.wasserball-kirchheim.de/wp-json/sportspress](http://test.wasserball-kirchheim.de/wp-json/sportspress)/
   v2/events?filter[meta_key]=sp_team&filter[meta_value]=4422
 * What i am doing wrong?
 * Thanks

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

The topic ‘WP REST API FIlter meta query’ is closed to new replies.

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [chsuit00](https://wordpress.org/support/users/chsuit00/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/wp-rest-api-filter-meta-query/#post-8894318)
 * Status: not resolved