List, retrieve metadata for, and delete sitemaps from a Search Console property via the Sitemaps API

domain: developers.google.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with an OAuth2 token that includes the 'https://www.googleapis.com/auth/webmasters' scope (read-write)
  2. Call GET 'webmasters/v3/sites/{siteUrl}/sitemaps' to retrieve all submitted sitemaps and their metadata including 'lastSubmitted', 'isPending', and 'errors'
  3. Use GET 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}' to retrieve per-sitemap details including discovered URL counts and warnings
  4. Submit a new sitemap with PUT 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}' — the feedpath must be URL-encoded
  5. Delete stale or invalid sitemaps with DELETE 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}' to keep the index clean
  6. Automate a weekly GET-and-audit script to detect sitemaps whose 'errors' count has increased or whose 'lastDownloaded' field is stale

Known gotchas

Related routes

Submit a sitemap to Google Search Console via the API
developers.google.com · 4 steps · unrated
Build a programmatic sitemap generation pipeline for a large site with database-driven URL lists, sitemap index files, and scheduled updates
sitemaps.org · 6 steps · unrated
Build and manage XML sitemaps correctly including size limits, sitemap index files, and lastmod handling
developers.google.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans