{"openapi":"3.1.0","info":{"title":"SitemapKit API","version":"1.0.0","description":"Discover and extract URLs from any domain's sitemaps. Built for developers and LLM agents. Extractions cost 1 credit per 1,000 returned URLs (rounded up, minimum 1); discovery costs 1 credit. Monitoring shares the quota. Cached responses are free. Credits reset each UTC calendar month. Remaining credits may reduce the URL limit. Retry HTTP 503 CRAWL_CAPACITY_BUSY after Retry-After.","contact":{"url":"https://sitemapkit.com"},"license":{"name":"Terms of Service","url":"https://sitemapkit.com/terms"}},"servers":[{"url":"https://api.sitemapkit.com","description":"Production"},{"url":"https://sitemapkit.com","description":"Legacy (backwards-compatible)"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your SitemapKit API key (starts with sk_live)"}},"schemas":{"SitemapEntry":{"type":"object","properties":{"loc":{"type":"string","format":"uri"},"lastmod":{"type":["string","null"]},"changefreq":{"type":["string","null"]},"priority":{"type":["string","null"]}},"required":["loc"]}}},"paths":{"/api/v1/sitemap/discover":{"post":{"operationId":"discoverSitemaps","summary":"Discover sitemaps for a domain","description":"Finds all sitemaps for a given domain by checking robots.txt and probing 16 common locations, including compressed .xml.gz files, /sitemap.php, and news, image, and video sitemap filenames.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The domain URL to discover sitemaps for","example":"https://example.com"}},"required":["url"]}}}},"responses":{"200":{"description":"Sitemaps discovered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"domain":{"type":"string"},"sitemaps":{"type":"array","items":{"type":"string","format":"uri"}},"source":{"type":"array","items":{"type":"string","enum":["robots.txt","common-paths","sitemap-index"]}}}},"meta":{"type":"object","properties":{"responseTimeMs":{"type":"number"},"cached":{"type":"boolean"}}}}}}}},"401":{"description":"Unauthorized"},"429":{"description":"Rate limit exceeded"}}}},"/api/v1/sitemap/extract":{"post":{"operationId":"extractSitemap","summary":"Extract URLs from a sitemap","description":"Parses a sitemap XML file and extracts all URLs. Handles sitemap indexes recursively (up to depth 5).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Direct URL to a sitemap XML file","example":"https://example.com/sitemap.xml"},"maxUrls":{"type":"integer","minimum":1,"maximum":50000,"default":50000,"description":"Maximum number of URLs to return"}},"required":["url"]}}}},"responses":{"200":{"description":"URLs extracted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"sitemapUrl":{"type":"string"},"urls":{"type":"array","items":{"$ref":"#/components/schemas/SitemapEntry"}},"totalUrls":{"type":"integer"},"sitemapsProcessed":{"type":"integer"},"truncated":{"type":"boolean"}}}}}}}},"401":{"description":"Unauthorized"},"429":{"description":"Rate limit exceeded"}}}},"/api/v1/sitemap/full":{"post":{"operationId":"fullSitemapExtraction","summary":"Discover and extract all URLs from a domain","description":"Combines discover + extract: finds all sitemaps for a domain, then extracts and deduplicates all URLs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The domain URL to fully extract","example":"https://example.com"},"maxUrls":{"type":"integer","minimum":1,"maximum":50000,"default":50000,"description":"Maximum number of URLs to return"}},"required":["url"]}}}},"responses":{"200":{"description":"Full extraction completed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"domain":{"type":"string"},"sitemapsDiscovered":{"type":"integer"},"sitemapsProcessed":{"type":"integer"},"urls":{"type":"array","items":{"$ref":"#/components/schemas/SitemapEntry"}},"totalUrls":{"type":"integer"},"truncated":{"type":"boolean"},"sources":{"type":"array","items":{"type":"string"}}}}}}}}},"401":{"description":"Unauthorized"},"429":{"description":"Rate limit exceeded"}}}}}}