> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/map-1.md).

# Tavily Map

Blocks for discovering a website's URL structure with Tavily.

## Tavily Map

### What it is

Maps a website's structure with Tavily, discovering its URLs without extracting content

### How it works

The block discovers the URLs reachable from a root URL, following links up to `max_depth` and returning a flat list of `links` — without fetching page content, which makes it faster and cheaper than a full crawl. Use `limit` to cap how many pages are discovered and optional natural-language `instructions` to narrow the results (for example, "Only documentation pages").

Because no content is extracted, mapping is billed at 1 credit per 10 discovered pages (2 per 10 when instructions are provided); actual spend is read from the API's usage report.

### Inputs

| Input        | Description                                                                                    | Type | Required |
| ------------ | ---------------------------------------------------------------------------------------------- | ---- | -------- |
| url          | The root URL to map                                                                            | str  | Yes      |
| limit        | Maximum number of pages to discover                                                            | int  | No       |
| max\_depth   | Maximum link depth from the root URL                                                           | int  | No       |
| instructions | Natural language instructions guiding which pages to include (e.g. 'Only documentation pages') | str  | No       |

### Outputs

| Output | Description                            | Type       |
| ------ | -------------------------------------- | ---------- |
| error  | Error message if the map failed        | str        |
| links  | List of URLs discovered on the website | List\[str] |

### Possible use case

**Sitemap Discovery**: Enumerate a site's pages before deciding what to crawl or extract.

**Scoped Crawl Planning**: Map first, filter the links, then feed a subset into the Extract block to control cost.

**Coverage Auditing**: List all reachable URLs under a section to spot orphaned or missing pages.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://agpt.co/docs/integrations/block-integrations/map-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
