Screaming Frog Custom Extraction Helper: Selector Tester and Dataset Cleaner
Scraping page content with Screaming Frog’s custom extraction needs no code. The steps either side of it are where crawls go wrong: a CSS selector that matches nothing, or an export full of split columns, thin pages and duplicates. This free Google Colab notebook handles both, so the content you collect is ready for analysis.
Who it’s for
SEOs and content analysts who use Screaming Frog for web scraping and want a clean page-content dataset for content audits, clustering or entity analysis. Custom extraction is a paid Screaming Frog feature, so you need a licence for the crawl itself. The notebook needs no API keys.
How to use it
- Open the notebook in Colab and paste a handful of URLs and the CSS selector you plan to use, such as the class of your article body.
- Run the selector test. It checks robots.txt, waits between requests and shows the number of matches, the word count and a preview for each URL.
- In Screaming Frog, add the extractor under Configuration > Custom > Custom Extraction, choose Extract Text, and crawl.
- Export the Custom Extraction tab and upload it to the notebook.
- Run the cleaning step, then save the dataset.
What you get
- A quick check of your selector before a big crawl, with match counts and word counts per URL
- Multi-match columns (Content 1, Content 2 and so on) merged into one field
- Normalised whitespace, with thin pages and exact duplicates removed and word counts added
page_content_dataset.csvandpage_content_dataset.jsonl, ready for topic modelling, embeddings or entity extraction
Why the cleaning step matters
Most text analysis assumes one row per page with one block of text. Screaming Frog splits repeated matches into separate columns and keeps every URL it crawled, including tag pages and near-empty templates. If those go into a topic model or an embedding run unchanged, they create noise topics and false duplicates. Cleaning first keeps the analysis about your actual content.
Limits
The selector test reads raw HTML. If a site loads its content with JavaScript, the test can come back empty even though a Screaming Frog crawl in JavaScript rendering mode would work. Only scrape sites you are allowed to, and keep the request rate low. It was tested in October 2026 against SEO Spider v24.3 and two live MLforSEO posts.
Read the step-by-step in Web Scraping of Page Content in 3 Easy Steps with Screaming Frog. To put the dataset to work with clustering, classification and entity analysis, see Introduction to Machine Learning for SEO.
What’s included
- Test a CSS selector on a few URLs before a big crawl: matches, word count, preview
- Respects robots.txt and waits between requests
- Merges multi-match columns, normalises whitespace, drops thin pages and duplicates
- Saves an NLP-ready CSV and JSONL with word counts
- No API keys; tested against Screaming Frog SEO Spider v24.3
Where this resource is used on MLforSEO
Walkthroughs on the blog
Concepts behind it
More content analysis resources
- Coding Script or NotebookTopic Modelling with BERTopic in Python: Pages and Short Text (Notebook)
- Coding Script or NotebookWhisper API Transcription Notebook: Bulk Audio, Long Files and SRT Captions
- Coding Script or NotebookTopic Modelling with LDA in Python: Tuned, Visualised and Linked (Notebook)
- GuideEntity Extraction Benchmark: Generative AI vs NLP APIs (Raw Results Sheet)
- GuideContent Transformation Approaches in ML: 16 Types Compared (Guide)
- No-Code TemplateNo-code LDA Topic Modeling: Website Content Clustering Output Organiser (Google Sheets Template)
See all 29 content analysis resources →See all 28 content audits resources →See all 73 coding script or notebook resources →
