Searching tickets

Return to top
Have more questions? Submit a request


  • Adam

    I appreciate the broad search capability of the search API.

    In my case, it searches all fields and related comments to the ticket. 

    My question is: Can you exclude private comments (internal comments) from the broad search?

    /api/v2/search.json?query=type:ticket "private message"

    I don't want it to return tickets that may have the search text in its private comments (internal messages). Anywhere else the text appears (subject, public comments, tags) is fine.

    Thank you.


  • Dwight Bussman
    Zendesk Team Member

    HeyO Adam,

    There isn't a specific search attribute to exclude text from a private-comment, but it IS possible to specifically search for strings within other places:

    To search within a ticket-field (not comments/subject), you can use fieldvalue:"stuff in here"

    To search within the subject, you can use the subject:"strings for everyone"

    similarly with Tags or the Description (which is almost always the first comment of the ticket).

    Hopefully this helps get you closer to what you're after. Otherwise, this is an interesting feature-request! 

  • Anderson da Silva

    To search string there is the * operator

    For more info:

    Article: Searching with the Zendesk API

    Article: Zendesk Support search reference

  • Dave Quenzer

    Hi Team, is there a way to search for tickets that have multiple responses? For example, if a customer responds with a follow up question after receiving an initial answer.  I've searched on follow up and found lots of info about tickets that are created subsequent to a closed ticket.  That's not what I'm after.  I'm looking for tickets that have multiple responses in a single ticket.  Thanks. 

  • Sorin Alupoaie

    Dave Quenzer we've been working on a Zendesk search app lately and we're planning to add filters for tickets that have multiple-responses soon.
    The app is available on Zendesk's apps marketplace and you can give it a free try here.

  • Kate Ambash

    I have multiple brands for my organization and I need to see a list of all tickets for one brand. Is a view the best way to do this? Or how might I search for this?

  • Dave Dyson
    Zendesk Community Team

    Hi Kate,

    You can use brand as a search criteria (look for "Nordstrom" in the article above), but creating Views for each brand will probably save you time in the long run. Look for Ticket:Brand in the list of criteria when creating your View – for more information, see Creating views to manage ticket workflow

  • Kate Ambash

    Dave Dyson When I create the view using Ticket: Brand and then also Group, it doesn't give me all tickets. I tried adding every status and i'm still only given open tickets.


    Is there a way to create a view to see all historical tickets?

  • Bilyana Ivanova

    Is there a way to sort by requester? We get a lot of repetitive messages (error reports) and sometimes the requesters send more than one. I need to know how many reports there are and was wondering if there is a way to either:
    1. exclude messages from same requesters to leave only one request shown per requester OR

    2. sort by requester names so I could at least have a chance of counting through when same names are shows in clusters.

  • Jason Schaeffer
    Zendesk Customer Advocate

    Hello Bilyana,

    Thanks for reaching out! Your best bet in that case would be taking advantage of the Advanced Search feature which allows you to get more granular I.E. Searching by specific user. Additionally when you make a search you can filter by Subject so if the requester is making several tickets with repetitive messages it would be an easy way to isolate the tickets you wish to see. Please refer to the article below:


    Jason Schaeffer | Customer Advocate |

  • Yaniv Dayan


    How can I search for no data on a custom field single text line?

    For example, I have a custom field named Company Name, and I wish to get all tickets that have no company name?

    I've tried searching for 

    custom_field_360015212345:none    ==> gives zero results.

    -custom_field_360015212345:Microsoft    ==> gives all results but Microsoft, and I can't sort it by the custom field.


  • Dave Dyson
    Zendesk Community Team

    Hi Yaniv –

    Great question, and you're almost there! Here's how to search for tickets with a blank text field (assuming the blank text field's ID is 360015212345):


    And as a bonus, note that


    will return any tickets where the value of the text field is not blank.

  • Yaniv Dayan

    Hi Dave,

    That's great, thank you!

    Can you update this valuable information to this article, and also to "Zendesk Support search reference"?

  • Dwight Bussman
    Zendesk Team Member

    Dave Dyson Yaniv Dayan - I think the reason this search wasn't included in the Search Reference article is that this specific command doesn't seem to return archived tickets, whereas other search commands do.


Please sign in to leave a comment.

Powered by Zendesk