← All integrations
AI Frameworks

SitemapKit + OpenAI Agents SDK

Build OpenAI agents that can discover and analyze website sitemaps. Give your agent the ability to map out any domain's content structure.

Quick Start

from agents import Agent, Runner, function_tool
import requests

@function_tool
def discover_sitemaps(domain: str) -> dict:
    """Discover all XML sitemaps on a domain."""
    resp = requests.post(
        "https://sitemapkit.com/api/v1/sitemap/full",
        headers={"x-api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
        json={"url": domain}
    )
    data = resp.json()
    return {
        "sitemaps_found": len(data["sitemaps"]),
        "total_urls": len(data["urls"]),
        "sample_urls": [u["loc"] for u in data["urls"][:10]],
    }

agent = Agent(
    name="SEO Analyst",
    instructions="You analyze websites. Use discover_sitemaps to map out a domain.",
    tools=[discover_sitemaps],
)

result = Runner.run_sync(agent, "Analyze the sitemap of vercel.com")
print(result.final_output)

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 OpenAI Agents SDK

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

More AI Frameworks integrations