# XML sitemap generator

Build a valid XML sitemap from a list of page addresses, with optional last-modified date, frequency and priority.

- Endpoint: `POST https://setget.net/v1/tools/sitemap-generate` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `sitemap-generate`
- Page: https://setget.net/tools/sitemap-generate

## Inputs

- `urls` (required, json): The pages: a list of full addresses, or of objects {"loc": ..., "lastmod": ..., "changefreq": ..., "priority": ...}. Plain text with one address per line also works.
- `lastmod` (optional, string): Last-modified date (2026-03-14) for pages that do not give their own.
- `changefreq` (optional, string, one of `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, `never`): How often pages change, for pages that do not give their own.
- `priority` (optional, number, range 0..1): Priority from 0.0 to 1.0, for pages that do not give their own.

## Example 1

```json
{"input":{"urls":["https://example.com/","https://example.com/search?q=a&page=2"],"lastmod":"2026-03-14"}}
```

Result:

```json
{"text":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url>\n    <loc>https://example.com/</loc>\n    <lastmod>2026-03-14</lastmod>\n  </url>\n  <url>\n    <loc>https://example.com/search?q=a&amp;page=2</loc>\n    <lastmod>2026-03-14</lastmod>\n  </url>\n</urlset>\n","urls":2,"duplicates_removed":0}
```

## Example 2: Per-page details

```json
{"input":{"urls":[{"loc":"https://example.com/","priority":1.0,"changefreq":"daily"},{"loc":"https://example.com/blog/","lastmod":"2026-02-01"}]}}
```

**How many pages can a sitemap hold?** The standard allows 50,000 per file. This tool builds up to 5,000 at a time.

**Do search engines use changefreq and priority?** Google ignores both and uses lastmod only when it is accurate. They are optional, so leave them out unless another system needs them.
