{"uid":"cap_i8iDdLl-nHxLUhjx8FSpZ","slug":"sitemap-discovery-url-extraction-api-fdf63d65","name":"Sitemap Discovery & URL Extraction API","description":"Sitemap to URL list: give a sitemap URL or just a domain (sitemaps found via robots.txt, then /sitemap.xml). Follows sitemap indexes (newest first, up to 10 child sitemaps), reads .xml, .xml.gz and text sitemaps, and returns every URL with lastmod, changefreq, priority, hreflang alternates, image and news counts. Filter by contains= and since= (lastmod).","url":"https://freetier-agent-api.pages.dev/api/sitemap?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"sitemap URL, or a site / domain to discover its sitemaps via robots.txt"},"limit":{"type":"string","description":"max URLs returned, 1-5000, default 1000"},"since":{"type":"string","description":"only URLs with lastmod at/after this ISO date"},"contains":{"type":"string","description":"only URLs containing this text, e.g. /blog/"},"max_sitemaps":{"type":"string","description":"sitemap files to read per call, 1-10, default 5"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"more":{"type":"object","properties":{"note":{"type":["string","null"]},"full_datasets":{"type":["string","null"]}}},"note":{"type":["string","null"]},"site":{"type":["string","null"]},"urls":{"type":"array","items":{"type":["object","null"]}},"filters":{"type":"object","properties":{"limit":{"type":["number","null"]},"since":{},"contains":{}}},"returned":{"type":["number","null"]},"found_via":{"type":["string","null"]},"truncated":{"type":["boolean","null"]},"urls_seen":{"type":["number","null"]},"fetched_at":{"type":["string","null"]},"newest_lastmod":{"type":["string","null"]},"sitemaps_fetched":{"type":"array","items":{"type":["object","null"]}},"sitemaps_not_fetched":{"type":["number","null"]},"sitemaps_not_fetched_sample":{"type":["array","null"]}}}}}}},"responseSchema":{"type":"json","example":{"more":{"note":"Full dataset downloads available by card","full_datasets":"https://freetier-kits-shop.fourthwall.com"},"note":"Child sitemaps of an index are read newest-lastmod first, up to max_sitemaps (default 5, max 10) per call. lastmod is what the site declares, normalised to I...","site":"https://cloudflare.com","urls":[{"loc":"https://www.cloudflare.com/","lastmod":"2026-10-26T00:00:00.000Z","priority":1,"alternates":[{"href":"https://www.cloudflare.com/","hreflang":"x-default"},{"href":"https://www.cloudflare.com/","hreflang":"en"}],"changefreq":"daily"},{"loc":"https://www.cloudflare.com/plans","lastmod":"2026-10-26T00:00:00.000Z","priority":0.9,"alternates":[{"href":"https://www.cloudflare.com/plans","hreflang":"x-default"},{"href":"https://www.cloudflare.com/plans","hreflang":"en"}],"changefreq":"weekly"}],"filters":{"limit":2,"since":null,"contains":null},"returned":2,"found_via":"robots.txt","truncated":true,"urls_seen":1013,"fetched_at":"2026-10-26T12:40:41.543Z","newest_lastmod":"2026-10-26T00:00:00.000Z","sitemaps_fetched":[{"url":"https://www.cloudflare.com/sitemap.xml","type":"urlset","urls":1013,"status":200}],"sitemaps_not_fetched":0,"sitemaps_not_fetched_sample":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_I3b7tQWdMoytiZt2ok-un","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches and parses XML sitemaps for a given site or sitemap URL, returning a structured list of URLs with metadata like lastmod, priority, and alternates.","exampleAgentPrompt":"Can you pull all the URLs from cloudflare.com's sitemap, only show me ones updated since 2025-01-01, and limit the results to 500?","exampleUseCases":[{"title":"RAG pipeline page discovery","prompt":"I'm building a RAG system over the Stripe docs — can you fetch all URLs from stripe.com's sitemap so I know which pages to ingest?"},{"title":"Recent content monitoring","prompt":"Pull all URLs from shopify.com's sitemap that have been updated since 2025-06-01, up to 200 results, so I can check what's changed recently."},{"title":"Blog post inventory extraction","prompt":"Get me all the URLs from techcrunch.com's sitemap that contain /blog/ in the path, limit to 100, so I can build a list of their articles."}],"resultDescription":"Returns a JSON object containing a list of URLs with their lastmod date, priority, changefreq, and alternate hreflang links; metadata about how many URLs were found, returned, and whether results were truncated; which sitemaps were fetched and their types; how the sitemap was discovered (direct or via robots.txt); and optional notes about full dataset availability.","failureModes":["Invalid or unreachable sitemap URL returns an error or empty URL list","Site has no sitemap.xml and robots.txt does not reference one — found_via may be null","Sitemap index with many children: only up to max_sitemaps (default 5) are fetched, remainder counted in sitemaps_not_fetched","Malformed XML sitemap may result in partial parsing","limit param out of range (must be 1–5000) causes validation error","since date in wrong format (non-ISO) may be ignored or cause error","Payment failure via x402 (insufficient USDC balance or wrong network) blocks the call"],"whenToPreferThis":"Choose this endpoint when you need to programmatically discover all indexed URLs on a website without crawling every page manually — especially useful for RAG ingestion pipelines, SEO audits, content monitoring, or competitive research. It auto-discovers sitemaps via robots.txt, handles sitemap index files with multiple children, and supports filtering by date or URL pattern. Prefer it over raw HTTP crawling when you want structured, metadata-rich URL lists quickly and cheaply at $0.003/call with no API key needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T06:35:58.156Z","isFirstParty":false,"canonicalSlug":"sitemap-discovery-url-extraction-api-fdf63d65"}