getUrlsFromSitemap

Overview

Get the list of URLs in a sitemap or a sitemap index. If you pass as an argument a sitemap index the function will extract the sitemap urls and request them again in order to return the list of URLs.

Video Example

Arguments

  • sitemapUrl: The URL of the sitemap or a sitemap index

Expected Output

  • Array: The list of URLs

Text example

getUrlsFromSitemap("https://seohacks.es/post-sitemap.xml")

// https://seohacks.es
// https://seohacks.es/200-factores-seo-que-posicionan-en-google/
// https://seohacks.es/analizando-tecnica-seo-piel-de-cordero/
// https://seohacks.es/credibilidad-vs-autoridad-eat/
// https://seohacks.es/el-dia-a-dia-de-un-seo-en-gifs/
// https://seohacks.es/que-es-thin-content/
// https://seohacks.es/creando-blog-seo-wordpress/
// https://seohacks.es/guia-quality-raters-google/
// https://seohacks.es/contenido-latent-semantic-index/
// https://seohacks.es/relacion-semantica-inversa/
// https://seohacks.es/analisis-pagina-web-seo-on-page/
// https://seohacks.es/imagenes-originales/
// https://seohacks.es/cloaking/
// https://seohacks.es/link-building-alex-navarro/
// https://seohacks.es/ddos/
// https://seohacks.es/https-gratis/
// https://seohacks.es/accesibilidad-web-seo-parte-1/
// https://seohacks.es/crawl-budget-optimizar-http-304/

getUrlsFromSitemap("https://seohacks.es/sitemap_index.xml")
// https://seohacks.es
// https://seohacks.es/200-factores-seo-que-posicionan-en-google/
// https://seohacks.es/analizando-tecnica-seo-piel-de-cordero/
// https://seohacks.es/credibilidad-vs-autoridad-eat/
// https://seohacks.es/el-dia-a-dia-de-un-seo-en-gifs/
// https://seohacks.es/que-es-thin-content/
// https://seohacks.es/creando-blog-seo-wordpress/
// ...

Use cases

  • Import all URL from a site to Sheets

  • Healthy SEO checks to do directly in Sheets

Last updated