Sitemap Health Lab
Fetch a sitemap URL, sample <loc> links, and check status codes with a rate-limited delay between requests.
Run this experiment yourself
Demos are not embedded on this site. Deploy a standalone copy on Vercel or run the experiment app locally.
Local development
cd apps/experiments/sitemap-health-lab pnpm install pnpm dev
Then open http://localhost:3010.
This is an experimental demo. Use it as a starting point for your own projects.
Sitemap Health Lab fetches a sitemap XML, extracts up to N <loc> URLs, then checks each status with a minimum delay between requests. No AI provider required.
Features
- Sitemap loc extraction – http(s) only
- Rate-limited checks –
MIN_DELAY_MSbetween link fetches - Summary stats – ok / failed / avgMs
API Reference
POST /api/health
{ "sitemapUrl": "https://vercel.com/sitemap.xml", "sample": 8 }| Status | Cause |
|---|---|
400 | Validation / upstream / empty input |
Implementation Details
Pure helpers in logic.ts
Caps, parsers, and clamps live in the experiment folder and are covered by logic.test.ts.
Route Handler
POST /api/health validates input, applies fetch/parse limits where relevant, then returns JSON.
Use Cases
- Learn composition patterns for this lab’s stack.
- Prototype before wiring production auth and quotas.
- Deploy the standalone app as a reference implementation.
Limitations
- Demo-scale caps on input size and output counts.
- No auth / rate limits on public deploys.
- Treat outputs as drafts, not production truth.
Use in your project
Copy the Route Handler and logic.ts helpers from apps/experiments/sitemap-health-lab/. Wire your own persistence and auth as needed.
Deployment
Local Development
cd apps/experiments/sitemap-health-lab
pnpm install
pnpm devConfiguration
| Variable | Required | Purpose |
|---|---|---|
NEXT_PUBLIC_SITE_URL | No | Optional public site URL |
Vercel / Next.js Features Used
- Route Handlers
- Zod