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

# Map API: list every URL on a website

> List the URLs of a site in seconds from its sitemaps and links, without reading the pages. Use it to see what exists before you scrape or crawl.

`POST /v1/web/map` lists the URLs on a site without reading any of them. It answers in one call and costs 1 credit, which makes it the quickest way to see what a site has before you crawl it.

## When to use it

* You want to see how big a site is before running a [Crawl](https://docs.hydrafetch.com/endpoints/crawl.md).
* You want a list of URLs to filter and then read with a [Batch](https://docs.hydrafetch.com/endpoints/batch.md).
* You want every URL that contains a word, such as every page with `pricing` in its address.

On a site with no sitemap, Map lists the links on the starting page and, when that finds only a few pages, also searches the site for more.

Map returns addresses only, not content. To read the pages, pass the URLs to Scrape, Batch or Crawl.

## Example

```bash cURL theme={null}
curl -X POST https://api.hydrafetch.com/v1/web/map \
  -H "X-API-Key: hf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "search": "pricing",
    "limit": 1000
  }'
```

```javascript Node theme={null}
import { Hydrafetch } from "@hydrafetch/node-sdk";

const hf = new Hydrafetch(process.env.HYDRAFETCH_API_KEY);
const site = await hf.map("https://example.com", { search: "pricing", limit: 1000 });
site.links.forEach((l) => console.log(l.url, l.lastmod));
```

```python Python theme={null}
from hydrafetch import Hydrafetch

hf = Hydrafetch()
site = hf.map("https://example.com", search="pricing", limit=1000)
for link in site["links"]:
    print(link["url"], link["lastmod"])
```

```json theme={null}
{
  "data": {
    "url": "https://example.com",
    "links": [
      { "url": "https://example.com/pricing", "lastmod": "2026-10-28T00:00:00.000Z" },
      { "url": "https://example.com/pricing/enterprise", "lastmod": null }
    ],
    "count": 2,
    "total": 2,
    "truncated": false
  }
}
```

## Options

**url** `string` *required*

The site to list. Must be http or https.

**limit** `number`

The most URLs to return, from 1 to 5000.

**search** `string`

Keep only URLs that contain this word, such as `"pricing"`. Up to 200 characters.

**sitemap** `string`

How to use the site's published page list (its sitemap): `include` it alongside links found on the page, use it `only`, or `skip` it.

**includeLinks** `boolean` (default: false)

Also add links found on the starting page, not only the site's page list.

**sitemapInclude** `string`

For sites that publish several page lists, only read the lists whose address contains one of these comma-separated words. For example `"post"` to reach a blog's articles, or `"pages"` to reach a shop's information pages instead of its products.

**sitemapExclude** `string`

Skip page lists whose address contains any of these comma-separated words. Combine it with `sitemapInclude`, for example include `"post"` and exclude `"tag,category,author"`.

**order** `string` (default: newest)

`newest` lists the most recently changed pages first, `oldest` the least recent, and `sitemap` keeps the order of the site's own list. Pages with no date come last.

**includeSubdomains** `boolean` (default: false)

Also list URLs on the site's subdomains.

**ignoreQueryParameters** `boolean` (default: false)

Treat URLs that differ only in their query string as one URL.

**before** `string`

For paging through a large archive from newest to oldest: return only URLs last changed at or before this ISO 8601 time. See below.

**offset** `number`

Skip this many results, then return the next `limit`. Use it to page through sites whose page lists have no dates.

## Response fields

**data** `object`

**MapResult**

**url** `string`

The site you asked for.

**links** `object[]`

Each URL found, as `url` and `lastmod`: when the site's page list says the page last changed, or `null` when it does not say.

**count** `number`

How many URLs this response holds.

**total** `number`

How many URLs the whole list has. Use it to know when you have paged to the end.

**truncated** `boolean`

`true` when the site was too large to list completely in one go. `total` is then a lower bound, not the site's real size.

## Paging through a large site

`limit` returns the **most recently changed** pages first, not an even sample of the site. On a site where one kind of page changes all the time, such as a shop's product pages, a small limit can return only that kind. Use `sitemapInclude` to reach the rest.

To get more than one page of results:

* **When pages have dates**, pass the oldest `lastmod` from the previous response as `before`, and remove any URL you already have.
* **When they do not**, step `offset` through `0`, `limit`, `2 × limit` and so on, until `offset + count` reaches `total`. Do not stop just because a page came back short.

## Cost

1 credit per call, however many URLs come back. A call that finds no URLs is free.

## Next steps

> [card] [Crawl a whole site](https://docs.hydrafetch.com/endpoints/crawl.md)
>
> Read the pages you mapped.

> [card] [Read a list of URLs](https://docs.hydrafetch.com/endpoints/batch.md)
>
> Send the URLs you picked to a batch.

> [card] [Scrape one URL](https://docs.hydrafetch.com/endpoints/scrape.md)
>
> Read any single URL you found.

> [card] [API reference](https://docs.hydrafetch.com/api-reference)
>
> The full schema, with a live playground.


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