---
title: "Site Map"
method: POST
path: "/map"
tags: ["Pages"]
---

# Site Map

`POST /map`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/map`
- Auth: API key in header `Payment-Signature`

Discover a site's URLs without fetching page content. Reads robots.txt sitemap directives, sitemap.xml and nested sitemap indexes, falling back to homepage link extraction. Price: $0.004.

## Request body

- object
  - `url` string, uri, required: The URL to process
  - `limit` number: Maximum URLs to return
  - `include` string[]: Only URLs whose path+query contains one of these
  - `exclude` string[]: Skip URLs whose path+query contains one of these
  - `timeout` number: Request timeout in milliseconds

## Response `200`

Every URL on a site, from sitemaps and links — no page fetches.

- object
  - `url` string
  - `urls` string[]: Discovered same-host URLs
  - `total` number
  - `source` 'sitemap' | 'links' | 'none': Where the URLs came from
  - `sitemapsChecked` number: Sitemap documents fetched (including nested indexes)
  - `mappedAt` string
  - `requestId` string

## Other responses

- `400`: The body failed validation
- `402`: Payment required — x402 v2 protocol. Parse the PAYMENT-REQUIRED response header (base64-encoded JSON), sign the payment with your wallet, then retry the request with the Payment-Signature request header.

---

[API](https://skmtc.dev/weblens/apis/weblens-api.md) · [All operations](https://skmtc.dev/weblens/apis/weblens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/weblens/apis/weblens-api/revisions/63a7e81b6921?raw)
