Kaizen #82 - Search Records API(V4)

Kaizen #82 - Search Records API(V4)

Hello everyone!
Welcome back to this week's Kaizen post!
Today, we will discuss Search API(in version 4), the various supported operators, and how you can use these operators to search for data in different fields of a module.

First off, let us discuss:

When you should use the Search API

You can also use this API when you want to search for a specific text, phone or email in the records of a module, or when you want to do a text-based module-level word search. Search API is the go-to API when you know the details like email, phone or a specific text, but not the individual IDs of the records.

For example, when you want to render a search box in your web/mobile UI, and do a module-level search for the word, use Search Records API.

Search vs Query API

You should use the search records API when you want to perform a text-based search across the module, search for phone or emails fields exclusively, and when you do not know the record IDs.
You can also opt for this API when the maximum number of records you want to fetch per API call is less than 200.

Use the query API when you want to use advanced comparators to query for records from a custom view(without actually creating one), do a cross-module search(through lookup fields), or use aggregate functions.
Opt for this API when you want to fetch up to 2000 records in an API call.

Encoding

When there are parentheses or a comma in your search value, you must escape them and then encode the characters. For example, to search for Patricia(Boyle), you must escape the parentheses as Patricia\(Boyle\) followed by encoding the value as Patricia%5C%28Boyle%5C%28.
When there are special characters in the search value such as +, : etc, you must encode them. Example: Modified_Time%3Agreater_equal%3A2023-04-20T05%3A58%3A06%2B05%3A30 for
Modified_Time:greater_equal:2023-04-19T05:58:06+05:30

Request Details
Request URL: {{api-domain}}/crm/v4/{{module_api_name}}/search
Scope: ZohoCRM.modules.{module_name}.ALL/READ (and) ZohoSearch.securesearch.READ
Parameters specific to Search API: email, phone, word, criteria
Other parameters: fields, converted, approved, page, per_page

1. word

Use this parameter to do a global search of a word in all records and fields of the module.
Note that the search term must have at least three characters to perform a search.

Example
{{api-domain}}/crm/v4/Contacts/search?word=ABC&per_page=3&fields=Last_Name,Account_Name,Full_Name

The response contains the records that have "ABC" in any of their fields.

Response
{
    "data": [
        {
            "Full_Name": "test2k abc",
            "Last_Name": "abc",
            "Account_Name": null,
            "id": "3652397000011831001"
        },
        {
            "Full_Name": "Daly",
            "Last_Name": "Paul",
            "Account_Name": {
                "name": "ABC",
                "id": "3652397000007505116"
            },
            "id": "3652397000007505119"
        },
        {
            "Full_Name": "test2000",
            "Last_Name": "test2000",
            "Account_Name": {
                "name": "ABC",
                "id": "3652397000003098017"
            },
            "id": "3652397000009873004"
        }
    ],
    "info": {
        "call": false,
        "per_page": 3,
        "next_page_token": "74d1d2c0xxx5fe1b",
        "count": 3,
        "sort_by": "id",
        "page": 1,
        "previous_page_token": null,
        "page_token_expiry": "2023-04-22T16:48:05+05:30",
        "sort_order": "desc",
        "email": false,
        "more_records": true
    }
}

2. email

This parameter searches the email fields(including custom email fields) of the module and returns the matching records.
If you have special characters in the email ID, you must encode them to get the exact records.
If you do not encode, then the response will have all the records with the matching email ignoring the special character. 
For example, if the email ID is p+boyle@abc.com, and you do not encode, the response will contain email IDs such as p.boyle@abc.com, p.boylex@abc.com, p.daly@zylker.com etc. 

Example
{{api-domain}}/crm/v4/Contacts/search?email=p%2Bboyle%40abc.com&fields=Email,Last_Name

Response
{
    "data": [
        {
            "Email": "p+boyle@abc.com",
            "Last_Name": "abc",
            "id": "3652397000011831001"
        }
    ],
    "info": {
        "call": false,
        "per_page": 200,
        "next_page_token": null,
        "count": 1,
        "sort_by": "id",
        "page": 1,
        "previous_page_token": null,
        "page_token_expiry": null,
        "sort_order": "desc",
        "email": false,
        "more_records": false
    }
}

3. phone

This parameter searches the phone fields(including custom phone fields) of the module and returns the matching records.

Example
{{api-domain}}/crm/v4/Contacts/search?phone=%2B075-244562374&fields=Last_Name,Phone

Response
{
    "data": [
        {
            "Last_Name": "Smith",
            "Phone": "075-244562374",
            "id": "3652397000010134055"
        },
        {
            "Last_Name": "Gayle",
            "Phone": "+075-244562374",
            "id": "3652397000011831001"
        }
    ],
    "info": {
        "call": false,
        "per_page": 200,
        "next_page_token": null,
        "count": 2,
        "sort_by": "id",
        "page": 1,
        "previous_page_token": null,
        "page_token_expiry": null,
        "sort_order": "desc",
        "email": false,
        "more_records": false
    }
}

4. criteria

Use this parameter when you want to search for records based on a certain criteria. 
The format is (({api_name}:{operator}:{value})and/or({api_name}:{operator}:{value}))

The following table gives you the field types and the operators you can use in the "criteria" parameter.

Field Type
Operator
Date, DateTime
equals, not_equal, greater_equal, greater_than, less_equal, less_than, between, in
Integer, Currency, Decimal
equals, not_equal, greater_equal, greater_than, less_equal, less_than, between, in
Boolean
equals, not_equal
Lookup(user/owner)
equals, not_equal, in
Picklist, Autonumber
equals, not_equal, in
Text, Email, Phone, Website
equals, not_equal, starts_with, in


Let us discuss each of these field types with examples.

4.1 Date in criteria

Supported operators: equals, not_equal, greater_equal, greater_than, less_equal, less_than, between, in

{{api-domain}}/crm/v4/Deals/search?criteria=(Closing_Date:between:2022-12-10,2022-12-21)&fields=Last_Name,Amount,Closing_Date

4.2 DateTime in criteria(search value encoded)

Supported operators: equals, not_equal, greater_equal, greater_than, less_equal, less_than, between, in
Here, the value in the Modified_Time field is Modified_Time:greater_equal:2023-04-19T05:58:06+05:30 and contains the special characters :, +, -. So, you must escape these characters and then encode them. 
The encoded value is Modified_Time%3Agreater_equal%3A2023-04-19T05%3A58%3A06%2B05%3A30

{{api-domain}}/crm/v4/Deals/search?criteria=Modified_Time%3Agreater_equal%3A2023-04-19T05%3A58%3A06%2B05%3A30&fields=Last_Name,Amount,Closing_Date

4.3 Currency and Decimal in criteria

Supported operators: equals, not_equal, greater_equal, greater_than, less_equal, less_than, between, in

{{api-domain}}/crm/v4/Deals/search?criteria=((Probability:between:70,90) AND (Amount:less_equal:75000))&fields=Amount,Probability

4.4 Boolean in criteria

Supported operators: equals, not_equal

{{api-domain}}/crm/v4/Leads/search?criteria=(Email_Opt_Out:equals:true)&fields=Last_Name,Company&per_page=2

4.5 Lookup in criteria

Supported operators: equals, not_equal, in
Here, Account_Name is the lookup field in the Contacts module and points to the Accounts module.

{{api-domain}}/crm/v4/Contacts/search?criteria=(Account_Name:in:Zylker,ABC)&fields=Last_Name,Company,Account_Name&per_page=5

4.6 Picklist in criteria

Supported operators: equals, not_equal, in
Here, Languages_Known is a custom picklist field in the Contacts module. This request fetches all the records that contain "English" or "French" or both in the Languages_Known picklist.

{{api-domain}}/crm/v4/Contacts/search?criteria=(Languages_Known:in:English,French)&fields=Last_Name,Company,Languages_Known&per_page=5

 4.7 User/Owner Lookup in criteria

Supported operators: equals, not_equal, in
To search based on Owner fields, you must use the ID of the users as the search value.

{{api-domain}}/crm/v4/Contacts/search?criteria=(Owner:in:3652397000000186017,3652397000000281001)&fields=Last_Name,Company,Owner&per_page=5

4.8 Text in criteria

Supported operators: equals, not_equal, starts_with, in

{{api-domain}}/crm/v4/Contacts/search?criteria=(Department:starts_with:s)&fields=Last_Name,Department

4.9 Email in criteria

Supported operators: equals, not_equal, starts_with, in

{{api-domain}}/crm/v4/Contacts/search?criteria=(Email%3Aequals%3Ap%2Bboyle%40abc.com)&fields=Last_Name,Email

Here, the email "p+boyle@abc.com" has a special character(+) and so, must be encoded to get the right response.

4.10 Phone in criteria

Supported operators: equals, not_equal, starts_with, in

{{api-domain}}/crm/v4/Contacts/search?criteria=(Phone%3Ain%3A%2B075-1111111%2C888-555-2145)&fields=Last_Name,Phone

Here, the phone numbers +075-1111111 and 888-555-2145 are the search values for the Phone field. As they both contain special characters, we have encoded them. 

4.11 Website in criteria

Supported operators: equals, not_equal, starts_with, in

{{api-domain}}/crm/v4/Leads/search?criteria=(Website:starts_with:https)&fields=Last_Name,Website

Note

  • You can search for a maximum of 10 criteria (with same or different columns) with equals and starts_with conditions.
  • When you use "equals" for multiple conditions, and if one of your conditions is (Company:equals:ABC), the response will contain records with ABC as well as ABC Inc in their Company fields.
  • When you use "equals" with a single condition and search for a field, like (Campaign_Name:equals:CRM), the response will contain only those records whose Campaign_Name is "CRM" and not records with "Best CRM" or "Latest CRM" in their Campaign_Name fields.
  • The phone, word, and email parameters search for all fields whose datatype is phone, text, and email, respectively. But, when you use them in the criteria parameter, the search is restricted only to that particular field as you give the field's API name.

We hope you found this post useful. We will see you next week with another interesting post.
Let us know your questions and feedback in the comment section, or write to us at support@zohocrm.com.


Cheers!

    Access your files securely from anywhere

        Zoho FSM Video Tutorials


              All-in-one knowledge management and training platform for your employees and customers.






                                    Zoho Developer Community




                                                          • Desk Community Learning Series


                                                          • Digest


                                                          • Functions


                                                          • Meetups


                                                          • Kbase


                                                          • Resources


                                                          • Glossary


                                                          • Desk Marketplace


                                                          • MVP Corner


                                                          • Word of the Day


                                                          • Ask the Experts



                                                                    • Sticky Posts

                                                                    • Announcing the new SKILL.md for Zoho CRM and the updated OAS repository!

                                                                      We are introducing a new zoho-crm skill to make working with Zoho CRM Developer tools (like APIs, functions, widgets, client scripts, queries etc) easier and faster, with the help of AI in your preferred AI harness like Claude Code, Codex, Cursor, VSCode
                                                                    • Kaizen #256 - Build an Arrival Readiness Web Tab in Zoho CRM

                                                                      Hi everyone! Welcome back to the Kaizen series! In the post, we discuss a use case in hospitality industry: how an Arrival Readiness web tab widget can be used to let reception staff identify and resolve issues before arrival of guests. Use case In the
                                                                    • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                                      Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                                    • Kaizen #226: Using ZRC in Client Script

                                                                      Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
                                                                    • Kaizen #222 - Client Script Support for Notes Related List

                                                                      Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how


                                                                    Manage your brands on social media



                                                                          Zoho TeamInbox Resources



                                                                              Zoho CRM Plus Resources

                                                                                Zoho Books Resources


                                                                                  Zoho Billing Resources

                                                                                    Zoho Projects Resources


                                                                                      Zoho Sprints Resources


                                                                                        Qntrl Resources


                                                                                          Zoho Creator Resources



                                                                                              Zoho CRM Resources

                                                                                              • CRM Community Learning Series

                                                                                                CRM Community Learning Series


                                                                                              • Kaizen

                                                                                                Kaizen

                                                                                              • Functions

                                                                                                Functions

                                                                                              • Meetups

                                                                                                Meetups

                                                                                              • Kbase

                                                                                                Kbase

                                                                                              • Resources

                                                                                                Resources

                                                                                              • Digest

                                                                                                Digest

                                                                                              • CRM Marketplace

                                                                                                CRM Marketplace

                                                                                              • MVP Corner

                                                                                                MVP Corner









                                                                                                  Design. Discuss. Deliver.

                                                                                                  Create visually engaging stories with Zoho Show.

                                                                                                  Get Started Now


                                                                                                    Zoho Show Resources

                                                                                                      Zoho Writer

                                                                                                      Get Started. Write Away!

                                                                                                      Writer is a powerful online word processor, designed for collaborative work.

                                                                                                        Zoho CRM コンテンツ




                                                                                                          Nederlandse Hulpbronnen


                                                                                                              ご検討中の方





                                                                                                                        • Recent Topics

                                                                                                                        • Cliq iOS can't see shared screen

                                                                                                                          Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
                                                                                                                        • Introducing Smart Fields in Zoho Forms

                                                                                                                          Hello form builders! We are excited to introduce Smart Fields in Zoho Forms - a faster way to add calculations to your forms without writing formulas. Instead of creating multiple fields and configuring complex calculations yourself, you can now drag
                                                                                                                        • Checkbox not displaying correctly in subform

                                                                                                                          Greetings: I have shared my app (wv) with support.  I am having problems with a checkbox field not displaying correctly in a subform.  The main form is called volunteers and the subform is called volunteers_subform.  The field in question is called roles. When you access the subform by itself the checkbox lookup displays as checkboxes.  But when you view it in the main volunteers form, it displays as a multi-select dropdown instead.   I have attached jpegs showing the difference.   Any thoughts?
                                                                                                                        • Unbundle feature for composite items

                                                                                                                          We receive composite items from our vendors and sell them either individually or create other composite items out of them. So, there is a lot of bundling and unbundling involved with our composite items. Previously, this feature was supported in form
                                                                                                                        • The reason I switched away from Zoho Notebook

                                                                                                                          My main reason for switching to Zoho was driven by three core principles: moving away from US-based products, keeping my data within India as much as possible, and supporting Indian companies. With that intent, I’ve been actively de-Googling my digital
                                                                                                                        • Lookups and Custom Modules

                                                                                                                          I created a Custom Module that I'm calling "Item Purchasing Group". This module will store information for groups of Items that must be purchased together (including minimum overall quantities and/or values, etc.). This will have a one-to-many relationship
                                                                                                                        • Valid characters for use in email addresses using Zoho's apps/APIs

                                                                                                                          We have found an issue with the + sign character in zoho subs - we are allowed to create a customer with an email address that has a plus sign but the API doesn't allow the + so the billing portal is not created. We are going to prevent users from using
                                                                                                                        • Expand Zoho Analytics Spatial Capabitlities

                                                                                                                          Dear Analytics team Thanks for the great product - I'm a big fan on Analytics and the monthly release highlights is one of my favourite emails to receive. I'd like to request expansion and improvement of Zoho Analytics spatial data capabilities, namely:
                                                                                                                        • Automate customer follow-ups with Sequences in Bigin

                                                                                                                          Greetings, We hope you're all doing well! We're happy to announce a new feature that we've added to Bigin. Following up with every lead at the right time can be challenging, especially when your team is managing multiple conversations across emails, calls,
                                                                                                                        • Dashboards for Customers

                                                                                                                          Is it possible to build dashboards for each customers in the community for their tickets?
                                                                                                                        • Displaying only unread tickets in ticket view

                                                                                                                          Hello, I was wondering if someone might be able to help me with this one. We use filters to display our ticket list, typically using a saved filter which displays the tickets which are overdue or due today. What I'd really like is another filter that
                                                                                                                        • Adding Custom Status Options in Work Order Action Menu

                                                                                                                          Hello FSM Team, We would like to inquire if it is possible to add more custom options in the Work Order action/status dropdown (e.g., Cancel, Terminate, Non-Billable, Void, etc.). Currently, the available options are limited, and we are unable to customize
                                                                                                                        • Can we have an automated TDS Receivable Recon with Form 26AS of Income Tax Portal ?

                                                                                                                          Can we have an automated TDS Receivable Recon with Form 26AS of Income Tax Portal ?
                                                                                                                        • Tag Limi?

                                                                                                                          is there any way to create more than 20 tags? 
                                                                                                                        • prefill_data for Creator + Merge & Sign

                                                                                                                          Hello, Is there an option to use prefill_data for signer fields from creator? I see the option for CRM but it will not work with creator? I have tried passing the value in the signer data, and that also does not work. Alternatively, is there a way to
                                                                                                                        • Delug script

                                                                                                                          I have been looking at auto-update a amount (home currency) field from another module. Zoho native multicurrency was used in the other module (we have 4 here). Custom script was input with no error, but the field was not updated on trigger. Script as
                                                                                                                        • Can I Build a Gaming Website Using Zoho? Need a Quick Roadmap

                                                                                                                          Hi Dear Members, I want to create a gaming website using Zoho. Is it possible? My goal is to build a sleek, unique, easy-to-navigate, and fast-loading website for a gaming project. I want the site to look professional, user-friendly, and optimized for
                                                                                                                        • Remove Due Date from Statements

                                                                                                                          Is it possible to remove the Due Date on the Invoice transation line on statements? I have figured work arounds to get the Invoice detail on the Statement but cannot work out haw to simplify the stament by removing the "- due on xx/xx/2026" - it really
                                                                                                                        • What Should an Agent-Native Project Workspace Look Like

                                                                                                                          AI is moving beyond assistants that simply answer questions. With tools like MCP, agents can now interact directly with project data and perform actions. That makes me wonder: what should an agent-native project workspace actually look like? For me, it
                                                                                                                        • unable to join meeting due to speaker issue

                                                                                                                          unable to join meeting due to speaker issue
                                                                                                                        • How to add formatting in zoho.cliq.postToUser(...) message?

                                                                                                                          In a CRM Deluge function, I'm trying to use the message formatting guidelines given here: https://www.zoho.com/deluge/help/cliq/posting-to-zoho-cliq.html#message-formats My message is: message: #Title text. The result in Cliq is: #Title text. (no large
                                                                                                                        • Marketing Tip #50: Sell digital products and use them to grow your store

                                                                                                                          Physical products need packaging, shipping, and stock management. Digital products need none of that. Once created, they can be sold an unlimited number of times, delivered instantly, and never go out of stock. What counts as a digital product? A digital
                                                                                                                        • Turn off Mobile Optimize

                                                                                                                          Hello is it possible to stop the automatic mobile optimization of my site as it looks much better on a mobile in full site format rather than mobile format. Thanks
                                                                                                                        • How to select from pricebook when creating a salesorder or quote

                                                                                                                          I am creating a sales order and when selecting the Products I do not see any where to select from pricebooks. How do i associate this to my orders?
                                                                                                                        • API - Available Stock Definitions

                                                                                                                          Okay, Zoho team... your copywriters fell down on the job for this one :) I think these warrant a bit more explanation as to what they include and what they don't.
                                                                                                                        • Cross-application Deluge calls fail when application link name starts with a number

                                                                                                                          I encountered an issue when calling a custom function in another Zoho Creator application within the same account. The target application’s URL/application link name began with a number, similar to: 27_example_application The following cross-application
                                                                                                                        • Transformez vos webinaires en opérations automatisées

                                                                                                                          Organiser un webinaire, c’est bien plus que passer en direct. Il faut gérer les inscriptions, suivre les participants, envoyer les enregistrements, mettre à jour le CRM… et s’assurer que chaque étape se déroule au bon moment. L’automatisation des workflows
                                                                                                                        • Marketing Tip #1: Optimize item titles for SEO

                                                                                                                          Your item title is the first thing both Google and shoppers notice. Instead of a generic “Leather Bag,” go for something detailed like “Handcrafted Leather Laptop Bag – Durable & Stylish.” This helps your items rank better in search results and instantly
                                                                                                                        • How can I filter inactive/disable agent tickets?

                                                                                                                          Hello, We have an user-agent that left the company and we inactive/disabled his agent. So, now I can no longer filter or search tickets that he is the current owner, or even create a rule to reassign tickets to another person when the ticket is reopen.
                                                                                                                        • How do i move multiple tickets to a different department?

                                                                                                                          Hello, i have several tickets that have been assigned to the wrong department.  I am talking about hundreds of automatically generated ones that come from a separate system. How can i select them all at once to move them to another department in one go? I can select them in "unsassigned open tickets view" but i can't find a "move to another department" option. I also can't seem to assign multiple tickets to the same agent in that same view. Could somebody advice?
                                                                                                                        • Add Reauthentication Option for Zoho Bug Tracker Integration in Zoho Desk

                                                                                                                          Hello Zoho Desk Team, We hope you're doing well. We would like to request an enhancement to the Zoho Bug Tracker integration within Zoho Desk. Current Limitation: At the moment, there is no option to reauthenticate the Zoho Bug Tracker integration in
                                                                                                                        • Create Package From A Picklist

                                                                                                                          Dear Zoho, Can it be made possible to create a package from a picklist? The reason our company makes a picklist is for that to become a package Our sales orders have 600-1000 items I hope that makes it clear that it's hard to delete 990 items when we
                                                                                                                        • Migrating from Zoho Checkout to Zoho Billing

                                                                                                                          I have an active Zoho Checkout account where I'm charging customers for subscriptions. Now I'm looking to upgrade and only use Zoho BIlling, in which my account in on read only mode at the moment. I can see is also tracking the customers and its payments.
                                                                                                                        • API - Bank Accounts | Reconciliation Discrepancy

                                                                                                                          Unless I'm reading it wrong, the documentation for the Bank Reconciliations API is inconsistent with itself. https://www.zoho.com/books/api/v3/bank-accounts/#create-a-bank-reconciliation The text definition says that the transaction_id should be a string,
                                                                                                                        • another little issue

                                                                                                                          So to get over showing prices with VAT we used the price lists and made the prices inclusive. The problem is now on the items it wants to show the orginal retail value which makes no sense. Ideas please
                                                                                                                        • Handle Leading Zeros in a Number Field

                                                                                                                          Hi, If I use a Number Field, set with Min 7 Digits and Max 7 Digits, and enter 0000001, it will result in 1 and an error as it removes the leading zeros, the same with entering 0012340 will result in 12340 and error. So I have to use a Text Field and
                                                                                                                        • can't access zoho account

                                                                                                                          I can't log in to my zoho account, can you help me
                                                                                                                        • HTML PDF Templates / Build From Scratch option not visible for Custom Modules

                                                                                                                          Hi everyone, I am working with Zoho Books Custom Modules and trying to create a custom 4x4 package label PDF template using HTML/CSS. According to the official Zoho Books documentation for HTML PDF Templates, there should be an option like: Settings →
                                                                                                                        • Virtual Option for Fields

                                                                                                                          Hi, I would like to be able to choose another option other than Read-Only or Disabled, such as Virtual. And with Virtual, the field is shown on the form and avilable in rules, but NOT saved to the Database. A use case is having multiple Large Lists of
                                                                                                                        • Prefix & Suffix on Single Line, Number, etc.

                                                                                                                          Hi, I would like to have the same Prefix and Suffix that was added to the Unique ID on Text and Number Fields. Use case could be as basic as temperature, as per another Idea I have to use Single Line (Text) for a number that might have leading zeros today,
                                                                                                                        • Next Page