# WebLens Sitemap Discovery API

> WebLens Sitemap Discovery API is a paid API for AI agents from api.weblens.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-02).

Discovers and maps all URLs on a website by crawling its sitemap(s), returning a complete list of pages found

## Facts

- Endpoint: POST https://api.weblens.dev/map?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weblens-sitemap-discovery-api-c0057368
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rd-BgMYHF61lpJpmHS1h3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability weblens-sitemap-discovery-api-c0057368 -d '<json body>'
```

Example prompt: Can you map out all the pages on https://example.com by discovering its sitemap, so I have a complete URL list to work with?

## When to prefer this

Use this endpoint when you need a fast, complete inventory of all URLs on a website via its sitemap rather than crawling every page individually. It is cheaper per call than full crawls and faster than spidering the entire site. Prefer it when the target site publishes a sitemap and you need breadth (all URLs) rather than depth (page content). Best for SEO audits, content inventories, competitor research, and pre-crawl planning.

## Known failure modes

- No sitemap found — site may not publish a sitemap.xml or robots.txt sitemap directive
- Domain unreachable or returns non-200 status — network or DNS errors
- Sitemap is malformed XML — parser may return partial results or error
- Rate limiting by the target site — may result in incomplete URL list
- Payment failure via x402 protocol — call not executed if USDC payment cannot be processed

## How this service works

# WebLens - Web Intelligence API, pay per call

Scrape, crawl, map and extract the web. No account, no API key, no monthly
minimum — you pay for the calls you make and nothing else.

## Pricing
Page fetching starts at **$0.002**, whole-site crawling at
**$0.0015/page**, and sitemap discovery at **$0.004**.
Comparable services bill $0.007-0.008 per request, or reach a lower per-page
rate only on a $99/month commitment. WebLens has no commitment to reach.

## Payment Protocol
All paid endpoints use the [x402 protocol](https://x402.org) for HTTP-native
micropayments (USDC on Base).

## Cache Discount
Cached responses are **70% cheaper** than fresh fetches.

## Output

A JSON object containing the input URL, an array of all discovered page URLs, the total count of URLs found, the source (e.g. sitemap), the timestamp of the mapping, a request ID, and the number of sitemaps checked.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Site URL to map"
  },
  "limit": {
   "type": "number",
   "maximum": 5000,
   "description": "Maximum URLs to return (default 1000, max 5000)"
  },
  "exclude": {
   "type": "array",
   "description": "Skip URLs whose path+query contains one of these substrings"
  },
  "include": {
   "type": "array",
   "description": "Only URLs whose path+query contains one of these substrings"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com",
  "urls": [
   "https://example.com/about",
   "https://example.com/blog/post-1"
  ],
  "total": 2,
  "source": "sitemap",
  "mappedAt": "2026-07-31T12:00:00.000Z",
  "requestId": "req_map123",
  "sitemapsChecked": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weblens-sitemap-discovery-api-c0057368/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.weblens.dev](https://www.zero.xyz/host/api.weblens.dev/llms.txt)
