Fetch API
Fetch a Sitemap
GET
Fetch a Sitemap for your project. Frontic resolves the URL against your domain mappings to determine the scope, region, and locale, and returns a sitemap in the correct language. Frontic will split up sitemaps, if they are over 50 MB or contain more than 50,000 URLs. The endpoint will then return a sitemap index with links to deeper sitemaps.Documentation Index
Fetch the complete documentation index at: https://docs.frontic.com/llms.txt
Use this file to discover all available pages before exploring further.
Access Convention
Frontic expects your frontend to have a global route like/sitemap{index}.xml with an optional index (so both /sitemap.xml and /sitemap23.xml match), since Frontic links to nested sitemaps with your configured Frontic project domains (e.g. demo-shop.com/uk/sitemap1.xml).
You can of course include the Frontic sitemap in your global sitemap along with your other (non-Frontic) URLs.
Path Parameters
Your project’s Fetch token, embedded in the subdomain.
The index of a nested sitemap (only if the sitemap was split up).
Headers
See Headers on the overview for the full set. Thefs-domain header indicates the requested sitemap domain. The sitemap endpoint also uses fs-context, fs-version, and fs-secret (only when the project has fetch keys configured).
Response
Returns the Sitemap XML, or 404 if there is no sitemap for your project.Status codes
| Code | When |
|---|---|
200 | Your project’s sitemap |
401 | fs-secret missing or wrong (only when the project has fetch keys configured) |
403 | Project’s plan limit for Fetch API requests exceeded |
404 | Your Project has no sitemaps |