Справочник написан на английском. Названия полей, примеры и коды ошибок на всех языках одинаковые.
Runs many calls in one request. Each item names an endpoint and carries that endpoint's request body. Items for search, fetch, autocomplete, knowledge, geocode and reverse-geocode run. Items for places/details and extract answer 501 api_not_implemented each. An item for research, crawl, map, lens or batch refuses the whole batch with 400 invalid_request.
The sync mode takes 1 to 100 items with at most 100 URLs in total and answers within 60 seconds; items not finished by then come back as 504 timeout and are free. custom_id is optional, at most 64 bytes and unique within the batch. webhook_url and metadata are refused with 400 in sync mode.
The sync response lists results in request order, each with the HTTP status the call would have had alone and its response or error body. The batch itself is 200 whenever the outer body was valid. The async mode (up to 20,000 items as a job) is planned and answers 501 api_not_implemented.
What is charged
Each item is charged by the rule of its own endpoint. Items that failed are free.
Many calls in one request
POST https://api.websearch.fast/v1/web/batch
mode: sync is available; mode: async is planned.
Headers
Name
Type
Description
Idempotency-Key
string
1 to 128 bytes; a retry with the same key and body within 24 hours returns the same job. 1 to 128 characters.
Body
Name
Type
Description
requestsrequired
array of object
sync: 1 to 100 items; async: 1 to 20000. The fetch items of a sync batch name at most 100 URLs in total, otherwise 400. Items for endpoints that have not shipped answer 501 in their own result; mode async answers 501 until S3. 1 to 20,000 items.Show fields
Name
Type
Description
custom_id
string
Your id, at most 64 bytes and unique in the batch, otherwise 400. Defaults to the index as a string. At most 64 characters.
endpointrequired
string
One of search, fetch, autocomplete, knowledge, geocode, reverse-geocode, places/details, extract.
bodyrequired
object
The request body of that endpoint.
mode
string
One of sync, async. Default sync.
webhook_url
string
Async only; refused with 400 in sync mode. Public https URL that receives the final job object, signed with webhook_secret. At most 500 characters.
metadata
object
Async only; refused with 400 in sync mode. Your own string values, echoed on the job; at most 4 KB.
{"object": "web.batch","request_id": "20261128120006123456789a1b2c3d4Kx7Qm2Pf","created": 1795867206,"results":[{"index": 0,"custom_id": "q1","status": 200,"body":{"object": "web.search","results":[],"warnings":[{"code": "no_results"}]}},{"index": 1,"custom_id": "q2","status": 422,"body":{"error":{"code": "fetch_failed","message": "The page could not be read.","type": "invalid_request_error","param": "url"
}}}],"usage":{"charged": false,"items":[]}}
Response fields (200)
Sync batch (mode sync, S2): per-item status and body.
Name
Type
Description
objectrequired
string
Always web.batch.
request_idrequired
string
Same as the X-Request-Id header.
createdrequired
integer
Unix seconds (UTC).
usagerequired
object
Show fields
Name
Type
Description
chargedrequired
boolean
itemsrequired
array of object
Show fields
Name
Type
Description
unitrequired
string
Billable unit, for example search_web, content_page, fetch_page, geocode, autocomplete, knowledge.
countrequired
integer
warnings
array of object
Show fields
Name
Type
Description
coderequired
string
For example no_results, content_partial, answer_unavailable, partial, all_failed, reach_reduced.
message
string
param
string
resultsrequired
array of object
Show fields
Name
Type
Description
indexrequired
integer
custom_id
string
statusrequired
integer
HTTP status the call would have had alone.
bodyrequired
object
Response or error body of the item.
Response fields (202)
Async batch job created (mode async, S3).
Name
Type
Description
objectrequired
string
Always web.batch_job.
idrequired
string
At most 64 characters. Starts with wb_.
statusrequired
string
One of queued, running, succeeded, failed, cancelled.
stop_reason
string
One of completed, budget, limit, cancelled, deadline, error.
created_atrequired
integer
started_at
integer
completed_at
integer
inputrequired
object
usagerequired
object
Show fields
Name
Type
Description
itemsrequired
array of object
Show fields
Name
Type
Description
unitrequired
string
Billable unit, for example search_web, content_page, fetch_page, geocode, autocomplete, knowledge.
countrequired
integer
error
object
Show fields
Name
Type
Description
coderequired
string
message
string
poll_after_ms
integer
webhook_secret
string
Only in the create response, when webhook_url was set.
metadata
object
expires_at
integer
progress
object
Show fields
Name
Type
Description
total
integer
done
integer
ok
integer
failed
integer
Errors
Status
Codes
400
invalid_request, invalid_url, invalid_schema or invalid_image. Not charged.
401
invalid_token. Not charged.
403
pre_consume_token_quota_failed (the key's own spending limit), access_denied, web_not_allowed or model_not_in_plan (customer keys while plans cannot include the web tools). Not charged.
404
not_found or invalid_endpoint. Not charged.
409
idempotency_conflict or request_in_progress. Not charged.
413
read_request_body_failed: the request body is over the limit. Not charged.
429
rate_limited, concurrency_limited, api_key_temporarily_frozen, or the failure guard. Not charged.
500
internal_error. Not charged.
501
api_not_implemented: the endpoint, type or option has not shipped. Not charged.
503
source_unavailable, web_api_disabled, token_cache_busy or billing_busy (the charge could not be prepared in time; retry after Retry-After). Not charged.
504
timeout. Not charged.
Get an async batch
GET https://api.websearch.fast/v1/web/batch/{id}
Planned. Until it ships, calls return 501 api_not_implemented.
One of queued, running, succeeded, failed, cancelled.
stop_reason
string
One of completed, budget, limit, cancelled, deadline, error.
created_atrequired
integer
started_at
integer
completed_at
integer
inputrequired
object
usagerequired
object
Show fields
Name
Type
Description
itemsrequired
array of object
Show fields
Name
Type
Description
unitrequired
string
Billable unit, for example search_web, content_page, fetch_page, geocode, autocomplete, knowledge.
countrequired
integer
error
object
Show fields
Name
Type
Description
coderequired
string
message
string
poll_after_ms
integer
webhook_secret
string
Only in the create response, when webhook_url was set.
metadata
object
expires_at
integer
progress
object
Show fields
Name
Type
Description
total
integer
done
integer
ok
integer
failed
integer
Errors
Status
Codes
400
invalid_request, invalid_url, invalid_schema or invalid_image. Not charged.
401
invalid_token. Not charged.
403
pre_consume_token_quota_failed (the key's own spending limit), access_denied, web_not_allowed or model_not_in_plan (customer keys while plans cannot include the web tools). Not charged.
404
not_found or invalid_endpoint. Not charged.
413
read_request_body_failed: the request body is over the limit. Not charged.
429
rate_limited, concurrency_limited, api_key_temporarily_frozen, or the failure guard. Not charged.
500
internal_error. Not charged.
501
api_not_implemented: the endpoint, type or option has not shipped. Not charged.
503
source_unavailable, web_api_disabled, token_cache_busy or billing_busy (the charge could not be prepared in time; retry after Retry-After). Not charged.
504
timeout. Not charged.
Results of an async batch
GET https://api.websearch.fast/v1/web/batch/{id}/results
Planned. Until it ships, calls return 501 api_not_implemented.
invalid_request, invalid_url, invalid_schema or invalid_image. Not charged.
401
invalid_token. Not charged.
403
pre_consume_token_quota_failed (the key's own spending limit), access_denied, web_not_allowed or model_not_in_plan (customer keys while plans cannot include the web tools). Not charged.
404
not_found or invalid_endpoint. Not charged.
413
read_request_body_failed: the request body is over the limit. Not charged.
429
rate_limited, concurrency_limited, api_key_temporarily_frozen, or the failure guard. Not charged.
500
internal_error. Not charged.
501
api_not_implemented: the endpoint, type or option has not shipped. Not charged.
503
source_unavailable, web_api_disabled, token_cache_busy or billing_busy (the charge could not be prepared in time; retry after Retry-After). Not charged.
504
timeout. Not charged.
Cancel an async batch
POST https://api.websearch.fast/v1/web/batch/{id}/cancel
Planned. Until it ships, calls return 501 api_not_implemented.
Path parameters
Name
Type
Description
idrequired
string
Starts with wb_.
Example request
curl -X POST https://api.websearch.fast/v1/web/batch/wb_01JD7S2N5T/cancel \
-H "Authorization: Bearer $WEBSEARCH_API_KEY"
One of queued, running, succeeded, failed, cancelled.
stop_reason
string
One of completed, budget, limit, cancelled, deadline, error.
created_atrequired
integer
started_at
integer
completed_at
integer
inputrequired
object
usagerequired
object
Show fields
Name
Type
Description
itemsrequired
array of object
Show fields
Name
Type
Description
unitrequired
string
Billable unit, for example search_web, content_page, fetch_page, geocode, autocomplete, knowledge.
countrequired
integer
error
object
Show fields
Name
Type
Description
coderequired
string
message
string
poll_after_ms
integer
webhook_secret
string
Only in the create response, when webhook_url was set.
metadata
object
expires_at
integer
progress
object
Show fields
Name
Type
Description
total
integer
done
integer
ok
integer
failed
integer
Errors
Status
Codes
400
invalid_request, invalid_url, invalid_schema or invalid_image. Not charged.
401
invalid_token. Not charged.
403
pre_consume_token_quota_failed (the key's own spending limit), access_denied, web_not_allowed or model_not_in_plan (customer keys while plans cannot include the web tools). Not charged.
404
not_found or invalid_endpoint. Not charged.
413
read_request_body_failed: the request body is over the limit. Not charged.
429
rate_limited, concurrency_limited, api_key_temporarily_frozen, or the failure guard. Not charged.
500
internal_error. Not charged.
501
api_not_implemented: the endpoint, type or option has not shipped. Not charged.
503
source_unavailable, web_api_disabled, token_cache_busy or billing_busy (the charge could not be prepared in time; retry after Retry-After). Not charged.