Validate XML Sitemap
web.validate_sitemap
Overview
You send us sitemap markup and we read it through a streaming parser with document type definitions and external entities switched off, so a hostile file cannot reach anything. We tell you whether it is well-formed, whether the root is a urlset or a sitemapindex, how many entries it holds, whether every loc is an absolute http or https address, whether each lastmod is a real date, whether the sitemaps.org namespace is in place, and whether the entry count stays under the limit. No listed address is contacted and a sitemapindex is never followed to its children.
A sitemap that is wrong does not announce itself — indexing just quietly suffers, and finding out from a search console weeks later is an expensive way to learn about a mistyped date.
Reliability
The same markup and the same options always give the same verdict, and nothing leaves the platform. The parser reads the document in a stream with document type definitions and external entities disabled, so a file that tries to pull in a local path or an internal address gets nowhere. Anything not well-formed collapses to one clean state — valid false, type unknown, urlCount 0, and a single PARSE_ERROR — so a hostile document cannot be told apart from a merely broken one, and partial structure seen before the failure is discarded rather than reported. An invalid file is a normal successful answer, not a failure: read valid and errors. Only bad input stops the call, and retrying it unchanged will not help — sending neither xml nor fileRef, a maxUrls or maxUncompressedBytes outside its range, a file reference we cannot read for you, or markup larger than maxUncompressedBytes.
Context footprint
The reply holds only the verdict and the messages, never the markup, so it stays small even for a 50 MB sitemap — unless thousands of entries each earn an error. A successful call costs 1 execution credit.
When to use it
Whenever you are about to publish a sitemap, or want to know why one misbehaves. Use seo.validate_sitemap when you also need image, video, news, or hreflang extension checks.
When you need the listed pages fetched, or the child sitemaps walked.
Runs on Java's built-in streaming XML reader, configured to trust nothing.
Scope
Non-goals
- Does not fetch any address the sitemap lists
- Does not follow a sitemapindex to the sitemaps it points at
- Does not submit the file to any search engine
- Does not validate against the official XSD, only the protocol rules named here
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 50 MiB | Skill and platform maximum |
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| xml | string | No | Bounded inline source. Required unless fileRef is provided. |
| fileRef | string | No | Tenant-scoped opaque file reference. Omit it when inline source is supplied. |
| validateUrls | boolean | No | Whether URL syntax and scheme are validated; omit it for true. |
| maxUrls | integer | No | URL validation cap; omit it for 50,000. |
| maxUncompressedBytes | integer | No | Uncompressed XML byte ceiling; omit it for the documented platform limit. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | Whether no error-severity sitemap defect exists. |
| type | string | Yes | Parsed sitemap document type. |
| urlCount | integer | Yes | Parsed URL-entry count. |
| errors | array | Yes | Bounded array of sitemap validation error strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items. |
| warnings | array | Yes | Bounded array of non-fatal sitemap warning strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"web.validate_sitemap","input":{"xml":"<?xml version=\"1.0\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"></urlset>"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("web.validate_sitemap", {"xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com/</loc></url></urlset>"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not fetch any address the sitemap lists
- Does not follow a sitemapindex to the sitemaps it points at
- Does not submit the file to any search engine
- Does not validate against the official XSD, only the protocol rules named here
- Fetching the pages or the child sitemaps the file points at
- Finding out which pages a site has
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "web.validate_sitemap",
"input": {
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com/</loc></url></urlset>"
}
}Examples
A clean sitemap with a single page
{
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com/</loc></url></urlset>"
}{
"warnings": [],
"urlCount": 1,
"valid": true,
"type": "urlset",
"errors": []
}Markup that stops short and will not parse
{
"xml": "<urlset><url><loc>oops"
}{
"warnings": [],
"urlCount": 0,
"valid": false,
"type": "unknown",
"errors": [
"PARSE_ERROR: sitemap XML is not well-formed."
]
}Recommended use cases
- Block a broken sitemap from shipping, before a search engine sees it
- Audit a sitemap you inherited and find out what is wrong with it
- Verify what web.generate_sitemap produced as part of your build
Avoid for
- Fetching the pages or the child sitemaps the file points at
- Finding out which pages a site has
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.