Template audits rarely fail on headings alone. They fail on the boring fields buried in HTML: a canonical pointing at staging, a meta robots left on by mistake, a product ID in a data-* attribute, or JSON-LD that still references the old brand name. View Source on ten URLs is workable. On thirty template variants after a CMS deploy, it is not.
The CSS & XPath Extractor on Scrawl fetches up to 10 URLs and runs up to 10 rules you define: CSS (cheerio), XPath (cheerio to well-formed XHTML, then a safe evaluator with limits), or regex with the same guards as Source Code Search. Output is a match table plus CSV. Raw HTML only. No JavaScript rendering.
!Flow from URL list through CSS and XPath rules to a results table
When custom rules beat fixed heading tools
Use the H1/H2 Extractor when the question is strictly heading hierarchy across up to 100 URLs. It is faster and opinionated for that job.
Use custom CSS or XPath when:
- You need canonical URLs (
link[rel=canonical]or//link[@rel='canonical']/@href) - You are sampling meta robots or description tags across a launch batch
- You want one CSS class of links, not every anchor (Link Extractor is the full inventory tool)
- You are hunting a string pattern in HTML with safe regex
After you locate JSON-LD script blocks, validate them with the Schema Checker. Extraction finds the block; schema validation checks whether it parses.
CSS selectors: start here
CSS is the fastest path for most SEO fields:
| Goal | Example rule | Attribute column |
|------|----------------|------------------|
| Canonical href | link[rel='canonical'] | href |
| Meta description | meta[name='description'] | content |
| OG title | meta[property='og:title'] | content |
| JSON-LD body | script[type='application/ld+json'] | leave empty (text) |
Run the same rules on every URL in your list. The tool does not spider your site. It only fetches what you paste.
XPath: when CSS is awkward
XPath helps when you care about attribute nodes or positional logic in messy HTML:
//link[@rel='canonical']/@href//meta[@name='robots']/@content//a[contains(@class,'affiliate')]
Guardrails in the tool:
- Expression length cap
- Node scan capped before values are collected; output stops at 50 matches per rule
- Worker thread with about a 2.5 second hard timeout; invalid syntax returns a readable error
- No
evaland no arbitrary code execution
If XPath times out, narrow the expression (anchor on id or a stable container) or switch to CSS for that field.
Regex: last resort, still bounded
Regex mode reuses safe-regex validation: 200 character cap, nested quantifiers rejected, RE2 execution with a VM timeout fallback. Use it for leftover analytics IDs or CDN hostnames, not for parsing full documents.
Build a URL list
Good sources:
- Top landing pages from analytics
- Every URL in a sitemap segment
- Internal URLs exported from the Link Extractor on a hub page
Keep batches at 10 URLs. For larger audits, run multiple passes and merge CSV files.
Read the match table honestly
Each row is one match for one rule on one URL. Multiple rows per URL are normal (for example several script tags). Zero rows might mean the selector is wrong, the content is injected by JavaScript, or the field truly is absent.
The tool caps match counts and value length so a runaway selector cannot return megabytes of text. If you hit caps, tighten the rule.
Worked example: canonical QA after template deploy
You shipped a new product template. You want every canonical to self-reference on HTTPS.
- List ten representative product URLs.
- Add a CSS rule:
link[rel='canonical']with attributehref. - Run extraction. Scan the value column for staging hostnames or HTTP URLs.
- Download CSV for the ticket.
- Spot-check one outlier in DevTools.
Mistakes that waste time
- Expecting SPA-only fields without server HTML.
- Using this tool for every anchor when Link Extractor already exports rel flags and CSV.
- Duplicating H1/H2 audits. The heading extractor is the right fixed tool.
- Huge XPath on minified pages. Prefer CSS or a shorter path.
Run your rules
Paste URLs, add CSS or XPath rules, and run the CSS & XPath Extractor. Export CSV when you need evidence in a launch checklist or client sign-off.