Languages

SitemapKit + cURL

Test the SitemapKit API directly from your terminal with cURL. Perfect for quick tests, debugging, and shell scripts.

Written by SitemapKit Editorial TeamUpdated: Jul 21, 2026

Prerequisites

  • A SitemapKit API key kept outside browser and mobile client bundles.
  • A server-side cURL environment that can make HTTPS requests and parse JSON responses.

How to connect SitemapKit and cURL

  1. 1

    Store the API key for cURL

    Use the secret or environment-variable mechanism provided by your languages setup. Never expose the key in client-side code.

  2. 2

    Call the SitemapKit full endpoint

    Adapt the request shown in the cURL example below and send the target domain from a trusted server process.

  3. 3

    Map the response in cURL

    Handle discovered sitemap files, extracted URLs, lastmod values, truncation flags, and API errors before passing the result downstream.

Quick start

# Discover sitemaps on a domain
curl -X POST https://sitemapkit.com/api/v1/sitemap/discover \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "example.com"}'

# Extract URLs from a specific sitemap
curl -X POST https://sitemapkit.com/api/v1/sitemap/extract \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "https://example.com/sitemap.xml"}'

# Full discovery + extraction in one call
curl -X POST https://sitemapkit.com/api/v1/sitemap/full \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "example.com"}' | jq '.urls | length'

Continue with SitemapKit

Start using SitemapKit with cURL

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

More Languages integrations