# Search API not working for String in Custom Objects

**URL:** <https://community.hubspot.com/t/search-api-not-working-for-string-in-custom-objects/63904>\
**Category:** APIs & Integrations\
**Created:** [August 28, 2022, 10:54pm UTC](https://community.hubspot.com/t/search-api-not-working-for-string-in-custom-objects/63904 "2022-08-28T22:54:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosephAstu](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@JosephAstu](https://community.hubspot.com/u/JosephAstu)\
**Post date:** [August 28, 2022, 10:54pm UTC](https://community.hubspot.com/t/search-api-not-working-for-string-in-custom-objects/63904/1 "2022-08-28T22:54:00Z")

</div>

Hi All,

I’ve been trying to figure out for the past few days why my Search API call won’t work and I’ve been able to figure it out.

Here is a call that returns 0 results

```lia-code-sample
{"filterGroups": [
 {
 "filters": [
 {
 "values": ["SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>"],
 "propertyName": "sku",
 "operator": "IN"
 }
 ]
 }
 ],
 "properties": [
 "sku"
 ],
 "limit": 50,
 "after": 0
 }

```

BUT, Searching for 1 at a time does work and will return them

```lia-code-sample
{"filterGroups": [
 {
 "filters": [
 {
 "value": "SKU_<SKU>",
 "propertyName": "sku",
 "operator": "EQ"
 }
 ]
 }
 ],
 "properties": [
 "sku"
 ],
 "limit": 50,
 "after": 0
 }

```

Is there any planned fix for this or am I doing something wrong?

What is interesting to note is that before I put the “SKU\_” infront of each of the values only the purely numbered values were being found and not the strings.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 30, 2022, 8:20pm UTC](https://community.hubspot.com/t/search-api-not-working-for-string-in-custom-objects/63904/2 "2022-08-30T20:20:08Z")

</div>

Hi, @JosephAstu 👋 Welcome to the community. Hey, @LMeert @RMones, do you have experience with using the search API in this manner?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![CGriffin43](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@CGriffin43](https://community.hubspot.com/u/CGriffin43)\
**Post date:** [December 17, 2022, 1:26am UTC](https://community.hubspot.com/t/search-api-not-working-for-string-in-custom-objects/63904/3 "2022-12-17T01:26:00Z")

</div>

The EQ operator is NOT case insensitve. I’m trying to search “hs\_additional\_emails” with EQ and it’s definitely case sensitive, which is a huge problem because then creating a contact fails with a CONTACT ALREADY EXISTS error. What gives?

CONTAINS\_TOKEN doesn’t work either.

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [August 30, 2022, 8:43pm UTC](https://community.hubspot.com/t/search-api-not-working-for-string-in-custom-objects/63904/4 "2022-08-30T20:43:58Z")

</div>

In my testing just now, it appears the IN filter expects and only matches on lower case values. Change SKU\_ to sku\_ and it should work. EQ works on a case-insensitive match. I wonder if/why that might be intentional or a bug. Doesn’t appear to be limited to custom objects.  
I was also informed you should be able to use EQ but in the value do something like “SKU\_\<SKU\> OR SKU\_\<SKU\> OR …”. I didn’t test that. You could also just build your values string and use a to lowercase type method in whatever language you are using.
