Data in the user, group, and organization objects can be searched. Searching these objects returns user profiles and group and organization summary pages; each of which also lists any associated tickets.
This article covers the following topics:
About searching
You can search users, organizations, and groups by using the search tool that is displayed in the People page.
When you search from this page the results are restricted to this people data.
If you search using the global search tool, you need to also use the type
keyword if you want to restrict results to specific types of data. If you don't, your search
results will include matches from the data in your Zendesk Support instance.
type:organization tags:premium
For more information about using search, see Searching the data in your Zendesk. All the user data properties you can search are described in the tables below. All of the searchable data in your Zendesk Support instance (including ticket data) is described in Zendesk search reference.
The user and type keywords
To search for a user's profile data, you have the following two options.
user
keyword:user:amyOr, using the
type:user
keyword:type:user amy
user
when not combined
with type
is just a shortcut for finding users by ID, name, and email
address. The user
keyword, like the ticket user role keywords (assignee,
requester, submitter), accepts the ID, name, and email address as valid user identifiers.
user:52789480 user:amy user:"amy moore" user:amy@mondocam.com
type:user
.type:user tags:beta_user organization:customers
This example also illustrates the usefulness of type
keyword. With it you
can search for user data that is shared by more than one user. You can search for users that
are in the same organization or group or any of the other searchable user data. For more
information about the type
keyword, see Using the type keyword.
type
keyword is also used to search the group and organization data
objects. type:group name:"level 2" type:organization name:customers
Searching users
The user data object contains all of the user properties that you can set in the user profile. Not all of the user profile data is searchable; those properties that are searchable are described in the following table.
Keyword | Description |
---|---|
name |
The user's partial or full name.
name:"alex anderson" |
role |
The user's designated role.role:admin |
email |
Specify
the
user's email
address,
or specify none to search for users without an email
address. email:alex@mondocam.com |
group |
The user's group name. This only applies to admin and agent users.
group:"Level 2" |
organization |
Specify
the
user's organization name or
ID,
or specify none to search for users without an
organization. If the user belongs to more than one
organization, searching on any of those organizations will return their
profile.organization:mondocam |
created |
The date the user was added to your Zendesk.
created<2011-05-01 For more information on using date and time in your search, see Searching by date and time. |
notes |
All text in the notes field in the user's profile.
notes:"manager" |
details |
All text in the details field in the user's profile.
details:"madison, wi" |
external_id |
Specify
the
user's external ID, if
used,
or specifynone to search for users without an external
ID. external_id:0098884412 |
phone |
Specify
the
user's phone
number,
or specify none to search for users without a phone
number. phone:555-111-2222 |
tags |
Specify
tags
on the user's
profile,
or specify none to search for users without
tags. tags:premium tags:wholesaleFor more information about tagging users and organizations, see Adding tags to users and organizations. |
customfield |
Custom user fields.plan_type:platinumFor more information, see Searching custom user and organization fields. |
is_verified |
Search for users with or without verified email using
true or false .To search for users with a verified email address: is_verified:true To search for users without a verified email address: is_verified:false |
suspended |
Search for users that are and aren't suspended using
true or false .To search for suspended users: is_suspended:true To search for users that aren't suspended: is_suspended:false For more information, see Searching custom user and organization fields. |
Search for users based on a WhatsApp phone number. For more information see Searching for tickets by WhatsApp number. |
Searching for users by email domain
type:user mondocam.com
type:user mondocam.com zendesk.com
Searching groups
Here are the group properties that can be searched.
Keyword | Description |
---|---|
name |
The group's name.name:"level 2" |
created |
The date the group was added. created<2011-05-01 For more information on using date and time in your search, see Searching by date and time. |
Searching organizations
Here are the organization properties that can be searched.
Keyword | Description |
---|---|
name |
The organization's partial or full name.name:mondocam |
created |
The date the organization was added. created<2011-05-01 For more information on using date and time in your search, see Searching by date and time. |
notes |
All text in the notes field in the user's profile. notes:EMEA |
details |
All text in the details field in the organization's profile.details:london |
tags |
Specify
tags
that have been added to the
organization,
or specify none to search for organizations without
tags. tags:premium For more information about tagging users and organizations, see Adding tags to users and organizations. |
customfield |
Custom organization fields.plan_type:platinumFor more information, see Searching custom user and organization fields. |
external_id |
The external ID of the organization or specify none to search
for users without an external ID.external_id:00112345 |
Searching custom user and organization fields
You can search for data in custom user fields and custom organization fields by using the key that identifies the custom field.
To locate the key for a custom field, click the Admin icon () and select User Fields or Organization
Fields, then click the name of a custom field. The field key appears in the properties
panel on the right.
You can search for users and organizations that have no value in a specific custom field, by using none as the search term, along with the custom field key. For instance, if you have a custom field key foo, a search for foo:none returns all users or organizations with the empty custom field foo.
Field type | Operators | Examples |
---|---|---|
Drop-down list | : | Find users or organizations where plan_type is platinum:plan_type:platinum Find users or organizations where plan_type is platinum or gold: plan_type:platinum plan_type:gold |
Text Multi-line text |
: | Find users or organizations where product_name contains widget:product_name:widget |
Regular expression |
: |
Find users or organizations where product_name contains the multi-word phrase "red widget:" product_name:"red widget" |
Numeric |
>, <, >=, <=, : |
Find users or organizations where num_agents is exactly 5:num_agents:5 Find users or organizations where num_agents is between 4 and 10, inclusive: num_agents>4 num_agents<10 |
Decimal | >, <, >=, <=, : | Find users or organizations where avg_score is greater than 14.5:avg_score>14.5 Find users or organizations where avg_score is between 10.1 and 15.3, exclusive: avg_score>10.1 avg_score<15.3 |
Check box | : | Find users or organizations where is_active is true:is_active:true |
Date | >, <, >=, <=, : | Find users or organizations where subscription_date is before 2013-06-23:subscription_date<2013-06-23 Find users or organizations where subscription_date is between 2012-05-23 and 2013-06-23, exclusive subscription_date>2012-05-23 subscription_date<2013-06-23 |
55 Comments
Hi,
Do we have an option in API to search a user based on his last_login_at(last sign-in)
in my requirement i need to get a list of users created >50 days and last_login<60 days
I manage to get to created > 50 , but not able to search for any conditions related to last login .
Hey Senthil,
You can't do a search for these users using the API, however, you can make an API call to the Users endpoint and parse the returned information using some custom script. I've attached some additional information regarding the users endpoint for you as well.
Hope this helps!
thanks Brett for clarifying
Hi,
There seems to be a bug with the user search API when searching users using a query for phone numbers. When searching a user using the phone number the email field returns null. Searching for the same user using the email or the username returns the email value.
Is this how it's supposed to be or is it a known bug?
Endpoint: /api/v2/users/search.json
Result with a phone query: /api/v2/users/search.json?query={{phoneNumber}}
"email": null,
Result with a username query: /api/v2/users/search.json?query={{userName}}
"email": "{{email}}",
The user ID's return is the same, so there is no chance that a different user is presented.
Thank you,
Farre
Are there any plans as to when will search abilities under /agent/admin/people be improved?
Eg. If I have 10 Groups named "XX - Help Center" where "XX" is a country code, I'd love to be able to find them all just by searching "Help Center". But since Zendesk seems to execute an absolute match search from left to right, and it doesn't allow for wildcards, it's really time consuming...
Hi Pedro,
I reached out to our team internally and they are looking to make improvements with the search functionality within the coming year. It sounds like what you're looking for may be possible we don't have an ETA of when this could be implemented if at all.
Do know that your feedback has been passed along to the appropriate team and if we have additional questions we will follow-up here :)
Cheers!
Can I search two custom user fields, where in one field I want to find a value, and the second field I want to find has NOT the value:
custom_field1:foo
!custom_field2:bar
^ find all users that have the value foo in custom_field1 and do NOT have the value bar in custom_field2
Hey Jason,
You should be able to use the following:
field_name_1:platinum -field_name_2:gold
Let us know if that doesn't work :)
Hi,
Is there a way to search for Organizations that do not have any tickets? Or get Ticket counts with the Organization?
For context: We have a custom made sync program between our internal CRM and Zendesk, and throughout the years, we have changed which category of clients get setup in Zendesk, and we have a need to do a clean-up... it's a few thousand organizations, so I am trying to figure out how to better do this.
So far, what we could come up with is running a report in Good Data, adding Organization Tickets (I think this is the name of the field that gives you the ticket count), downloading that, and feeding that into our cleanup program. I am trying to avoid having to do this manual work...
Thanks!
Hey Alex,
Most likely using GoodData will be your easiest option here and typically the one that I recommend first.
The other option would be to use our Zendesk API and create a script that searches for organizations with 0 tickets associated with them.
I also recommend taking a look at the available export options listed in the following article:Ticket Export Options
Apologies for not being able to provide another alternative for you at this time :-/
Let me know if you have any other questions!
Hi Brett,
Thanks for the response. I am familiar with the API (I created our "sync" program using it), but I am not sure how to search for organizations with 0 tickets associated with them. Could you show me the query for it?
I can see any field in the Organization's object that would give me that:
https://developer.zendesk.com/rest_api/docs/support/organizations#organizations
Thanks Again!
Hi Alex,
My knowledge with the API is rather limited so I'm not exactly sure what that query would be. I reached out to one of our API experts and they mentioned you could use the List Organizations endpoint which I've linked.
You would then need to use Incremental Tickets with a start time of zero, and use the count listed there.
I hope this points you in the right direction!
Thanks Brett!
Happy to help Alex :)
I have trouble searching organization names and custom organization fields: If searching for an organization with multiple words in its title, it will only make a hit if we input the name correctly from the first letter.
Likewise, if you create a new user on a ticket, the field for associating the user to an organization has limited search capabilities, and requires us to input the name exactly.
We have a custom field, alias, as organization field because a lot of our customers do not use their officially registered business names. We are unable to search this field at all even when using "alias: namepart"
We have Norwegian localization.




Search seems to work just fine and as expected on user names.
Hey Jo,
This seems like a bug so we will want to do some troubleshooting in your account to see if we can replicate. I'm going to generate a ticket on your behalf so we can look into this with you.
You'll receive an email shortly stating your ticket has been created.
Cheers!
Hi Anton,
Can you please update the article that Suspended users can be searched? Suspended users can now be searched/filtered by property is is_suspended:true (or false). This information is already provided in following article: https://support.zendesk.com/hc/en-us/articles/360022175334-Release-notes-through-2018-08-11
Thank you for that suggestion, Nabeel. I've asked our documentation team to look into this.
Hi, Nabeel. Thanks for catching that! The table has been updated to include a couple missing items, including suspended user search.
Hi,
Is there a way to search Organization that do not have external_id. For instance, we should find organizations available for binding with the external system.
I suppose the search request should be like this:
type:organization external_id:none
But according to organization property keyword, there is not 'external_id' keyword in the list https://support.zendesk.com/hc/en-us/articles/203663226#topic_gok_ffv_uc
Could you please give me a piece of advice or some solution on how to make it?
Hello Serhii Dolhopolov
There is not a way to use the support search bar to identify which organizations have an external_id. But, you could use the organizations API endpoint which has an external_id attribute. See more information on that here: https://developer.zendesk.com/rest_api/docs/support/organizations. You would have to scroll through or write a script to pull out all organizations that have an external_id of "null".
I hope that helps!
Hi,
Can the API lookup numbers from 2 different User and Organization Fields using the same Field key.
Hi all,
Can anyone shed some light on domain searching with my own domain.
I have tried
GET /search.json?query=type:user mydomain.com
this returns all users and not just where email is wildname@mydomian.com
Also tried
these both return no results spite i know there will be.
My main goal is to have a list of all uses that the email is @mydomain.com
Any help appreciated.
Hi Mike Nicholls. Your query looks valid - this is actually documented above as should accomplishing what you want: Searching for users by email domain
There could be other data somehow leaking in that's causing a positive return result. Since this looks like it could be account specific, so please contact Zendesk Customer Support. Your account can be looked at in detail on why your query isn't returning the expected results.
Mike Nicholls — one thing I forgot to mention — user Identity records are also searched. So while a searched-on value may not show up in the "core" user record, it may show up in its set of associated identity records.
To check this possibility, you can retrieve the user in question and use the identities sideload. Example:
https://your_subdomain.zendesk.com/api/v2/users/1234567?include=identities
Then see if one of the identity records has one of the search values.
Please sign in to leave a comment.