Search Preview
Introduction to Search Preview
The Search Preview feature enhances search functionality by returning up to 20 top matching results with essential contextual data in a single API call. Unlike our standard Search endpoints, which return only record IDs and require subsequent API Collect calls, preview
endpoints significantly reduce frontend latency, enabling more responsive and user-friendly search experiences and unlocking new capabilities.
Requests and queries
Search Preview endpoints accept the same query structure as their corresponding Search endpoints. You can reference the existing Search endpoint documentation for each entity type, as the filtering and query logic are very similar
Pagination is not mandatory
The
_sort
function is not supported, meaning sorting order in the results cannot be specified
Response behavior and headers
Request returns a list of objects. Each object includes:
A limited set of predefined fields, specific to the entity type
Record ID
Elasticsearch match score
Response gives up to 20 results per request, without using pagination
Fewer response headers are returned
x-total-results
: Reflects the total number of matched recordsx-credits-remaining
: Shows remaining search credits for the user
Pagination
Pagination with Search Preview endpoints allows receiving up to 5 pages of results, therefore, accessing up to 100 results. To view a specific page, the user must include the query parameter page
and provide the corresponding page number they wish to retrieve. Each request to open a new page will consume additional credits.
Credits
Search Preview requests consume credits by the same logic described in the Credits topic.
Last updated
Was this helpful?