Sitemap to URL list

Every URL a site lists in its sitemaps (indexes, .gz, text) with lastmod, from a sitemap URL or just a domain.

Sitemap to URL list: give a sitemap URL or just a domain (sitemaps found via robots.txt, then /sitemap.xml). Follows sitemap indexes (newest first, up to 10 child sitemaps), reads .xml, .xml.gz and text sitemaps, and returns every URL with lastmod, changefreq, priority, hreflang alternates, image and news counts. Filter by contains= and since= (lastmod).

$0.003 per call in USDC on Base via x402, or pay by card with prepaid credits (3 credits) · 1 free call per caller · no signup · Listed on PayAPI Market (this route is not PayAPI-verified yet; 14 other routes are, each by one settled test payment)

GET https://freetier-agent-api.pages.dev/api/sitemap

When to use it

Use sitemap to list all pages a site declares (with lastmod) before crawling or to find recently changed pages. Use robots-check for crawl permission of one URL.

Parameters

NameTypeDescription
url requiredstringsitemap URL, or a site / domain to discover its sitemaps via robots.txt
limitstringmax URLs returned, 1-5000, default 1000
containsstringonly URLs containing this text, e.g. /blog/
sincestringonly URLs with lastmod at/after this ISO date
max_sitemapsstringsitemap files to read per call, 1-10, default 5

Example output (real response, trimmed)

{
 "site": "https://cloudflare.com",
 "found_via": "robots.txt",
 "sitemaps_fetched": [
  {
   "url": "https://www.cloudflare.com/sitemap.xml",
   "status": 200,
   "type": "urlset",
   "urls": 1013
  }
 ],
 "sitemaps_not_fetched": 0,
 "sitemaps_not_fetched_sample": [],
 "urls_seen": 1013,
 "returned": 2,
 "truncated": true,
 "filters": {
  "contains": null,
  "since": null,
  "limit": 2
 },
 "newest_lastmod": "2026-10-26T00:00:00.000Z",
 "urls": [
  {
   "loc": "https://www.cloudflare.com/",
   "lastmod": "2026-10-26T00:00:00.000Z",
   "changefreq": "daily",
   "priority": 1,
   "alternates": [
    {
     "hreflang": "x-default",
     "href": "https://www.cloudflare.com/"
    },
    {
     "hreflang": "en",
     "href": "https://www.cloudflare.com/"
    }
   ]
  },
  {
   "loc": "https://www.cloudflare.com/plans",
   "lastmod": "2026-10-26T00:00:00.000Z",
   "changefreq": "weekly",
   "priority": 0.9,
   "alternates": [
    {
     "hreflang": "x-default",
     "href": "https://www.cloudflare.com/plans"
    },
    {
     "hreflang": "en",
     "href": "https://www.cloudflare.com/plans"
    }
   ]
  }
 ],
 "fetched_at": "2026-10-26T12:40:41.543Z",
 "note": "Child sitemaps of an index are read newest-lastmod first, up to max_sitemaps (default 5, max 10) per call. lastmod is what the site declares, normalised to I...",
 "more": {
  "full_datasets": "https://freetier-kits-shop.fourthwall.com",
  "note": "Full dataset downloads available by card"
 }
}

Try it

Free call (no wallet needed)

curl -s "https://freetier-agent-api.pages.dev/api/sitemap?url=https%3A%2F%2Fwww.sitemaps.org%2Fsitemap.xml&limit=50"

Pay by card (no wallet): prepaid credits

Buy a credit pack on Gumroad (1,000 credits $3), then send your license key. The X-Credits-Remaining response header shows your balance; failed calls are not charged.

curl -s "https://freetier-agent-api.pages.dev/api/sitemap?url=https%3A%2F%2Fwww.sitemaps.org%2Fsitemap.xml&limit=50" \
  -H 'X-License-Key: YOUR-LICENSE-KEY'

JavaScript / TypeScript (@x402/fetch)

// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY); // wallet with USDC on Base
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment("https://freetier-agent-api.pages.dev/api/sitemap?url=https%3A%2F%2Fwww.sitemaps.org%2Fsitemap.xml&limit=50");
console.log(await res.json());

Python (x402 + httpx)

# pip install "x402[httpx,evm]" eth-account
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    client = x402Client()
    register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
    async with x402HttpxClient(client) as http:
        r = await http.get("https://freetier-agent-api.pages.dev/api/sitemap?url=https%3A%2F%2Fwww.sitemaps.org%2Fsitemap.xml&limit=50")
        print(r.json())

asyncio.run(main())

A bare request without parameters returns the HTTP 402 payment challenge (x402 v2 in the PAYMENT-REQUIRED header, v1 in the body). Invalid input gets a 400 before any payment.

Billing policy

Failed calls are never charged. Failed calls are never charged: the payment is verified first, the request runs, and the payment is settled only if it succeeded. Errors (4xx/5xx) are not settled, and invalid input is rejected before any payment or free call.

Uptime and latency

Independent monitoring of this endpoint: 402index service page (health, 30-day uptime, p50 latency).

Also available as


Agent Extraction API by FreeTier Kits · Terms · llms.txt · /.well-known/x402 · MCP: https://freetier-agent-api.pages.dev/mcp · Contact: tec@mail.grokbot.com
This site and its texts were written with AI assistance and reviewed for accuracy; example outputs are real responses from the API.