Batch Search
Purpose
Batch Search sends batches of requests to supported endpoints of the Search API suite with ease. You can call Batch Search APIs to run either asynchronously or synchronously.
The Batch Search service consists of the following endpoints:
Synchronous Batch
Allows the submission of a new batch for synchronous processing.
Asynchronous Batch Submission
Allows the submission of a new batch for asynchronous processing.
Asynchronous Batch Download
Fetches the results of the Asynchronous Batch processing.
Asynchronous API overview
The Asynchronous API is appropriate for processing big volumes of relatively complex search requests.
- It allows the retrieval of results in a separate call (multiple downloads are possible).
- The asynchronous API is optimized for reliability and is not expected to run into a timeout.
- The number of batch items is limited to 10000 for this API.
Data retention period notice
Please be aware that batches processed by an Asynchronous API are available for download for 14 days, after which a request for results download will return a 404
(Not Found) response.
Sequence of Asynchronous API client actions
- Client sends a request to the Asynchronous Batch Submission endpoint.
- The server will respond with one of the following:
- HTTP
202
or HTTP303
(depending on theredirectMode
parameter) with theLocation
header, which points to the Asynchronous Natch Download endpoint. - HTTP error (see Asynchronous Batch Submission HTTP status codes).
- HTTP
- After getting an HTTP
202
or HTTP303
response, the client should follow the redirect to the Asynchronous Batch Download endpoint which is a blocking long poll request. - When a client calls the Asynchronous Batch Download endpoint the possible scenarios are:
- Batch response is calculated before timeout (by default this is 120 seconds; it can be changed by using the
waitTimeSeconds
parameter).- The client receives HTTP
200
. - Batch response is ready and it gets streamed to the client.
- The client receives HTTP
- Batch response is not ready before timeout.
- The client receives HTTP
202
. - Batch request is accepted for processing.
- The client downloads batch results from the URL specified by the
Location
header (see point 3).
- The client receives HTTP
- Batch response is calculated before timeout (by default this is 120 seconds; it can be changed by using the
Synchronous API overview
The Synchronous API is recommended for lightweight search requests.
- When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later on.
- The Synchronous API will return a timeout error if the request takes longer than 60 seconds.
- The number of batch items is limited to 100 for this API.
Sequence of Synchronous API client actions
- Client sends a request to the Synchronous Batch endpoint.
- The server will respond with one of the following:
- HTTP
200
Batch processing result: The calculation is finished before timeout and the client downloads results straight away. - HTTP
408
Request timeout error: If the request takes longer than 60 seconds and cannot be finished in this timeframe. - HTTP another error: See the Synchronous Batch HTTP status codes section.
- HTTP
Supported Search API suite endpoints
A list of Search API suite endpoints supported by Batch Search service can be found below. For details regarding particular API usage, consult the following respective API documentation pages: