# grist.tools Sitemap Parse

> grist.tools Sitemap Parse is a paid API for AI agents from grist.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Fetches and parses an XML, text, RSS, or Atom sitemap (or sitemap index) from a given URL or bare origin, returning all discovered URLs with optional metadata.

## Facts

- Endpoint: POST https://grist.tools/v1/sitemap-parse?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/grist-tools-sitemap-parse-5a30f190
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fomuOsb5m0DjWVgnomKsY

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 grist-tools-sitemap-parse-5a30f190 -d '<json body>'
```

Example prompt: Parse the sitemap for https://example.com and give me all the URLs it contains, including their lastmod dates — discover it through robots.txt if possible and return up to 10000 URLs.

## When to prefer this

Choose this endpoint when you need a deterministic, no-auth, pay-per-call way to extract all URLs from a website's sitemap, including sitemap index traversal and robots.txt-based discovery. It is especially useful for SEO audits, content mapping, change monitoring pipelines, or any agent workflow that needs a reliable structured list of a site's public pages without setting up scraping infrastructure.

## Known failure modes

- URL is not reachable or returns non-2xx — sitemap listed as not_fetchable
- Sitemap is malformed XML or unsupported format — reported in sitemaps_skipped with reason malformed
- Result truncated when URL count exceeds the specified limit — truncated flag set to true
- Sitemap index children exceed max_sitemaps limit — extras skipped with reason sitemap_limit
- Cross-host sitemap links skipped — reported with reason cross_host
- Sitemap too large to process — reported with reason too_large
- robots.txt has no Sitemap: lines and /sitemap.xml is absent — entry_url falls back or returns empty

## How this service works

x402 API catalogue for AI agents: 50 deterministic HTTP endpoints, paid per call with no account and no API key. One endpoint does one thing, always the same way, for a fraction of a cent.

## Output

Returns a structured object containing the full list of discovered URLs (with optional lastmod, changefreq, and priority per entry), total URL count, whether the result was truncated, number of sitemaps visited, any skipped sitemaps with reasons, the discovery method used (direct, robots.txt, or well-known path), format detected (xml/text/rss/atom), and a fetch timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Absolute http(s) URL, up to 2048 characters, of a sitemap, a sitemap index or a bare origin (path / and no query); a bare origin is resolved through robots.txt Sitemap: lines or /sitemap.xml."
  },
  "limit": {
   "type": "integer",
   "description": "Maximum number of URLs returned across every document read, 1 to 50000 (default 5000); past it the list is cut and reported as truncated."
  },
  "max_sitemaps": {
   "type": "integer",
   "description": "Maximum number of sitemap documents fetched, entry document included, 1 to 50 (default 10); children past it are reported as skipped with reason sitemap_limit."
  },
  "include_metadata": {
   "type": "boolean",
   "description": "When true each URL carries its lastmod, changefreq and priority; when false (default) those three fields are null."
  },
  "discover_from_robots": {
   "type": "boolean",
   "description": "Only for a bare origin: when true (default) the Sitemap: lines of /robots.txt are read first with /sitemap.xml as the fallback, when false /sitemap.xml is used directly."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "requested_url",
  "entry_url",
  "source_url",
  "discovery",
  "kind",
  "format",
  "urls",
  "count",
  "total_seen",
  "truncated",
  "stopped_reason",
  "sitemap_count",
  "sitemaps_visited",
  "sitemaps_skipped",
  "sitemaps_skipped_total",
  "sitemaps_skipped_by_reason",
  "invalid_loc_count",
  "invalid_lastmod_count",
  "robots_sitemaps",
  "fetched_at"
 ],
 "properties": {
  "kind": {
   "enum": [
    "urlset",
    "sitemapindex",
    "mixed"
   ],
   "type": "string"
  },
  "urls": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "loc",
     "lastmod",
     "changefreq",
     "priority"
    ],
    "properties": {
     "loc": {
      "type": "string"
     },
     "lastmod": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "priority": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ]
     },
     "changefreq": {
      "anyOf": [
       {
        "enum": [
         "always",
         "hourly",
         "daily",
         "weekly",
         "monthly",
         "yearly",
         "never"
        ],
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false
   }
  },
  "count": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "format": {
   "enum": [
    "xml",
    "text",
    "rss",
    "atom"
   ],
   "type": "string"
  },
  "discovery": {
   "enum": [
    "direct",
    "robots_txt",
    "well_known_path"
   ],
   "type": "string"
  },
  "entry_url": {
   "type": "string"
  },
  "truncated": {
   "type": "boolean"
  },
  "fetched_at": {
   "type": "string"
  },
  "source_url": {
   "type": "string"
  },
  "total_seen": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "requested_url": {
   "type": "string"
  },
  "sitemap_count": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "stopped_reason": {
   "anyOf": [
    {
     "enum": [
      "url_limit",
      "sitemap_limit",
      "time_budget",
      "depth_limit",
      "cross_host",
      "documents_skipped"
     ],
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "robots_sitemaps": {
   "anyOf": [
    {
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grist-tools-sitemap-parse-5a30f190/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grist.tools](https://www.zero.xyz/host/grist.tools/llms.txt)
