Skip to main content
This notebook goes over how to use the SitemapLoader class to load sitemaps into Documents.

Setup

First, we need to install the langchain package:
npm
The URL passed in must either contain the .xml path to the sitemap, or a default /sitemap.xml will be appended to the URL.
Or, if you want to only load the sitemap and not the contents of each page from the sitemap, you can use the parseSitemap method:

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.