Standard crawl reports answer standard questions: which pages are 404, which titles are too long, which images lack alt text. The questions that actually drive SEO decisions are usually more specific. Which blog posts have no named author? Which product pages say "Sold out" but still sit in the XML sitemap? Which templates forgot the Product schema after the last theme update? Which articles have not been updated since 2021?
No off-the-shelf report answers those, but your crawler can, if you tell it exactly what to pull from each page. That feature is called custom extraction, and it turns a crawler into a lightweight scraper that runs across every URL on a site in one pass.
This guide explains the three selector languages you will use, gives tested patterns for the most common audit jobs (dates and authors, schema and prices, stock status and more), and shows how to turn thousands of extracted values into a short, prioritised action list.
What custom extraction does that standard crawl reports cannot
Screaming Frog's documentation describes the feature in one sentence:
“The custom extraction feature allows you to scrape any data from the HTML of a web page using XPath, CSSPath and regex.”
— Screaming Frog, Web scraping and data extraction using the SEO Spider
In practice you define one or more rules, each with a name, a selector and an output type. As the crawler fetches each page it applies the rules and records the result in extra columns. Screaming Frog allows up to 100 extractors per crawl and shows results in a Custom Extraction tab as the crawl runs. Sitebulb offers the same idea with a point-and-click selector that generates CSS selectors for you, plus a content search feature for finding words or phrases in page HTML (Sitebulb content extraction).
Typical uses include:
- Auditing editorial signals: author names, publish and modified dates, word counts, number of internal links in the body.
- Verifying structured data at scale: which pages carry Product, Article, LocalBusiness or Breadcrumb markup, and with which values.
- Ecommerce checks: prices, stock status, SKU, review counts, variant counts.
- Migration QA: confirming that titles, H1s, canonicals and tracking IDs carried over to the new templates.
- Thin and duplicate archive detection, as Semrush showed for category and tag pages, by extracting article or product counts per listing page.
- Tracking and compliance: finding pages missing the analytics tag, consent banner or a required disclaimer.
XPath, CSS selectors and regex in plain language
Each selector language suits a different job. You do not need to master all three; you need to know which to reach for.
| Language | Best for | Example | What it returns |
|---|---|---|---|
| XPath | Attributes, conditions, counting, navigating up and down the HTML tree | //meta[@property='article:published_time']/@content | The publish date from the Open Graph meta tag |
| CSS selector (CSSPath) | Elements by class or ID, familiar to front-end developers | .product-price .money | The element or its text, depending on output type |
| Regex | Anything not in an HTML element, especially JSON-LD and inline scripts | "datePublished":\s*"([^"]+)" | The captured group, here the date string |
Screaming Frog's guide explains when regex becomes unavoidable:
“Regex is required for anything that is not part of a HTML element, for example any JSON found in the code.”
— Screaming Frog, Web scraping and data extraction using the SEO Spider
Output types matter as much as the selector
For XPath and CSS selectors, Screaming Frog offers four outputs: Extract HTML Element (the full tag), Extract Inner HTML (what is inside the tag), Extract Text (visible text only) and Function Value (the result of an expression such as count(//h2)). Choosing "Extract Text" when you wanted an attribute value is the most common reason a rule returns blanks.
Raw HTML versus rendered HTML
By default crawlers extract from the raw HTML the server sends. If a value is injected by JavaScript (prices from an API, reviews from a widget, schema added by a tag manager), it will be missing unless you switch to JavaScript rendering mode. That difference is itself a useful audit: Google renders pages, but its JavaScript SEO guidance still prefers critical content and links in the HTML, and its troubleshooting guide recommends checking the rendered HTML for anything missing. Run one crawl in each mode and compare the columns.
Getting a selector without writing it
- Open a representative page in Chrome and right-click the element, then choose Inspect.
- In the Elements panel, right-click the highlighted node and choose Copy then Copy XPath or Copy selector.
- Simplify it. Auto-generated paths like
/html/body/div[3]/main/div[2]/spanbreak when layout changes; prefer anchors on stable classes, IDs or attributes, such as//span[@class='posted-on']//time/@datetime. - Test it in the DevTools Console with
$x("your-xpath")ordocument.querySelectorAll("your-css")on two or three different templates. - Use the crawler's test or preview feature on a handful of URLs before running the full crawl.
Making patterns survive theme and plugin updates
Extraction rules break when markup changes, and a broken rule looks exactly like a missing value. Three habits keep them reliable. First, allow for optional whitespace and quotes in regex (the \s* and "? parts in the patterns above exist because different plugins format JSON-LD differently, some minified and some pretty-printed). Second, anchor XPath and CSS on semantic attributes such as itemprop, rel, name or datetime rather than layout classes that designers rename. Third, add a control extractor that should always return a value, such as the page title or count(//h1). If the control column is populated but a rule is blank across a whole template, the rule is broken, not the pages.
Recipe: auditing publish dates and authors across a blog
Dates and bylines feed both reader trust and your content maintenance schedule. Most themes expose them in three places: visible HTML, meta tags and JSON-LD. Extract all three, because mismatches are themselves findings.
| Extractor name | Type | Selector | Output |
|---|---|---|---|
| og_published | XPath | //meta[@property='article:published_time']/@content | Extract Text (attribute value) |
| og_modified | XPath | //meta[@property='article:modified_time']/@content | Extract Text |
| ld_datePublished | Regex | "datePublished"\s*:\s*"([^"]+)" | Captured group |
| ld_dateModified | Regex | "dateModified"\s*:\s*"([^"]+)" | Captured group |
| visible_date | XPath | //article//time/@datetime | Extract Text |
| byline | CSS | .author-name (adjust to theme) | Extract Text |
| author_link | XPath | //a[@rel='author']/@href | Extract Text |
Restrict the crawl to post URLs with an include pattern (for example /blog/.*) so you are not scraping category pages. Then, in a spreadsheet:
- Filter blank bylines: posts with no named author, a gap our guide to author pages and bylines explains how to fix.
- Count posts per author with a pivot table, a technique Salt Agency describes for author audits (custom extraction using Sitebulb and Screaming Frog). An "admin" or "staff" author on 300 posts is a finding.
- Compare visible dates with
dateModified. A visible date of 2024 alongside a JSON-LD modified date from yesterday often means a plugin updates the timestamp on trivial saves. - Sort by modified date to build a refresh queue of the oldest posts that still earn impressions.
Article markup itself is covered in our Article schema guide.
Recipe: finding missing schema, prices and other product data
Schema plugins and theme updates break quietly. Extraction tells you which templates are affected.
- Count JSON-LD blocks: XPath
count(//script[@type='application/ld+json'])with Function Value. Zero on a product page is an immediate flag. - List schema types: regex
"@type"\s*:\s*"([^"]+)". Screaming Frog can return multiple matches per page, so you see "Product, Offer, BreadcrumbList" side by side. - Microdata types: XPath
//*[@itemtype]/@itemtype, the example Screaming Frog uses. - Schema price: regex
"price"\s*:\s*"?([0-9.,]+). - Visible price: CSS selector for your theme's price element, such as
.price__current, with Extract Text. - Review data: regex
"ratingValue"\s*:\s*"?([0-9.]+)and"reviewCount"\s*:\s*"?([0-9]+).
Join the schema price and the visible price in a sheet and flag rows where they differ. A mismatch between structured data and what shoppers see is one of the causes of Merchant Center and rich result problems; see our guide to Product schema and merchant listings.
The same technique works for any schema type. For a recipe site you might extract "cookTime" and "recipeYield" to find incomplete markup, an approach that pairs with our recipe schema guide. For software pages, extract "applicationCategory" and "operatingSystem" (see SoftwareApplication schema).
Recipe: checking product stock status at scale
Out-of-stock pages are not automatically a problem, but you need to know how many there are, how long they have been out of stock and whether you are still sending them traffic and ad spend. Extract stock signals from three angles:
- Schema availability: regex
"availability"\s*:\s*"(?:https?://schema\.org/)?(\w+)"returns values such asInStock,OutOfStockorPreOrder. - Buy button state: XPath
//button[@name='add']/@disabled(Shopify's default add-to-cart button usesname="add"in many themes; adjust for yours). A value means the button is disabled. - Visible sold-out text: XPath
count(//*[contains(normalize-space(text()),'Sold out')])with Function Value. Change the phrase to match your theme or language.
Then combine with data the crawler already has (indexability, inlinks, sitemap inclusion) and with Search Console clicks via the API connection. The result is a table you can act on:
| Schema availability | Button disabled? | Clicks (90 days) | Likely action |
|---|---|---|---|
| OutOfStock | Yes | High | Keep page live, add back-in-stock signup and alternatives |
| OutOfStock | Yes | None, discontinued | 301 to closest replacement or category |
| InStock | Yes | Any | Data mismatch: fix schema or inventory sync |
| OutOfStock | No | Any | Shoppers can add an unavailable item: fix theme logic |
| Blank | No | Any | Missing Offer markup: fix template |
Our guide to out-of-stock and discontinued products covers the SEO decisions in detail, and our pre-orders and back-in-stock guide covers the merchandising side.
More extraction recipes worth saving
| Audit question | Selector | Type |
|---|---|---|
| Is the analytics tag on every page? | G-[A-Z0-9]{6,12} | Regex |
| Is Tag Manager present? | GTM-[A-Z0-9]+ | Regex |
| Does og:url match the canonical? | //meta[@property='og:url']/@content | XPath |
| How many hreflang alternates? | count(//link[@rel='alternate'][@hreflang]) | XPath, Function Value |
| How many H2s in the article body? | count(//article//h2) | XPath, Function Value |
| Which pages embed YouTube? | //iframe[contains(@src,'youtube')]/@src | XPath |
| Which links use hash routes? | //a[contains(@href,'#/')]/@href | XPath |
| Breadcrumb trail text | nav[aria-label="breadcrumb"] | CSS, Extract Text |
The og:url check pairs naturally with canonical audits; Google treats rel="canonical" as a strong signal and recommends absolute URLs (Google’s canonicalisation guide), so mismatches between social and canonical tags are worth cleaning up. The hash-route check is explained in our guide to URL fragments and SEO. For images that matter in search, Google's image best practices note that CSS background images are not indexed; extracting //*[contains(@style,'background-image')]/@style finds hero images built that way.
Turning extraction results into an action list
A crawl with ten extractors on 20,000 URLs produces 200,000 data points. Nobody acts on that. The final step is reduction.
Hypothetical example for illustration. A retailer crawls 8,400 product URLs with the stock and schema extractors above. Results:
- 6,950 InStock with an enabled button: no action.
- 1,020 OutOfStock with a disabled button. Of these, 140 had Search Console clicks in the last 90 days.
- 210 InStock with a disabled button: an inventory sync error affecting real sales.
- 220 with no Offer markup at all, all from one legacy template.
That reduces to four tickets, in priority order: fix the sync error (210 pages losing sales now), fix the legacy template (220 pages, one code change), decide on the 140 out-of-stock pages that still earn clicks, and redirect or retire the 880 that do not.
A repeatable workflow:
- Export the Custom Extraction tab (or the Internal tab, which includes extraction columns) to a spreadsheet or BigQuery.
- Join with Search Console clicks and analytics revenue by URL so every row has business value attached.
- Classify each row with a formula into a small number of action buckets, as in the stock table above.
- Group by template, not URL. If 300 errors share a template, that is one ticket for developers.
- Save the configuration and re-run monthly or after every release. Salt Agency's observation holds: once a rule is written it is reliable, so the second crawl costs minutes.
- Automate with scheduled crawls, or script the analysis with the approach in our Python for SEO guide.
Questions SEOs ask about extraction rules
Is XPath or a CSS selector better for SEO custom extraction?
Use XPath when you need attributes, conditions or counts, and CSS selectors when you are targeting elements by class or ID. Use regex for JSON-LD and inline scripts, which are not HTML elements.
Why does my extraction rule return blank values?
The three usual causes are the wrong output type (Extract Text instead of an attribute), content injected by JavaScript while the crawl uses raw HTML, or a selector copied from one template that does not match others.
Can custom extraction read JSON-LD structured data?
Yes, with regex. A pattern such as "datePublished"\s*:\s*"([^"]+)" captures the value. Some crawlers also offer built-in structured data extraction as a separate option.
How many extractors can I run in one Screaming Frog crawl?
Screaming Frog supports up to 100 custom extractors per crawl. In practice, ten or fewer focused rules per audit are easier to analyse.
Will custom extraction slow down my crawl?
Slightly, and JavaScript rendering slows it much more. Limit rules to the URL patterns they apply to and use include patterns to keep the crawl focused.
Building your first extraction audit this week
Pick one question that standard reports cannot answer and that has money attached, such as product pages with a disabled buy button or blog posts with no author. Write two or three rules, test them on five URLs from different templates, crawl only the relevant section, and reduce the output to a ticket list grouped by template. Save the configuration so next month's audit takes minutes. If you are new to the crawler itself, start with our Screaming Frog guide.
Want us to build a reusable extraction audit for your site? Our technical SEO team does this for ecommerce and publishing sites, and our ecommerce SEO service includes stock and schema monitoring. Get a quote.
Further reading on custom extraction
- Shopify Speed Optimisation: Apps, Themes and Images
- WordPress Speed Optimisation: Hosting, Plugins and Caching
- Next.js SEO: Metadata, Rendering and Sitemaps
Sources for this custom extraction guide
- Screaming Frog: Web scraping and data extraction using the SEO Spider
- Sitebulb: Content extraction and search
- Salt Agency: Custom extraction using Sitebulb and Screaming Frog (October 2020)
- Semrush Blog: Custom extraction for duplicate content (September 2019)
- Google Search Central: Fix Search-related JavaScript problems
- Google Search Central: Understand the JavaScript SEO basics
- Google Search Central: How to specify a canonical URL
- Google Search Central: Image SEO best practices




