Sitemap reader

$0.002 per call · USDC via x402 · POST /api/sitemap

Fetch and parse a sitemap.xml (or sitemap index): returns up to 500 URLs with lastmod, or the child sitemaps of an index. Send POST /api/sitemap with the required field url and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with type, count and urls.

Category: Network & domains · Tags: sitemap crawling seo urls

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
urlstringyesSitemap URL (xml) Also accepted as link, uri, href, page.

Example request

curl -i -X POST https://agent402.tools/api/sitemap \
  -H "Content-Type: application/json" \
  -d '{"url":"https://agent402.tools/sitemap.xml"}'

Without payment this returns HTTP 402 Payment Required with the exact price for sitemap; any x402 v2 or MPP client pays it and retries.

Example response

{
  "type": "urlset",
  "count": 42,
  "urls": [
    {
      "loc": "https://agent402.tools/",
      "lastmod": "2026-06-01"
    }
  ]
}
FieldTypeAlways presentIn the example
typestringyesurlset
countnumberyes42
urlsarray of objectsyes1 item in the example

From an MCP client

catalog.call {
  "slug": "sitemap",
  "params": {
    "url": "https://agent402.tools/sitemap.xml"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for sitemap; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/sitemap", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "url": "https://agent402.tools/sitemap.xml"
  }),
});

Part of these workflows

Sitemap reader is one step in these 2 skill packs, each sold as a single call:

Related tools

Site map (URL discovery)

$0.005 · POST /api/site-map

Discover a website's URLs in one call: reads robots.txt, its declared sitemap(s) (sitemap indexes and gzipped sitemaps i…

Robots.txt check

$0.001 · POST /api/robots-check

Fetch a site's robots.txt and answer: may this user-agent crawl this path? Returns the matched rule and all declared sit…

A2A Agent Card fetch

$0.005 · POST /api/a2a-card-fetch

Discover and fetch a site's A2A (Agent2Agent protocol) Agent Card - tries /.well-known/agent-card.json then /.well-known…

ASN + IP geolocation

$0.001 · POST /api/asn-info

Look up the Autonomous System (ASN), prefix, country, registry, and allocation date for an IPv4 address - or for a hostn…

Certificate transparency search

$0.005 · POST /api/cert-transparency

Search public Certificate Transparency logs for every cert issued to a domain. Two independent public CT search services…

DKIM key lookup

$0.002 · POST /api/dkim-lookup

Fetch and parse a DKIM public-key record at <selector>._domainkey.<domain> (RFC 6376). Returns the parsed key params (al…