Reads the pages of one site as an asynchronous job, starting from a URL and following its sitemaps and links within the limits you set. The host of url is the scope of the crawl. Pages that robots.txt disallows are counted as skipped_robots and not read.
Pages can be listed while the crawl runs. A crawl and its pages are kept for 7 days after the job ends.
What is charged
Each page read with status: ok is charged once. Failed and skipped pages are free. A cancelled crawl is charged for the pages read before the cancel took effect.
Units: crawl_page. usage.items in the response lists them.
Start a crawl of one site
POST https://api.websearch.fast/v1/web/crawl
Planned. Until it ships, calls return 501 api_not_implemented.
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
urlrequired
string
Public http(s) URL, at most 2048 bytes. At most 2048 characters.
limit
integer
1 to 10,000. Default 100.
max_depth
integer
0 to 20. Default 3.
include_paths
array of string
At most 50 items.
exclude_paths
array of string
At most 50 items.
include_subdomains
boolean
Default false.
use_sitemaps
boolean
Default true.
ignore_query
boolean
Default true.
format
string
One of markdown, text, html. Default markdown.
mode
string
One of main, full. Default main.
max_chars
integer
1000 to 500,000. Default 20000.
include_links
boolean
Default false.
include_metadata
boolean
Default true.
webhook_url
string
Public https URL that receives the final job object, signed with webhook_secret. At most 500 characters.
metadata
object
Your own string values, echoed on the job; at most 4 KB.
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
discovered
integer
queued
integer
read
integer
failed
integer
skipped_robots
integer
skipped_scope
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.
422
fetch_failed, site_refused, page_too_large or extraction_failed. 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 a crawl job
GET https://api.websearch.fast/v1/web/crawl/{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
discovered
integer
queued
integer
read
integer
failed
integer
skipped_robots
integer
skipped_scope
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.
Pages of a crawl
GET https://api.websearch.fast/v1/web/crawl/{id}/pages
Planned. Until it ships, calls return 501 api_not_implemented.
Final URL after redirects. For now the requested URL, because the reader does not report the final one yet.
statusrequired
string
One of ok, failed.
error
object
Show fields
Name
Type
Description
coderequired
string
messagerequired
string
http_status
integer
content_type
string
title
string
content
string
format
string
One of markdown, text, html.
chars
integer
truncated
boolean
extraction
string
Neutral label of how the text was taken. New values can appear. One of article, full_page, document, feed, plain, structured.
language
string
published_at
string
metadata
object
Show fields
Name
Type
Description
description
string
author
string
site_name
string
canonical_url
string
image_url
string
keywords
array of string
meta
object
Meta name and property tags, at most 100.
json_ld
array of object
At most 20 items.
links
array of object
At most 1000 items.Show fields
Name
Type
Description
urlrequired
string
text
string
rel
string
images
array of object
At most 200 items.Show fields
Name
Type
Description
urlrequired
string
alt
string
width
integer
height
integer
pdf_pages
integer
relevant_passages
array of string
fetched_at
integer
depth
integer
has_morerequired
boolean
next_cursor
string
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.
Cancel a crawl
POST https://api.websearch.fast/v1/web/crawl/{id}/cancel
Planned. Until it ships, calls return 501 api_not_implemented.
Path parameters
Name
Type
Description
idrequired
string
Starts with wc_.
Example request
curl -X POST https://api.websearch.fast/v1/web/crawl/wc_01JD7R4K8P/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
discovered
integer
queued
integer
read
integer
failed
integer
skipped_robots
integer
skipped_scope
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.