Skip to main content
Glama

List the URLs in a site's sitemaps

extract_sitemap_urls
Read-only

Extract every URL from a website's sitemaps or a direct sitemap XML, including lastmod, changefreq, and priority. Filter by regex or recent changes to map pages before crawling.

Instructions

Give a site (sitemaps are discovered through robots.txt) or a direct sitemap.xml URL and get every listed URL with lastmod, changefreq and priority. Follows sitemap indexes and reads .gz files. Filter with includePatterns/excludePatterns (regular expressions) and lastmodAfter or lastmodWithinDays. Use it to map a site's pages or find recently changed ones before crawling. Cost, charged to your own Apify account: $0.0002 per URL returned. Each call is capped at maxCostUsd (default $0.25). Defaults applied by this server when omitted: maxTotalUrls=500. Runs Apify Actor fecklesspleb/sitemap-extractor (https://apify.com/fecklesspleb/sitemap-extractor).

Input Schema

NameRequiredDescriptionDefault
startUrlsNoWebsites or sitemap URLs. A site (https://www.nasa.gov) to auto-discover its sitemaps, or a direct sitemap URL. Leave empty, or keep the sample NASA sitemap, for a default-mode run: up to 40 sample URLs from https://www.nasa.gov/wp-sitemap.xml at the normal per-URL price.
maxCostUsdNoMost this call may charge your Apify account, in US dollars. Default 0.25, maximum 5. Passed to Apify as maxTotalChargeUsd, the most Apify will charge for this run.
onlyNewUrlsNoOnly new URLs (monitoring). Return only URLs not seen in earlier runs with the same state store.
lastmodAfterNoChanged after (date). Keep URLs whose lastmod is on or after this date, YYYY-MM-DD. URLs with no lastmod are dropped unless you turn on Keep URLs without a lastmod.
maxTotalUrlsNoMax URLs in total. 0 = no limit.
maxUrlsPerSiteNoMax URLs per site. 0 = no limit.
stateStoreNameNoState store name. Named key-value store for monitoring. Use a different name per monitor.sitemap-extractor-state
excludePatternsNoExclude URL patterns (regex). Drop URLs matching any of these regular expressions.
includePatternsNoInclude URL patterns (regex). Keep URLs matching any of these regular expressions, for example /blog/.
keepUndatedUrlsNoKeep URLs without a lastmod. Off by default: when a date filter is set, URLs with no lastmod in the sitemap are dropped, since their age can't be checked. Turn this on to keep them. On sites whose sitemaps have no lastmod, that returns every URL (up to the limits), and each one is billed.
sitemapPatternsNoOnly follow child sitemaps matching (regex). For big sitemap indexes, follow only child sitemaps matching these, for example post-sitemap.
includeAlternatesNoInclude hreflang alternates. Add language alternate URLs listed in the sitemap.
lastmodWithinDaysNoChanged within last N days. Keep URLs whose lastmod is within the last N days. Overrides the date above. URLs with no lastmod are dropped unless you turn on Keep URLs without a lastmod.
maxSitemapsPerSiteNoMax sitemap files per site. Safety cap on sitemap files read per site.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds substantial context beyond the annotations: it discloses robots.txt discovery, sitemap-index traversal, .gz handling, the per-URL price ($0.0002) charged to the user's Apify account, the maxCostUsd cap, the maxTotalUrls=500 server default, and the backing Actor. The remaining gap is that it never mentions the default-mode run against the sample NASA sitemap when startUrls is omitted, which changes what an agent actually gets back.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is front-loaded with the input-to-output contract, and cost/defaults/actor details are packed into short trailing sentences. It is dense for one paragraph but nearly every clause carries operational value; only the explicit Actor URL is arguably redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter, zero-required tool with no output schema, the description covers the return fields, discovery mechanics, filtering, cost model, spend cap and key defaults, which is most of what an agent needs. It is incomplete only around the default startUrls sample run and around how results are returned (list, dataset, pagination).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter already carries documentation, including the lastmodWithinDays-overrides-lastmodAfter precedence. The description adds only light reinforcement (regex nature of the patterns, lastmod-based filtering); it introduces no meaning not already in the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Give a site ... or a direct sitemap.xml URL and get every listed URL with lastmod, changefreq and priority" names a specific verb, input form and returned fields. It is clearly distinguishable from sibling tools like extract_website_metadata or seo_audit_website, which operate on pages rather than sitemap discovery.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use it to map a site's pages or find recently changed ones before crawling" gives a concrete when-to-use, and the include/exclude plus lastmod filter framing implies when a broader crawl tool would be needed instead. It stops short of naming an alternative sibling tool explicitly, so no exclusion guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.