Extract URLs from a sitemap.xml

View as Markdown

Fetches a website’s sitemap.xml, parses it, and returns the list of URLs inside. Use this before calling POST /knowledgebase/{id}/scrape-urls to let the customer pick which URLs they actually want indexed.

Returns 422 if the URL doesn’t return a fetchable sitemap or if the XML is malformed.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Request

This endpoint expects an object.
siteUrlstringRequiredformat: "uri"

URL of the sitemap.xml file (or a homepage that links to one).

knowledgeBaseIdstringRequired

Target knowledge base ID — used for ownership validation only. The endpoint doesn’t write any URLs at this stage.

Response

Extracted URLs, ready to be filtered + passed to /scrape-urls.

statusboolean
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error