Export Search Results
Exports a set of results. See Query syntax for the syntax of the query parameter.
Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the created_at attribute.
The search only returns results of a single object type. The following object types are supported: ticket, organization, user, or group.
You must specify the type in the filter[type] parameter. Searches with type in the query string will result in an error.
Allowed For
- Agents
Pagination
- Cursor pagination
See Pagination.
Returns a maximum of 1000 records per page. The number of results shown in a page is determined by the page[size] parameter.
Note: You may experience a speed reduction or a timeout if you request 1000 results per page and you have many archived tickets in the results. Try reducing the number of results per page. We recommend 100 results per page.
The cursor specified by the after_cursor property in a response expires after one hour.
For more information on cursor-based pagination, see the following articles:
- Comparing cursor pagination and offset pagination
- Paginating through lists using cursor pagination
Limits
This API endpoint is rate-limited to 100 requests per minute per account. The limit also counts towards the global API rate limit.
Response Format
| Name | Type | Comment |
|---|---|---|
| links[next] | string | URL to the next page of results |
| meta[has_more] | string | Boolean indicating if there are more results |
| meta[after_cursor] | string | Cursor object returned from the Search Service |
| results | array | May consist of tickets, users, groups, or organizations, as specified by the filter_type parameter |
The response is similar to the response of GET /api/v2/search.json?, with a few changes:
- links - Has the following nested properties: prev and next. These replace the next_page and prev_page links. The prev property is always null because backward pagination is not supported. The next property may include an auto-generated link to the next page of results.
- meta - Has the following nested properties: has_more and after_cursor. The has_more property indicates whether the next page has more results. The after_cursor property is the cursor used to paginate to the next page. It expires after one hour.
There's no count property.
Query parameters
A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request.
A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request.
Specifies how many records should be returned in the response. You can specify up to 100 records per page.
The search query. See Query basics above. For details on the query syntax, see the Zendesk Support search reference
The object type returned by the export query. Can be ticket, organization, user, or group.
Response
Success response