<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: reflexdev</title>
    <description>The latest articles on DEV Community by reflexdev (@reflexdev).</description>
    <link>https://dev.to/reflexdev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4219917%2F8c800df9-5b1f-45b7-ae6d-117bf57d7292.png</url>
      <title>DEV Community: reflexdev</title>
      <link>https://dev.to/reflexdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/reflexdev"/>
    <language>en</language>
    <item>
      <title>How to check a Shopify sitemap for broken links and 404s</title>
      <dc:creator>reflexdev</dc:creator>
      <pubDate>Thu, 12 Nov 2026 03:17:36 +0000</pubDate>
      <link>https://dev.to/reflexdev/how-to-check-a-shopify-sitemap-for-broken-links-and-404s-46f2</link>
      <guid>https://dev.to/reflexdev/how-to-check-a-shopify-sitemap-for-broken-links-and-404s-46f2</guid>
      <description>&lt;p&gt;Shopify builds a sitemap for every store at &lt;code&gt;/sitemap.xml&lt;/code&gt; and keeps it up to date. You can't edit the file. That is fine until a product is deleted, a collection is unpublished, or a link in a product description still points at a page that no longer exists.&lt;/p&gt;

&lt;p&gt;Shopify does not create a redirect when you delete a product. The old URL starts returning 404 until you add one yourself, under Content &amp;gt; Menus &amp;gt; View URL redirects in the admin. Google Search Console will show some of those 404s, but only after Google happens to recrawl them.&lt;/p&gt;

&lt;p&gt;This post covers three ways to check the sitemap yourself, including the links on those pages, and what the output looks like from a real run.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Shopify actually puts in /sitemap.xml
&lt;/h2&gt;

&lt;p&gt;Open &lt;code&gt;https://your-store.com/sitemap.xml&lt;/code&gt; and you will not see a list of products. You will see a sitemap index: a list of other sitemaps. On Shopify's official Dawn theme demo store, which I used for the run below, the index had 11 children:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sitemap_products_1.xml&lt;/code&gt;, &lt;code&gt;sitemap_pages_1.xml&lt;/code&gt;, &lt;code&gt;sitemap_collections_1.xml&lt;/code&gt;, &lt;code&gt;sitemap_blogs_1.xml&lt;/code&gt; and &lt;code&gt;sitemap_articles_1.xml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sitemap_agentic_discovery.xml&lt;/code&gt;, which listed a single URL, &lt;code&gt;/agents.md&lt;/code&gt;. That file is for AI shopping agents, not for shoppers&lt;/li&gt;
&lt;li&gt;the same set again under &lt;code&gt;/en-fr/&lt;/code&gt;, because the demo store has a French-market locale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The product, page and collection children carry a query string such as &lt;code&gt;?from=6920720777305&amp;amp;to=6920737783897&lt;/code&gt;. Those query strings change as you add or remove items, and a child requested without one can return 400. The only stable address is the index itself. Submit &lt;code&gt;/sitemap.xml&lt;/code&gt; to Google Search Console, not the child files.&lt;/p&gt;

&lt;p&gt;I counted 124 page URLs in that demo index: 62 on the default locale (the homepage, 32 products, 10 pages, 14 collections, 1 blog index, 3 articles, and &lt;code&gt;/agents.md&lt;/code&gt;) and the same 62 again under &lt;code&gt;/en-fr/&lt;/code&gt;. A live catalogue will be much larger, and once a product child hits 50,000 URLs Shopify starts a &lt;code&gt;sitemap_products_2.xml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Filtered collection views (&lt;code&gt;?sort_by=&lt;/code&gt;, &lt;code&gt;?filter=&lt;/code&gt;) are not in the sitemap. Shopify's &lt;code&gt;robots.txt&lt;/code&gt; also disallows many of those filter and sort URLs, along with &lt;code&gt;/admin&lt;/code&gt;, &lt;code&gt;/checkout&lt;/code&gt;, &lt;code&gt;/cart/&lt;/code&gt; and &lt;code&gt;/account&lt;/code&gt; (it allows &lt;code&gt;/account/login&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: curl in a loop (free, local)
&lt;/h2&gt;

&lt;p&gt;A script that only fetches &lt;code&gt;/sitemap.xml&lt;/code&gt; will print the child sitemap URLs, not the products. You have to walk the index first, and decode &lt;code&gt;&amp;amp;amp;&lt;/code&gt; in those query strings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://www.example.com/sitemap.xml
curl -sL &lt;span class="s2"&gt;"$index"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s1"&gt;'&amp;lt;loc&amp;gt;[^&amp;lt;]*'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s/&amp;lt;loc&amp;gt;//'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r child&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nv"&gt;child&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s'&lt;/span&gt; &lt;span class="s2"&gt;"$child"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s/&amp;amp;amp;/\&amp;amp;/g'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  curl -sL &lt;span class="s2"&gt;"$child"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s1"&gt;'&amp;lt;loc&amp;gt;[^&amp;lt;]*'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s/&amp;lt;loc&amp;gt;//'&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r url&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  curl -s -o /dev/null --max-time 15 \
    -w &lt;span class="s2"&gt;"%{http_code} %{num_redirects} %{url_effective} $url\n"&lt;/span&gt; &lt;span class="s2"&gt;"$url"&lt;/span&gt;
  sleep 0.5
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line prints the status code, how many redirects were followed, where the URL ended up, and the original URL. Pipe it into &lt;code&gt;grep -v '^200 0'&lt;/code&gt; to see only the URLs that need attention.&lt;/p&gt;

&lt;p&gt;This works for a one-off check of a small store. The catches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You only see the final hop, not the URLs in between.&lt;/li&gt;
&lt;li&gt;It does not tell you about &lt;code&gt;noindex&lt;/code&gt; or canonical tags.&lt;/li&gt;
&lt;li&gt;It only checks the pages in the sitemap, not the links inside product descriptions, menus or blog posts, which is where a lot of Shopify 404s actually live.&lt;/li&gt;
&lt;li&gt;Keep the &lt;code&gt;sleep&lt;/code&gt; in, even on your own store. Bursting hundreds of requests at once can trigger rate limiting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Option 2: Google Search Console, or a desktop crawler
&lt;/h2&gt;

&lt;p&gt;Two tools you may already have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Search Console&lt;/strong&gt;, under Page indexing, reports URLs that returned 404 or 410 when Google crawled them. It is free and it is the record of what Google saw, but it is not a complete check of the sitemap, and it lags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screaming Frog SEO Spider&lt;/strong&gt; can crawl in list mode from a sitemap index and reports status codes, redirects, canonicals and directives. The free version is limited to 500 URLs per crawl.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Screaming Frog runs on your own machine, so it is fast and, up to 500 URLs, free. The trade-off is that someone has to remember to run it.&lt;/p&gt;

&lt;p&gt;When you do find a 404, fix it in the Shopify admin: Content &amp;gt; Menus &amp;gt; View URL redirects. Shopify only honours a redirect when the old path already returns 404, so this is for deleted or unpublished URLs, not for a live product you would rather send somewhere else. If you change a product handle, leave the "Create a URL redirect" checkbox ticked; that case is handled for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: a hosted sitemap link checker
&lt;/h2&gt;

&lt;p&gt;If you want a spreadsheet of results, or a scheduled check you don't have to babysit, you can run it in the cloud. Full disclosure: I built a tool for this on Apify, the &lt;a href="https://apify.com/reflexdev/sitemap-link-checker" rel="noopener noreferrer"&gt;Sitemap Link Checker&lt;/a&gt;. It costs US$0.50 per 1,000 URLs checked, so compare that with Options 1 and 2 before you pick it. The rest of this walkthrough uses it because that's where the sample output comes from.&lt;/p&gt;

&lt;p&gt;What it does with a Shopify sitemap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reads the index and each child, including the query strings and any locale copies.&lt;/li&gt;
&lt;li&gt;Records every redirect hop, not just the final one.&lt;/li&gt;
&lt;li&gt;Checks &lt;code&gt;noindex&lt;/code&gt; (the meta robots tag and the &lt;code&gt;X-Robots-Tag&lt;/code&gt; header) and the canonical URL in the same request.&lt;/li&gt;
&lt;li&gt;Can also check the &lt;code&gt;&amp;lt;a href&amp;gt;&lt;/code&gt; links found on each page, one level deep, and tells you which page each broken link was found on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's plain HTTP, with no browser. It respects &lt;code&gt;robots.txt&lt;/code&gt;, including &lt;code&gt;Crawl-delay&lt;/code&gt;, sends at most 2 requests per second per site by default, and backs off when a site answers 429 or 503.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Point it at your store's sitemap index
&lt;/h3&gt;

&lt;p&gt;Open the Actor, click &lt;strong&gt;Try for free&lt;/strong&gt;, and switch to the JSON input. This is the exact input I used for the sample below, against Shopify's Dawn demo store. &lt;code&gt;robots.txt&lt;/code&gt; on that demo allows crawling of public product, collection, page and blog URLs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"sitemapUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/sitemap.xml"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"maxUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"crawlLinks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"maxLinkUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"sameDomainOnly"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sitemapUrls&lt;/code&gt; should be the index, &lt;code&gt;https://your-store.com/sitemap.xml&lt;/code&gt;. You can also give the homepage under &lt;code&gt;startUrls&lt;/code&gt; and leave &lt;code&gt;discoverSitemaps&lt;/code&gt; on (the default), and it will read the &lt;code&gt;Sitemap:&lt;/code&gt; line in &lt;code&gt;robots.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxUrls&lt;/code&gt; caps how many sitemap URLs are checked. The default is 50. Raise it to at least the size of your catalogue. A low cap is not spread evenly across products, collections, pages and blogs: the Actor walks the index in order, so after &lt;code&gt;/agents.md&lt;/code&gt; it will fill most of a small cap with product URLs and may never reach the later children.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;crawlLinks&lt;/code&gt; also checks the links found on those pages. This is how you catch a broken link in a product description or the menu, not only a URL that is still listed in the sitemap.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxLinkUrls&lt;/code&gt; caps those extra link checks, on top of &lt;code&gt;maxUrls&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sameDomainOnly: true&lt;/code&gt; keeps the link crawl on your own store. Turn it off if you also want to check outbound links, for example from blog posts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the Dawn demo, that run read the index (11 children), then the agentic, products and pages sitemaps. It checked all 33 product sitemap URLs (the homepage plus 32 products), &lt;code&gt;/agents.md&lt;/code&gt;, and 6 of the 10 pages, then stopped because it hit the cap of 40. It never reached the collections, blogs, articles or &lt;code&gt;/en-fr/&lt;/code&gt; children. The 12 on-page links it did check were taken from the homepage, and they included 10 collection URLs that the sitemap cap had missed, plus &lt;code&gt;/cart&lt;/code&gt; and &lt;code&gt;/account/login&lt;/code&gt;. The run finished in about 37 seconds.&lt;/p&gt;

&lt;p&gt;For a full check of this demo store you would set &lt;code&gt;maxUrls&lt;/code&gt; to 124 or more. For your own store, open the index, add up the child counts, and set the cap a bit above that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Read the output
&lt;/h3&gt;

&lt;p&gt;You get one row per URL. This is a real row from that run, a product listed in the products sitemap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/products/thelma-sandal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"sitemap"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"foundOn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"sitemapUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/sitemap_products_1.xml?from=6920720777305&amp;amp;to=6920737783897"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"lastmod"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-11T20:17:25-06:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"statusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"finalStatusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"statusClass"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2xx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"isBroken"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"finalUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/products/thelma-sandal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"redirectCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"redirectChain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"responseTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;184&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"contentType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"text/html; charset=utf-8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"noindex"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"canonical"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/products/thelma-sandal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"canonicalIsSelf"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"linksFound"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fields I'd look at first on a live store:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;isBroken&lt;/code&gt;&lt;/strong&gt;: true when the final status is 4xx or 5xx, or the request failed outright (DNS, timeout, TLS error, redirect loop). Filter on this first. A deleted product with no redirect shows up here as a 404.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;statusCode&lt;/code&gt; vs &lt;code&gt;finalStatusCode&lt;/code&gt;&lt;/strong&gt;: the first response and the one after all redirects. A sitemap URL that 301s to a new handle should usually be left as a redirect in the admin, not expected to stay in the sitemap for long; Shopify updates the index on its own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;foundOn&lt;/code&gt;&lt;/strong&gt;: for links found inside pages, the page that contains the link, so you know whether to edit a menu, a product description or a blog post.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;noindex&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;canonicalIsSelf&lt;/code&gt;&lt;/strong&gt;: a page that's in the sitemap but marked &lt;code&gt;noindex&lt;/code&gt;, or whose canonical points somewhere else, is sending search engines mixed signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's also a &lt;code&gt;SUMMARY&lt;/code&gt; record in the run's key-value store. Here's the relevant part from the same run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"urlsChecked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"bySource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"sitemap"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"statusCounts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"2xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"3xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"4xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"5xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"finalStatusCounts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"2xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"3xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"4xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"5xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"robotsBlocked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"brokenCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"redirectedCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"redirectChainsOver1Hop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"noindexCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"nonSelfCanonicalCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"avgResponseTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;526&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"reachedMaxUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"reachedMaxLinkUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There were no broken links, no redirects and no noindex pages in this sample. That's a normal result for Shopify's own demo store, and a clean report is what you want from a regular check. What the run still showed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The index really is an index. The Actor recorded 11 children and then read the first three (&lt;code&gt;sitemap_agentic_discovery.xml&lt;/code&gt;, the products sitemap with 33 URLs, and the pages sitemap with 10).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/agents.md&lt;/code&gt; returned 200 with &lt;code&gt;contentType: text/markdown; charset=utf-8&lt;/code&gt; and no canonical. It is meant for shopping agents, not for shoppers. You can ignore it when you filter the spreadsheet, but a small &lt;code&gt;maxUrls&lt;/code&gt; will always spend one slot on it because it is first in the index.&lt;/li&gt;
&lt;li&gt;Every product URL in the sample had the same &lt;code&gt;lastmod&lt;/code&gt; of 11 November 2026. The pages had older, different dates. I would not treat product &lt;code&gt;lastmod&lt;/code&gt; as a freshness signal.&lt;/li&gt;
&lt;li&gt;Turning on the link crawl was what surfaced the collection URLs, because the sitemap cap stopped before &lt;code&gt;sitemap_collections_1.xml&lt;/code&gt;. One of those rows looked like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/collections/tote-bags"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"foundOn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"statusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"finalStatusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"isBroken"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"canonical"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://theme-dawn-demo.myshopify.com/collections/tote-bags"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"canonicalIsSelf"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Export to CSV or Excel and filter &lt;code&gt;isBroken = true&lt;/code&gt; to get a to-do list. Then add a URL redirect in the Shopify admin for each deleted path, or fix the link on the page named in &lt;code&gt;foundOn&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Cost
&lt;/h3&gt;

&lt;p&gt;That run checked 52 URLs that returned a response. At $0.0005 per URL plus a $0.00005 start fee, that comes to about $0.026. Checking all 124 URLs in the Dawn demo index would be about $0.06. A 10,000-URL catalogue costs about $5, plus whatever you allow for on-page links. You can set &lt;strong&gt;Maximum cost per run&lt;/strong&gt; in the run options, and the Actor stops cleanly when it reaches that limit.&lt;/p&gt;

&lt;p&gt;Speed is set by the per-site rate limit. At the default 2 requests per second, 1,000 URLs on one store take a little over 8 minutes. If it's your own store, you can raise &lt;code&gt;maxRequestsPerSecondPerHost&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Automate it
&lt;/h3&gt;

&lt;p&gt;The version that actually catches a deleted product is a scheduled one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save your input as a task, with &lt;code&gt;maxUrls&lt;/code&gt; high enough for the full catalogue.&lt;/li&gt;
&lt;li&gt;Add a schedule, for example weekly, or daily if you add and remove products a lot.&lt;/li&gt;
&lt;li&gt;Add a webhook or integration that sends you the &lt;code&gt;SUMMARY&lt;/code&gt; record, and check &lt;code&gt;brokenCount&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can also call it from a script with Apify's API, using the normal asynchronous run endpoint for a large catalogue, then fail the job if &lt;code&gt;brokenCount&lt;/code&gt; is above zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats worth knowing (whichever option you pick)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No JavaScript rendering.&lt;/strong&gt; Plain HTTP checkers, including curl and this Actor, only see links that are in the HTML the server sends. Links added by a theme or an app after the page loads need a browser-based crawler.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 429 isn't a broken page.&lt;/strong&gt; It means the site rate-limited you. Slow down and re-check those URLs rather than adding redirects for them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/cart&lt;/code&gt; is not the same as &lt;code&gt;/cart/&lt;/code&gt;.&lt;/strong&gt; Shopify's &lt;code&gt;robots.txt&lt;/code&gt; disallows &lt;code&gt;/cart/&lt;/code&gt; (with the trailing slash), &lt;code&gt;/checkout&lt;/code&gt; and &lt;code&gt;/account&lt;/code&gt;, and allows &lt;code&gt;/account/login&lt;/code&gt;. A polite checker will skip the disallowed paths. In this run, the homepage linked to &lt;code&gt;/cart&lt;/code&gt; and &lt;code&gt;/account/login&lt;/code&gt;, both of which were allowed and returned 200.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only check stores you own or have permission to test&lt;/strong&gt;, and keep the request rate gentle on stores that aren't yours.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;For a quick check of a small catalogue, walking the Shopify index with the curl loop above is enough. For a deeper crawl on your own machine, Screaming Frog (up to 500 URLs free) is a good choice, and Google Search Console is worth watching in any case. When you want the index, the locale copies, redirect chains, noindex and broken in-content links in one spreadsheet, on a schedule, a hosted checker saves you the plumbing.&lt;/p&gt;

&lt;p&gt;If you try the Actor and something doesn't work, or there's a Shopify-specific check you wish it did, open an issue on its Issues tab. I'd like to hear about it.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>seo</category>
      <category>tutorial</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>How to find broken links from your sitemap.xml (and check every URL in it)</title>
      <dc:creator>reflexdev</dc:creator>
      <pubDate>Wed, 04 Nov 2026 18:50:19 +0000</pubDate>
      <link>https://dev.to/reflexdev/how-to-find-broken-links-from-your-sitemapxml-and-check-every-url-in-it-2f4j</link>
      <guid>https://dev.to/reflexdev/how-to-find-broken-links-from-your-sitemapxml-and-check-every-url-in-it-2f4j</guid>
      <description>&lt;p&gt;Your sitemap is supposed to be the list of pages you want search engines to index. Over time it drifts. Pages get deleted but stay in the sitemap, URLs get moved behind a redirect, someone adds &lt;code&gt;noindex&lt;/code&gt; to a page that's still listed, and links inside your content start pointing at pages that no longer exist.&lt;/p&gt;

&lt;p&gt;Google Search Console will tell you about some of this eventually, but it's slow and it only reports what Google happened to crawl. If you want to know today whether every URL in &lt;code&gt;sitemap.xml&lt;/code&gt; actually works, you need to check them yourself.&lt;/p&gt;

&lt;p&gt;This post covers three ways to do that, what each one is good for, and what the output looks like from a real run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: curl in a loop (free, local)
&lt;/h2&gt;

&lt;p&gt;For a small sitemap, a few lines of shell is enough:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://www.example.com/sitemap.xml &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;loc&amp;gt;[^&amp;lt;]*'&lt;/span&gt; | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/&amp;lt;loc&amp;gt;//'&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-50&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; url&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
      &lt;/span&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="nt"&gt;--max-time&lt;/span&gt; 15 &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s2"&gt;"%{http_code} %{num_redirects} %{url_effective} &lt;/span&gt;&lt;span class="nv"&gt;$url&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$url&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
      &lt;span class="nb"&gt;sleep &lt;/span&gt;0.5
    &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line prints the final status code, how many redirects were followed, where the URL ended up, and the original URL. Pipe it into &lt;code&gt;grep -v '^200 0'&lt;/code&gt; to see only the URLs that need attention.&lt;/p&gt;

&lt;p&gt;This works, and for a one-off check it's honestly all you need. The catches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sitemap indexes&lt;/strong&gt; (a sitemap that lists other sitemaps) and &lt;code&gt;.xml.gz&lt;/code&gt; sitemaps need extra handling. Many CMSs, including WordPress with Yoast or Rank Math, use an index by default.&lt;/li&gt;
&lt;li&gt;You only see the final hop. A 301 → 302 → 200 chain shows up as &lt;code&gt;200 2&lt;/code&gt;, without the URLs in between.&lt;/li&gt;
&lt;li&gt;It doesn't tell you about &lt;code&gt;noindex&lt;/code&gt; or canonical tags, which is where sitemaps often contradict themselves.&lt;/li&gt;
&lt;li&gt;It only checks the pages in the sitemap, not the links inside those pages.&lt;/li&gt;
&lt;li&gt;Keep the &lt;code&gt;sleep&lt;/code&gt; in. Firing hundreds of requests at once at a site, even your own, can trigger rate limiting or a firewall block.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Option 2: a desktop crawler or an open-source link checker
&lt;/h2&gt;

&lt;p&gt;If you want more than status codes, there are good existing tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Screaming Frog SEO Spider&lt;/strong&gt; can crawl in list mode from a sitemap and reports redirects, canonicals and directives. The free version is limited to 500 URLs per crawl.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;lychee&lt;/strong&gt; and &lt;strong&gt;linkchecker&lt;/strong&gt; are open-source command-line link checkers. They're good for checking links inside pages or docs, and lychee fits well in CI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These run on your own machine, so they're free (apart from Screaming Frog's paid licence above 500 URLs) and fast. The trade-off is that someone has to remember to run them, and scheduling them means keeping a machine or CI job around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: a hosted sitemap link checker
&lt;/h2&gt;

&lt;p&gt;If you want a spreadsheet of results, or a scheduled check you don't have to babysit, you can run it in the cloud. Full disclosure: I built a tool for this on Apify, the &lt;a href="https://apify.com/reflexdev/sitemap-link-checker" rel="noopener noreferrer"&gt;Sitemap Link Checker&lt;/a&gt;. It costs US$0.50 per 1,000 URLs checked, so compare that with Options 1 and 2 before you pick it. The rest of this walkthrough uses it because that's where the sample output comes from.&lt;/p&gt;

&lt;p&gt;What it does differently from the script above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reads sitemap indexes (including nested ones), &lt;code&gt;.xml.gz&lt;/code&gt; files, plain-text sitemaps and the &lt;code&gt;Sitemap:&lt;/code&gt; lines in &lt;code&gt;robots.txt&lt;/code&gt;. If you only give it a homepage, it finds the sitemap itself.&lt;/li&gt;
&lt;li&gt;Records every redirect hop, not just the final one.&lt;/li&gt;
&lt;li&gt;Checks &lt;code&gt;noindex&lt;/code&gt; (both the meta robots tag and the &lt;code&gt;X-Robots-Tag&lt;/code&gt; header) and the canonical URL in the same request.&lt;/li&gt;
&lt;li&gt;Can optionally check the links found on each page, one level deep, and tells you which page each broken link was found on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's plain HTTP, with no browser. It respects &lt;code&gt;robots.txt&lt;/code&gt;, including &lt;code&gt;Crawl-delay&lt;/code&gt;, sends at most 2 requests per second per site by default, and backs off automatically when a site answers 429 or 503.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Point it at a sitemap
&lt;/h3&gt;

&lt;p&gt;Open the Actor, click &lt;strong&gt;Try for free&lt;/strong&gt;, and switch to the JSON input. This is the exact input I used for the sample below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sitemapUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/sitemap.xml"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"crawlLinks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxLinkUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sameDomainOnly"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sitemapUrls&lt;/code&gt; can be a normal sitemap, a sitemap index, a &lt;code&gt;.gz&lt;/code&gt; file or a &lt;code&gt;robots.txt&lt;/code&gt; URL. You can give several.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxUrls&lt;/code&gt; caps how many sitemap URLs are checked. The default is 50 so a first run is quick. Raise it once the output looks right.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;crawlLinks&lt;/code&gt; also checks the &lt;code&gt;&amp;lt;a href&amp;gt;&lt;/code&gt; links found on those pages. This is how you find broken links inside your content rather than in the sitemap itself.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxLinkUrls&lt;/code&gt; caps those extra link checks, on top of &lt;code&gt;maxUrls&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sameDomainOnly: false&lt;/code&gt; includes outbound links to other sites. Leave it at &lt;code&gt;true&lt;/code&gt; if you only care about your own pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That sitemap turned out to be an index pointing to 6 sitemaps. The run read the index and the first of those (727 URLs), checked 30 sitemap URLs plus 60 links found on those pages, and finished in about 46 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Read the output
&lt;/h3&gt;

&lt;p&gt;You get one row per URL. This is a real row from that run, a link found on one of the docs pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/cli"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"foundOn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/open-source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"statusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;301&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"finalStatusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"statusClass"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2xx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"isBroken"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"finalUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/cli/docs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"redirectCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"redirectChain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/cli"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"statusCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;301&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"location"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/cli/docs"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"responseTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1699&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"contentType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text/html; charset=utf-8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"noindex"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"canonical"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/cli/docs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"canonicalIsSelf"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fields I'd look at first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;isBroken&lt;/code&gt;&lt;/strong&gt;: true when the final status is 4xx or 5xx, or the request failed outright (DNS, timeout, TLS error, redirect loop). Filter on this first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;statusCode&lt;/code&gt; vs &lt;code&gt;finalStatusCode&lt;/code&gt;&lt;/strong&gt;: the first response and the one after all redirects. A sitemap URL with &lt;code&gt;statusCode: 301&lt;/code&gt; should usually be replaced with its &lt;code&gt;finalUrl&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;redirectChain&lt;/code&gt;&lt;/strong&gt;: every hop. Chains longer than one hop are worth flattening, especially after a site migration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;foundOn&lt;/code&gt;&lt;/strong&gt;: for links found inside pages, the page that contains the link, so you know where to fix it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;noindex&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;canonicalIsSelf&lt;/code&gt;&lt;/strong&gt;: a page that's in your sitemap but marked &lt;code&gt;noindex&lt;/code&gt;, or whose canonical points somewhere else, is sending search engines mixed signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's also a &lt;code&gt;SUMMARY&lt;/code&gt; record in the run's key-value store. Here's the relevant part from the same run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"urlsChecked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bySource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"sitemap"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"statusCounts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"2xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;87&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"3xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"4xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"5xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"finalStatusCounts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"2xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;89&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"3xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"4xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"5xx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"robotsBlocked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"brokenCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"redirectedCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"redirectChainsOver1Hop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"noindexCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"nonSelfCanonicalCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"avgResponseTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;680&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case there were no broken links at all, which is a good result for Apify's docs team. A clean report is a normal outcome, and that's the point of running it regularly. What it did find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 internal links that go through a redirect (&lt;code&gt;/cli&lt;/code&gt; → &lt;code&gt;/cli/docs&lt;/code&gt;, and an old SDK guide URL that 302s to the overview page). They work, but pointing the links at the final URL saves a hop.&lt;/li&gt;
&lt;li&gt;1 outbound link, to x.com, that wasn't checked because x.com's &lt;code&gt;robots.txt&lt;/code&gt; disallows it. It's marked &lt;code&gt;robotsBlocked: true&lt;/code&gt; rather than being reported as broken.&lt;/li&gt;
&lt;li&gt;1 outbound Discord invite link whose canonical points to a different URL, which is expected for a third-party page and nothing to fix.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Export to CSV or Excel and filter &lt;code&gt;isBroken = true&lt;/code&gt;, or sort by &lt;code&gt;redirectCount&lt;/code&gt;, to get a to-do list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Cost
&lt;/h3&gt;

&lt;p&gt;That run checked 89 URLs that returned a response. The robots-blocked one isn't charged, and nor are requests that get no response at all, such as a DNS failure or timeout. At $0.0005 per URL plus a $0.00005 start fee, that comes to about $0.045. A 10,000-URL sitemap costs about $5. You can set &lt;strong&gt;Maximum cost per run&lt;/strong&gt; in the run options, and the Actor stops cleanly when it reaches that limit.&lt;/p&gt;

&lt;p&gt;Speed is set by the per-site rate limit, not by the tool. At the default 2 requests per second, 1,000 URLs on one site take a little over 8 minutes. If it's your own site, you can raise &lt;code&gt;maxRequestsPerSecondPerHost&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Automate it
&lt;/h3&gt;

&lt;p&gt;The version that actually catches problems is a scheduled one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save your input as a task.&lt;/li&gt;
&lt;li&gt;Add a schedule, for example weekly, or daily for a site that changes a lot.&lt;/li&gt;
&lt;li&gt;Add a webhook or integration that sends you the &lt;code&gt;SUMMARY&lt;/code&gt; record, and check &lt;code&gt;brokenCount&lt;/code&gt; and &lt;code&gt;redirectChainsOver1Hop&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can also call it from CI after a deploy with Apify's API, using the normal asynchronous run endpoint for large sitemaps, then fail the build if &lt;code&gt;brokenCount&lt;/code&gt; is above zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats worth knowing (whichever option you pick)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No JavaScript rendering.&lt;/strong&gt; Plain HTTP checkers, including curl and this Actor, only see links that are in the HTML the server sends. Links added by JavaScript after the page loads need a browser-based crawler.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some servers lie to HEAD requests.&lt;/strong&gt; That's why the Actor uses GET. If you write your own script with &lt;code&gt;curl -I&lt;/code&gt;, expect a few false 405s or 404s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 429 isn't a broken page.&lt;/strong&gt; It means the site rate-limited you. Slow down and re-check those URLs rather than deleting them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;robots.txt cuts both ways.&lt;/strong&gt; If your own &lt;code&gt;robots.txt&lt;/code&gt; blocks bots, a polite checker won't check those paths. Allow the checker's user agent for the paths you want checked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only check sites you own or have permission to test&lt;/strong&gt;, and keep the request rate gentle on sites that aren't yours.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;For a quick one-off check of a small sitemap, the curl loop above is enough. For a deeper crawl on your own machine, Screaming Frog (up to 500 URLs free) or lychee are good choices. When you want sitemap indexes, redirect chains, noindex and broken in-content links in one spreadsheet, on a schedule, a hosted checker saves you the plumbing.&lt;/p&gt;

&lt;p&gt;If you try the Actor and something doesn't work, or there's a check you wish it did, open an issue on its Issues tab. I'd like to hear about it.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>automation</category>
    </item>
    <item>
      <title>How to run Lighthouse on every page in your sitemap (without a PageSpeed API key)</title>
      <dc:creator>reflexdev</dc:creator>
      <pubDate>Sun, 01 Nov 2026 03:35:15 +0000</pubDate>
      <link>https://dev.to/reflexdev/how-to-run-lighthouse-on-every-page-in-your-sitemap-without-a-pagespeed-api-key-43cn</link>
      <guid>https://dev.to/reflexdev/how-to-run-lighthouse-on-every-page-in-your-sitemap-without-a-pagespeed-api-key-43cn</guid>
      <description>&lt;p&gt;Lighthouse is great for one page at a time. When you're responsible for a whole site, say 50 docs pages, a blog, or a client's product catalogue, the questions change. Which pages are slow? Which ones are missing a meta description? Did last week's release make things worse?&lt;/p&gt;

&lt;p&gt;Doing that by hand in DevTools gets old quickly. This post covers three ways to audit every URL in a sitemap, what each costs in time and money, and what the output looks like from a real run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Lighthouse CLI in a loop (free, local)
&lt;/h2&gt;

&lt;p&gt;If you have Node and Chrome installed, you can do it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; lighthouse
curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://www.example.com/sitemap.xml &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;loc&amp;gt;[^&amp;lt;]*'&lt;/span&gt; | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/&amp;lt;loc&amp;gt;//'&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read &lt;/span&gt;url&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
      &lt;/span&gt;lighthouse &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$url&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--quiet&lt;/span&gt; &lt;span class="nt"&gt;--chrome-flags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--headless=new"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nt"&gt;--only-categories&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;performance,seo &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nt"&gt;--output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;json &lt;span class="nt"&gt;--output-path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"./reports/&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$url&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;md5sum&lt;/span&gt; | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-c1-8&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;.json"&lt;/span&gt;
    &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works and costs nothing. The catches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sitemap indexes (a sitemap of sitemaps) and &lt;code&gt;.gz&lt;/code&gt; sitemaps need extra handling.&lt;/li&gt;
&lt;li&gt;You end up with a folder of 300–500 KB JSON files and still have to pull the scores and metrics out of each one.&lt;/li&gt;
&lt;li&gt;Scores depend on your machine and network. Your laptop on fibre isn't a mid-range phone on 4G.&lt;/li&gt;
&lt;li&gt;Run audits &lt;strong&gt;one at a time&lt;/strong&gt;. Running several in parallel on one machine makes them compete for CPU and drags performance scores down.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a one-off check of a small site, this is honestly the best option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: PageSpeed Insights API (free, with limits)
&lt;/h2&gt;

&lt;p&gt;Google's PSI API runs Lighthouse for you and also returns Chrome UX Report field data when a page has enough traffic. You need an API key, you're rate-limited, and heavy use runs into quota errors. It's a good choice for a few hundred URLs a day if you're happy to write the sitemap parsing and the retry logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: a hosted bulk auditor
&lt;/h2&gt;

&lt;p&gt;If you want a table of results without maintaining scripts, you can run Lighthouse in the cloud. Full disclosure: I built a small tool for this on Apify, the &lt;a href="https://apify.com/reflexdev/lighthouse-bulk-auditor" rel="noopener noreferrer"&gt;Lighthouse Bulk Auditor&lt;/a&gt;. It's paid per successful audit (currently US$0.015 per page per device), so weigh that against Options 1 and 2. The rest of this walkthrough uses it because that's where the sample output below comes from.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Point it at a sitemap
&lt;/h3&gt;

&lt;p&gt;Open the Actor, click &lt;strong&gt;Try for free&lt;/strong&gt;, and switch to the JSON input. This is the exact input I used for the sample below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sitemapUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/sitemap.xml"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxSitemapUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"strategies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"desktop"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxOpportunities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sitemapUrl&lt;/code&gt; can be a normal sitemap, a sitemap index or a &lt;code&gt;.gz&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxSitemapUrls&lt;/code&gt; caps how many pages are audited. Start small, check the output, then raise it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategies&lt;/code&gt; is &lt;code&gt;mobile&lt;/code&gt;, &lt;code&gt;desktop&lt;/code&gt; or both. Both doubles the number of audits.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxOpportunities&lt;/code&gt; is how many "top fixes" to keep per page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That run audited 3 pages in about 98 seconds in total. A single audit usually takes 10–40 seconds depending on the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Read the output
&lt;/h3&gt;

&lt;p&gt;You get one row per page per device. This is a real row from that run, trimmed slightly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com/api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"strategy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"desktop"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scores"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"performance"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;71&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"accessibility"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"bestPractices"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;69&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"seo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;85&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"firstContentfulPaintMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;570&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"largestContentfulPaintMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1366&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"totalBlockingTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;455&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cumulativeLayoutShift"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.005&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"speedIndexMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2355&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"serverResponseTimeMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"topOpportunities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mainthread-work-breakdown"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Minimize main-thread work"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"estimatedSavingsMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;450&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bootup-time"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Reduce JavaScript execution time"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"estimatedSavingsMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;450&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"render-blocking-insight"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Render-blocking requests"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"estimatedSavingsMs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;350&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failedSeoOrA11yAudits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Document does not have a meta description"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Image elements do not have `[alt]` attributes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Background and foreground colors do not have a sufficient contrast ratio."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lighthouseVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"13.6.0"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fields I find most useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;largestContentfulPaintMs&lt;/code&gt;, &lt;code&gt;cumulativeLayoutShift&lt;/code&gt;, &lt;code&gt;totalBlockingTimeMs&lt;/code&gt;&lt;/strong&gt;: the lab versions of the Core Web Vitals. TBT stands in for INP in lab testing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;topOpportunities&lt;/code&gt;&lt;/strong&gt;: Lighthouse's own estimate of what each fix would save, sorted by time saved. It's a decent to-do list, but treat the numbers as estimates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;failedSeoOrA11yAudits&lt;/code&gt;&lt;/strong&gt;: the plain-English names of failing binary checks. This is often the quickest win, because a missing meta description takes a minute to fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;status&lt;/code&gt; / &lt;code&gt;errorMessage&lt;/code&gt;&lt;/strong&gt;: pages that couldn't be loaded show up as &lt;code&gt;error&lt;/code&gt; rows with the reason, so they don't silently drop out.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Export to CSV or Excel and sort by &lt;code&gt;largestContentfulPaintMs&lt;/code&gt; or &lt;code&gt;scores.performance&lt;/code&gt; to find your worst pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Narrow it down when you only care about one thing
&lt;/h3&gt;

&lt;p&gt;A full audit isn't always what you need. Limiting &lt;code&gt;categories&lt;/code&gt; makes runs faster and the output easier to scan.&lt;/p&gt;

&lt;p&gt;Performance only, with a pass/fail budget:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"startUrls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://apify.com"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://docs.apify.com"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"strategies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mobile"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"categories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"performance"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"minPerformanceScore"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each row gets &lt;code&gt;passedPerformanceBudget: true/false&lt;/code&gt;. In my test, one page scored 64 and passed. The other scored 35 with a 23-second LCP on emulated slow 4G and failed. That's exactly the kind of page this is meant to surface.&lt;/p&gt;

&lt;p&gt;SEO only (&lt;code&gt;"categories": ["seo"]&lt;/code&gt;) or accessibility only (&lt;code&gt;"categories": ["accessibility"]&lt;/code&gt;) took about 10–12 seconds per page in my runs. Columns for categories you didn't ask for come back as &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Automate it
&lt;/h3&gt;

&lt;p&gt;The useful version of this is a scheduled run:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save your input as a task.&lt;/li&gt;
&lt;li&gt;Add a schedule, for example weekly.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;minPerformanceScore&lt;/code&gt; and add a webhook or Slack integration so you hear about pages that fail the budget.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can also call it from a script or CI with Apify's &lt;code&gt;run-sync-get-dataset-items&lt;/code&gt; endpoint, which starts a run and returns the rows in one request. Synchronous calls time out after 5 minutes, so use the normal asynchronous run endpoint for large sitemaps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats worth knowing (whichever option you pick)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scores vary between runs&lt;/strong&gt; by a few points, because of network jitter, ads and third-party scripts. Compare trends over several runs, not single numbers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lab data isn't field data.&lt;/strong&gt; The CrUX numbers at the top of PageSpeed Insights come from real Chrome users. Lighthouse lab data is reproducible and works for pages with no traffic, but the two will differ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Location matters.&lt;/strong&gt; Cloud audits run from wherever the servers are (US data centres in this case), so &lt;code&gt;serverResponseTimeMs&lt;/code&gt; for a site hosted in Australia or Europe will look worse than from a local machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only audit sites you own or have permission to test&lt;/strong&gt;, and keep volumes reasonable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lighthouse isn't a full accessibility audit.&lt;/strong&gt; It catches common, automatable issues such as contrast, alt text and labels, but not everything WCAG covers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;For a handful of pages, run the Lighthouse CLI locally. For a few hundred URLs a day when you're happy to write some glue code, the PSI API is free. When you want a whole sitemap turned into a spreadsheet, or a scheduled check that alerts you, a hosted runner saves the plumbing.&lt;/p&gt;

&lt;p&gt;If you try the Actor and something doesn't work, or there's a field you wish it had, open an issue on its Issues tab. I'd genuinely like to know.&lt;/p&gt;

</description>
      <category>lighthouse</category>
      <category>webperf</category>
      <category>seo</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
