# \[Hubspot API\] How do you use IN filter operator?

**URL:** <https://community.hubspot.com/t/hubspot-api-how-do-you-use-in-filter-operator/45613>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [October 20, 2021, 9:09am UTC](https://community.hubspot.com/t/hubspot-api-how-do-you-use-in-filter-operator/45613 "2021-10-20T09:09:40Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Petercopter](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@Petercopter](https://community.hubspot.com/u/Petercopter)\
**Post date:** [March 22, 2022, 6:50pm UTC](https://community.hubspot.com/t/hubspot-api-how-do-you-use-in-filter-operator/45613/8 "2022-03-22T18:50:45Z")

</div>

Thanks for puzzling this out. Here’s an example that works in Ruby. Note the VALUES key

```lia-code-sample
{
 filterGroups: [
 {
 filters: [
 {
 operator: 'IN',
 propertyName: 'dealstage',
 values: ['closedlost', 'closedwon']
 }
 ]
 }
 ],
 sorts: [{ direction: 'ASCENDING', propertyName: 'dealname' }]
}

```

---

_[View the full topic](https://community.hubspot.com/t/hubspot-api-how-do-you-use-in-filter-operator/45613)._
