Asynchronous search
Receive results when the search is ready
Use async: true for searches that may take longer than your product’s request timeout. The request returns immediately while the search continues.
- Receive a webhook: Include
webhook_urlwithasync: true. Pearch sends a POST to that URL when results are ready, with the same JSON response format as a synchronous search. - Show progress: Keep the user informed while the search runs. Show the results when they arrive, then use
thread_idfor pagination.
Poll for results
- On
202 Accepted, save bothtask_idandthread_id. A cached request can return200with results immediately. - Poll
GET /v2/search/status/{task_id}until the task reaches a terminal status. Keep the UI in a running state while you wait. - When the status is
completed, read the result. Usethread_idto load more results.
The callback adds task metadata to the result. Deduplicate by task_id and use status polling to recover when a callback does not arrive. The webhook contract covers callback authentication, retries, and errors.
Updated about 4 hours ago
Did this page help you?
