Sitemap
XML Sitemap
GET
/api/v1/content/sitemap.xmlOverview
Returns an auto-generated XML sitemap following the sitemaps.org schema. Includes all published pages, posts, and docs for the resolved client site. Use this for search engine submission.
JSON Sitemap
GET
/api/v1/content/sitemapOverview
Returns the same sitemap data in JSON format. Useful for programmatic consumption, custom rendering, or frontend-driven sitemap pages.
Authentication
info
No authentication required - Client is resolved from the X-Content-Domain header, which the Cloudflare Worker sets automatically based on the request domain.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-Content-Domain | string | Yes | The domain used to resolve the client tenant. Automatically set by the CF Worker; set manually for external frontend integrations. |
Response (JSON)
entriesarrayArray of sitemap entry objects
entries[].locstringFull URL of the page
entries[].lastmodstringISO 8601 date of last modification
entries[].changefreqstringSuggested change frequency: always, hourly, daily, weekly, monthly, yearly, never
entries[].prioritynumberPriority relative to other URLs on the site (0.0 to 1.0)
Example Request (XML)
- cURL
- Python
- JavaScript
curl -s "https://spideriq.ai/api/v1/content/sitemap.xml" \
-H "X-Content-Domain: your-domain.com"
import requests
resp = requests.get(
"https://spideriq.ai/api/v1/content/sitemap.xml",
headers={"X-Content-Domain": "your-domain.com"}
)
print(resp.text) # XML content
const resp = await fetch(
"https://spideriq.ai/api/v1/content/sitemap.xml",
{ headers: { "X-Content-Domain": "your-domain.com" } }
);
const xml = await resp.text();
console.log(xml);
Example Response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://your-domain.com/</loc>
<lastmod>2026-04-01</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://your-domain.com/pricing</loc>
<lastmod>2026-04-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://your-domain.com/blog/how-to-scrape-google-maps</loc>
<lastmod>2026-03-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://your-domain.com/docs/getting-started/quickstart</loc>
<lastmod>2026-03-28</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
</urlset>
Example Request (JSON)
- cURL
- Python
- JavaScript
curl -s "https://spideriq.ai/api/v1/content/sitemap" \
-H "X-Content-Domain: your-domain.com"
import requests
resp = requests.get(
"https://spideriq.ai/api/v1/content/sitemap",
headers={"X-Content-Domain": "your-domain.com"}
)
data = resp.json()
for entry in data["entries"]:
print(f"{entry['loc']} (priority: {entry['priority']})")
const resp = await fetch(
"https://spideriq.ai/api/v1/content/sitemap",
{ headers: { "X-Content-Domain": "your-domain.com" } }
);
const data = await resp.json();
data.entries.forEach(entry => {
console.log(`${entry.loc} (priority: ${entry.priority})`);
});
Example Response (JSON)
{
"entries": [
{
"loc": "https://your-domain.com/",
"lastmod": "2026-04-01",
"changefreq": "weekly",
"priority": 1.0
},
{
"loc": "https://your-domain.com/pricing",
"lastmod": "2026-04-01",
"changefreq": "monthly",
"priority": 0.8
},
{
"loc": "https://your-domain.com/blog/how-to-scrape-google-maps",
"lastmod": "2026-03-15",
"changefreq": "monthly",
"priority": 0.6
},
{
"loc": "https://your-domain.com/docs/getting-started/quickstart",
"lastmod": "2026-03-28",
"changefreq": "weekly",
"priority": 0.7
}
]
}
Status Codes
| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Sitemap returned successfully |
Notes
- The XML sitemap uses
Content-Type: application/xml - The JSON sitemap uses
Content-Type: application/json - Pages, posts, and docs are all included automatically when published
- Priority values: pages (
0.8), posts (0.6), docs (0.7), homepage (1.0) lastmodis derived from theupdated_atorpublished_atfield of each content item