> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Tavily

> Tavily's site crawl and map APIs, and the account's credit usage.

![](https://mintcdn.com/webrouter/T_A5Quwg50s_JK2y/logo/data-apis/tavily.svg?fit=max\&auto=format\&n=T_A5Quwg50s_JK2y\&q=85\&s=8f4cb662b42cd69a53093e26a4111010)

[Web Catalog · Search](https://docs.webrouter.net/data-apis.md?category=search)

Needs&#x20;

`TAVILY_API_KEY`

Endpoints

3

Auth

Key in header

[Vendor docs](https://docs.tavily.com/documentation/api-reference)

&#x20;·&#x20;

[Pricing](https://www.tavily.com/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `TAVILY_API_KEY` | required | a Tavily API key, starting tvly- (app.tavily.com) |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Auth is 'Authorization: Bearer \<key>'.
* Credits: crawl and map cost per 10 pages and double with instructions.
* Tavily search, extract and research go through web-router's search, extract and research, not this entry.

## Endpoints

POST

Crawl a site

Graph-based site traversal with built-in extraction; returns pages in the same call.

[Open](#tavily-crawl-site)

POST

Map a site

Traverse a site like a graph and return its URLs without page content.

[Open](#tavily-map-site)

GET

Get API key and account usage

Credit usage for your key and plan.

[Open](#tavily-account-usage)

### Crawl a site

POST

`/crawl`

`tavily.crawl.site`

Graph-based site traversal with built-in extraction; returns pages in the same call.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`url` required</td><td>string</td><td>body</td><td>Root URL to begin from. Example `docs.tavily.com`</td></tr>

    <tr>
      <td>
        `instructions`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Natural-language guidance for the crawler; raises the cost to 2 credits per 10 pages.
      </td>
    </tr>

    <tr>
      <td>
        `max_depth`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        How far from the base URL to explore.
      </td>
    </tr>

    <tr>
      <td>
        `max_breadth`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Links to follow per page.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Total links to process before stopping.
      </td>
    </tr>

    <tr>
      <td>
        `select_paths`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes selecting URL paths.
      </td>
    </tr>

    <tr>
      <td>
        `select_domains`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes selecting domains.
      </td>
    </tr>

    <tr>
      <td>
        `exclude_paths`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes excluding URL paths.
      </td>
    </tr>

    <tr>
      <td>
        `exclude_domains`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes excluding domains.
      </td>
    </tr>

    <tr>
      <td>
        `allow_external`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Include external-domain links in results.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        number
      </td>

      <td>
        body
      </td>

      <td>
        Seconds before timing out, 10-150.
      </td>
    </tr>

    <tr>
      <td>
        `chunks_per_source`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Max chunks per page.
      </td>
    </tr>

    <tr><td>`extract_depth`</td><td>string</td><td>body</td><td>advanced gets more data at higher cost. One of `basic`, `advanced`</td></tr>
    <tr><td>`format`</td><td>string</td><td>body</td><td>Content format. One of `markdown`, `text`</td></tr>

    <tr>
      <td>
        `include_images`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Include images.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.tavily.com/documentation/api-reference/endpoint/crawl.md) · Same job: [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-crawl), [Decodo](https://docs.webrouter.net/data-apis/decodo.md#decodo-crawl-start), [Firecrawl](https://docs.webrouter.net/data-apis/firecrawl.md#firecrawl-crawl-start), [Olostep](https://docs.webrouter.net/data-apis/olostep.md#olostep-crawls-create), [ScrapeGraphAI](https://docs.webrouter.net/data-apis/scrapegraphai.md#scrapegraphai-crawl-start), [Search1API](https://docs.webrouter.net/data-apis/search1api.md#search1api-web-deepcrawl)

```python Python theme={null}
router.call_data_api("tavily.crawl.site", {'url': 'docs.tavily.com'})
```

```text MCP theme={null}
call_data_api(endpoint="tavily.crawl.site", params={"url": "docs.tavily.com"})
```

> [!NOTE]
>
> * A read over POST: it fetches pages and changes nothing in your account.
> * Synchronous: returns the crawled pages in the response; bound it with limit, max\_depth and timeout.

### Map a site

POST

`/map`

`tavily.map.site`

Traverse a site like a graph and return its URLs without page content.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`url` required</td><td>string</td><td>body</td><td>Root URL to begin from. Example `docs.tavily.com`</td></tr>

    <tr>
      <td>
        `instructions`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Natural-language guidance for the crawler; raises the cost to 2 credits per 10 pages.
      </td>
    </tr>

    <tr>
      <td>
        `max_depth`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        How far from the base URL to explore.
      </td>
    </tr>

    <tr>
      <td>
        `max_breadth`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Links to follow per page.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Total links to process before stopping.
      </td>
    </tr>

    <tr>
      <td>
        `select_paths`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes selecting URL paths.
      </td>
    </tr>

    <tr>
      <td>
        `select_domains`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes selecting domains.
      </td>
    </tr>

    <tr>
      <td>
        `exclude_paths`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes excluding URL paths.
      </td>
    </tr>

    <tr>
      <td>
        `exclude_domains`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Regexes excluding domains.
      </td>
    </tr>

    <tr>
      <td>
        `allow_external`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Include external-domain links in results.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        number
      </td>

      <td>
        body
      </td>

      <td>
        Seconds before timing out, 10-150.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.tavily.com/documentation/api-reference/endpoint/map.md) · Same job: [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-map), [Decodo](https://docs.webrouter.net/data-apis/decodo.md#decodo-map), [Firecrawl](https://docs.webrouter.net/data-apis/firecrawl.md#firecrawl-map-urls), [Olostep](https://docs.webrouter.net/data-apis/olostep.md#olostep-maps-create), [Search1API](https://docs.webrouter.net/data-apis/search1api.md#search1api-web-sitemap), [Spider Cloud](https://docs.webrouter.net/data-apis/spidercloud.md#spidercloud-links-collect)

```python Python theme={null}
router.call_data_api("tavily.map.site", {'url': 'docs.tavily.com'})
```

```text MCP theme={null}
call_data_api(endpoint="tavily.map.site", params={"url": "docs.tavily.com"})
```

> [!NOTE]
>
> * A read over POST: it lists URLs and changes nothing in your account.

### Get API key and account usage

GET

`/usage`

`tavily.account.usage`

Credit usage for your key and plan.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `X-Project-ID`
      </td>

      <td>
        string
      </td>

      <td>
        header
      </td>

      <td>
        Scope the query to one project.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.tavily.com/documentation/api-reference/endpoint/usage.md)

```python Python theme={null}
router.call_data_api("tavily.account.usage")
```

```text MCP theme={null}
call_data_api(endpoint="tavily.account.usage")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.