How to Extract URLs from Sitemaps
(Last Update: 09/05/2023)
If you are wondering how to extract sitemap URLs really fast you are in the right place!
There are different options out there and I selected the best 5 methods:
- Google Sheets
- Screaming Frog
- Python (Google Colab)
- Sitemap extractor
Let’s jump right into it!
1) Extract URLs From XML Sitemaps Online In Google Sheets
I found a simple sitemap extractor script that will extract the list of URLs from the Sitemap in Google Sheets in less than 5 seconds, pretty impressive, isn’t it? Give it a try.
Here the Google Sheet that act as a sitemap url extractor:
Make a copy of it
Add the sitemap URL in the cell B2 (example: https://www.google.com/sheets/sitemaps.xml)
The list of URLs will appear automatically in column D
Done! You have just converted your sitemap to a URL list.
2) Extract URLs From XML Sitemaps with Screaming Frog
For this second method you need to install the SEO software Screaming Frog to convert any sitemap xml to a url list. This method works pretty well also for sitemap index file that are the ones that contain list of sub-sitemaps.
Here the steps:
Open Screaming Frog SEO Spider Tool
Upload > Download Sitemap > Add Sitemap xml URL
3) Extract URLs From XML Sitemaps with Python
Open Google Colab
Enter the sitemap.xml URL
Click on the play button on the left
Navigate to the folder and you will find the url.txt file that can be easily downloaded
4) Extract URLs From XML Sitemaps with command line tools
Open your terminal
Enter this command (remember to replace the sitemap URL)-> curl -s https://www.google.com/sheets/sitemaps.xml
5) Sitemap URL Extractor tool
This option is really handy and allows you to convert sitemap.xml to url list in seconds thanks to the clean and user friendly UI.
Open the sitemap URL extractor
Add the XML sitemap URL/sitemaps.xml
Export the data
I hope you find it useful.
If you are aware of other options, just let me know and I will add them to the list.
If you want to optimize or analyzing your Sitemap XML File, you can refer to my article Maximizing Your Website's SEO Potential: A Comprehensive Guide to Analyzing Your Sitemap XML File.