Use Case

Sitemap API for Site Migration

Build a complete URL inventory before migrating

Written by SitemapKit Editorial TeamUpdated: Jul 21, 2026

Before migrating a website, you need a complete list of all URLs to ensure nothing is lost. SitemapKit extracts every URL from sitemaps so you can plan redirects and verify post-migration coverage.

Expected outcome

A repeatable workflow for site migration that turns sitemap data into a structured result your team can validate and reuse.

Before you start

  • A SitemapKit API key stored in a server-side environment variable.
  • A target domain or sitemap URL and a clear success criterion for the site migration workflow.

Implementation workflow

  1. 1

    Define the workflow objective

    Start from this concrete goal: Build a complete URL inventory before migrating

  2. 2

    Request the sitemap data

    Use the implementation example below from server-side code and pass the target domain or sitemap URL required by the workflow.

  3. 3

    Validate and reuse the result

    Check the returned sitemap URLs and page records against the expected outcome for site migration before sending the data to the next system.

Why use SitemapKit?

  • Complete pre-migration URL inventory
  • Map old URLs to new URLs for redirect planning
  • Verify post-migration sitemap coverage
  • Detect missing pages after migration

Implementation example

# Pre-migration: get all current URLs
curl -X POST https://sitemapkit.com/api/v1/sitemap/full \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "old-site.com"}' \
  | jq -r '.urls[].loc' > old_urls.txt

# Post-migration: compare
curl -X POST https://sitemapkit.com/api/v1/sitemap/full \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "new-site.com"}' \
  | jq -r '.urls[].loc' > new_urls.txt

diff old_urls.txt new_urls.txt

Continue with SitemapKit

Start using SitemapKit for site migration

Free tier includes 100 API calls/month. No credit card required.

Other use cases