Overview
The Get URLs from Sitemap block extracts URLs from a website’s XML sitemap. Use it to discover all pages on a website, filter for specific sections, and feed URLs into other blocks for bulk scraping, analysis, or content processing.Configuration
Sitemap URL
Enter the URL of the sitemap to parse. This is typically located at/sitemap.xml on most websites.
Common sitemap locations:
https://example.com/sitemap.xmlhttps://example.com/sitemap_index.xmlhttps://example.com/post-sitemap.xml
Maximum Number of Links
Limit how many URLs are returned from the sitemap.- Default: 100 URLs
- Minimum: 1 URL
- Testing your workflow before running at scale
- Processing only a sample of pages
- Staying within credit budgets for subsequent scraping
Include Only Links That Contain
Filter URLs to include only those matching specific patterns. Enter one or more text patterns separated by commas. How it works:- URLs must contain at least one of the specified patterns (OR logic)
- Matching is case-sensitive
- Partial matches work (e.g.,
/blog/matches/blog/post-title)
This field supports placeholders:
Exclude Links That Contain
Filter out URLs containing specific patterns. Enter one or more text patterns separated by commas. How it works:- URLs matching any pattern are removed (OR logic)
- Applied after include filter
- Useful for removing unwanted page types
Output
The block returns an array of URL strings extracted from the sitemap.Output Example
Accessing URLs
Get all URLs:Combining Filters
Include and exclude filters work together:- First, include filter is applied (if set)
- Then, exclude filter removes unwanted URLs
- Finally, the limit is applied
- Sitemap:
https://example.com/sitemap.xml - Include:
/blog/ - Exclude:
/tag/, /author/ - Limit: 50
Best Practices
- Start with a small limit when testing workflows
- Use include filters to target specific content types
- Exclude pagination, tags, and archives for cleaner results
- Check the sitemap structure first to understand URL patterns
- Combine with Loop and Web Scrape blocks for bulk content extraction
- Some sites have multiple sitemaps; check the sitemap index
Common Use Cases
Example Workflow: Bulk Content Analysis
Analyze all blog posts from a competitor:-
Get URLs from Sitemap Block:
- Sitemap URL:
https://competitor.com/sitemap.xml - Include:
/blog/ - Exclude:
/tag/, /category/, /author/ - Limit: 100
- Sitemap URL:
- Loop Block: Iterate through each URL
-
Web Scrape Block:
- URL:
{{current}} - Format: Markdown
- Only Main Content: On
- URL:
- LLM Block: Analyze content themes and structure
- Google Sheets Block: Store analysis results
Example Workflow: Site Inventory
Create a complete inventory of a website’s pages:-
Get URLs from Sitemap Block:
- Sitemap URL:
https://yoursite.com/sitemap.xml - Limit: 500
- Sitemap URL:
- Loop Block: Process each URL
-
Web Scrape Block:
- URL:
{{current}} - Format: Markdown
- Include Metadata: On
- URL:
- Google Sheets Block: Append URL, title, and description
Troubleshooting
What’s Next
Now that you understand the Get URLs from Sitemap block:- Learn about Web Scrape Block to extract content from discovered URLs
- See Loop Block to process multiple URLs
- Explore Google Sheets Block to store URL lists
- Check Call API Block to check URL status codes