ParseSitemapOptions
Index
Properties
optionalemitNestedSitemaps
optionalenqueueStrategy
Keep only sitemap-derived URLs (nested <sitemap> and <url> entries) matching this strategy
relative to the parent sitemap URL; non-http(s) schemes are always dropped. Skipped for raw string
sources (no parent URL). Pass 'all' to disable host filtering.
optionalhttpClient
Custom HTTP client to be used for fetching sitemaps.
optionallogger
Optional logger for reporting warnings during sitemap parsing.
optionalmaxDepth
Maximum depth of nested sitemaps to follow.
optionalnestedSitemapFilter
Optional filter for nested sitemap URLs discovered in sitemap index files.
Called with the URL of each child sitemap before it is fetched.
Return true to include the sitemap, false to skip it.
If not provided, all nested sitemaps are followed.
Type declaration
Parameters
sitemapUrl: string
Returns boolean
optionalreportNetworkErrors
If true, the parser will log a warning if it fails to fetch a sitemap due to a network error
optionalsitemapRetries
Number of retries for fetching sitemaps. The counter resets for each nested sitemap.
optionaltimeoutMillis
Timeout settings for network requests when fetching sitemaps. By default this is 30000 milliseconds (30 seconds).
If set to
true, elements referring to other sitemaps will be emitted as special objects withoriginSitemapUrlset tonull.