Map
Discover a site's URLs from a starting URL without extracting content.
/search/v1/map● SupportedRequest body
urlstring必填The root URL to begin the mapping.
limitinteger可选Total number of links the crawler will process before stopping.
instructionsstring可选Natural language instructions for the crawler. When specified, the cost increases to 2 API credits per 10 successful pages instead of 1 API credit per 10 pages.
max_depthinteger可选Max depth of the mapping. Defines how far from the base URL the crawler can explore.
max_breadthinteger可选Max number of links to follow per level of the tree (i.e., per page).
select_pathsarray可选Regex patterns to select only URLs with specific path patterns (e.g., `/docs/.*`, `/api/v1.*`).
select_domainsarray可选Regex patterns to select crawling to specific domains or subdomains (e.g., `^docs\.example\.com$`).
exclude_pathsarray可选Regex patterns to exclude URLs with specific path patterns (e.g., `/private/.*`, `/admin/.*`).
exclude_domainsarray可选Regex patterns to exclude specific domains or subdomains from crawling (e.g., `^private\.example\.com$`).
allow_externalboolean可选Whether to include external domain links in the final results list.
▸ 更多参数(2)
timeoutnumber可选Maximum time in seconds to wait for the map operation before timing out. Must be between 10 and 150 seconds.
include_usageboolean可选Whether to include credit usage information in the response.`NOTE:`The value may be 0 if the total successful pages mapped has not yet reached 10 calls. See our [Credits & Pricing documentation](https://docs.tavily.com/documentation/api-credits) for details.
Returns
200
Your account balance must be above 0 before the call. Billed by the credits the call actually consumed, $0.01 per credit; when the upstream reports no usage, the call is billed at the most it could have consumed.
Errors follow the Tavily format — see error codes
Response
HTTP 200
Map results returned successfully
application/json
| Name | Type | Description |
|---|---|---|
| base_url | string | The base URL that was mapped. |
| results | array<string> | A list of URLs that were discovered during the mapping. |
| response_time | number | Time in seconds it took to complete the request. |
| usage | object | Credit usage details for the request. |
| request_id | string | A unique request identifier you can share with customer support to help resolve issues with specific requests. |