List Search Results
Returns the search results. See Query basics for the syntax of the query parameter.
Use the ampersand character (&) to append the sort_by or sort_order parameters to the URL.
For examples, see Searching with Zendesk API.
Allowed For
- Agents
Pagination
- Offset pagination only
Offset pagination may result in duplicate results when paging. You can also use the Export Search Results endpoint, which uses cursor-based pagination and doesn't return duplicate results. See Using cursor pagination for more information.
Errors JSON Format
Errors are represented as JSON objects which have the following keys:
| Name | Type | Comment |
|---|---|---|
| error | string | The type of error. Examples: "unavailable", "invalid" |
| description | string |
Example Error
{
"error": "unavailable",
"description": "Sorry, we could not complete your search query. Please try again in a moment."
}
Query parameters
The search query. See Query basics above. For details on the query syntax, see the Zendesk Support search reference
One of updated_at, created_at, priority, status, or ticket_type. Defaults to sorting by relevance
One of asc or desc. Defaults to desc
Page number for offset pagination
Number of items per page
Response
Success response
Example response
{
"count": 1,
"facets": null,
"next_page": null,
"previous_page": null,
"results": [
{
"created_at": "2018-04-06T03:17:05Z",
"default": false,
"deleted": false,
"description": "",
"id": 1835972,
"name": "Ragtail",
"result_type": "group",
"updated_at": "2018-04-06T03:17:05Z",
"url": "https://example.zendesk.com/api/v2/groups/1835972.json"
}
]
}