← All integrations
Languages

SitemapKit + Python

Use the SitemapKit API with Python's requests library to discover and extract sitemaps. Perfect for SEO scripts, data pipelines, and AI training data collection.

Quick Start

import requests

API_KEY = "YOUR_API_KEY"
BASE = "https://sitemapkit.com/api/v1/sitemap"

# Discover sitemaps
resp = requests.post(f"{BASE}/discover", json={"url": "example.com"}, headers={
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
})
sitemaps = resp.json()["sitemaps"]
print(f"Found {len(sitemaps)} sitemaps")

# Extract all URLs
resp = requests.post(f"{BASE}/full", json={"url": "example.com"}, headers={
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
})
data = resp.json()
print(f"Extracted {len(data['urls'])} URLs")

# Filter by pattern
blog_urls = [u["loc"] for u in data["urls"] if "/blog/" in u["loc"]]

How it works

  1. Get your API key — Sign up for a free SitemapKit account to get your sk_live_* API key.
  2. Call the API — Use the /api/v1/sitemap/full endpoint to discover and extract all sitemaps from a domain in one call.
  3. Process the data — The response includes structured JSON with all URLs, lastmod dates, and sitemap metadata.

API Endpoints

  • POST /api/v1/sitemap/discover — Find all sitemaps on a domain
  • POST /api/v1/sitemap/extract — Parse a sitemap URL and extract all URLs
  • POST /api/v1/sitemap/full — Discover + extract in one call (recommended)

Start using SitemapKit with Python

100 free API calls/month. No credit card required.

More Languages integrations