:// PLAINPORT
MCP · parse_sitemap

Parse sitemap

Fetches one uncompressed XML sitemap and returns either URL entries or child sitemap references. Use this for site structure discovery. Sitemap indexes are not recursively expanded; call this tool on each child explicitly. Limit: 8 s, 5 redirects, 768 KiB, 1,000 entries.

When to use it

Fetches one uncompressed XML sitemap and returns either URL entries or child sitemap references. Use this for site structure discovery. Sitemap indexes are not recursively expanded; call this tool on each child explicitly.

Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "minLength": 8,
      "maxLength": 2048,
      "description": "Absolute public HTTP or HTTPS URL without embedded credentials."
    },
    "max_entries": {
      "default": 250,
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  },
  "required": [
    "url",
    "max_entries"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "const": true
    },
    "data": {
      "type": "object",
      "properties": {
        "kind": {
          "enum": [
            "urlset",
            "index"
          ]
        },
        "sitemap_url": {
          "type": "string"
        },
        "entries": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "truncated": {
          "type": "boolean"
        }
      },
      "required": [
        "kind",
        "sitemap_url",
        "entries",
        "truncated"
      ]
    },
    "meta": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        },
        "duration_ms": {
          "type": "integer"
        },
        "limits": {
          "type": "object"
        }
      },
      "required": [
        "request_id",
        "duration_ms"
      ]
    }
  },
  "required": [
    "ok",
    "data",
    "meta"
  ],
  "additionalProperties": false
}

REST example

curl -X POST https://plainport.exportitnow.workers.dev/api/v1/parse-sitemap \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com/sitemap.xml"}'

Example result

{
  "ok": true,
  "data": {
    "kind": "urlset",
    "entries": [
      {
        "url": "https://example.com/docs"
      }
    ],
    "truncated": false
  },
  "meta": {
    "request_id": "018f…",
    "duration_ms": 12
  }
}

Limit

8 s, 5 redirects, 768 KiB, 1,000 entries