Tools & Platforms
FuzzyWuzzy/RapidFuzz/PolyFuzz
In shortPython libraries for fuzzy string matching. RapidFuzz is the fast default, TheFuzz is FuzzyWuzzy's successor, and PolyFuzz compares several matching models.
FuzzyWuzzy, RapidFuzz and PolyFuzz are Python libraries for fuzzy string matching: scoring how similar two pieces of text are when they do not match exactly. SEOs use them to match old URLs to new ones, map keywords to seed terms and compare queries with page titles. They bundle the matching algorithms for you, so switching from one method to another is often a single line of code.
How it works
- RapidFuzz is the current default. It is MIT-licensed, written in C++ and provides the familiar scorers (
ratio,partial_ratio,token_sort_ratio,token_set_ratio,WRatio) plus raw distance metrics such as Levenshtein and Jaro-Winkler. Itsprocess.cdistfunction scores every string in one list against every string in another in a single, multi-threaded call. - FuzzyWuzzy was the original library from SeatGeek. It was renamed TheFuzz in 2021 and the old repository is archived; TheFuzz keeps the same API and now uses RapidFuzz as its engine. Use it to keep older scripts and tutorials working.
- PolyFuzz, by Maarten Grootendorst, lets you run and compare several matching models at once: edit distance, TF-IDF on character n-grams (its default) and embeddings. It can also group similar strings.
How it’s used in SEO and marketing
- Redirect mapping during migrations and for 404 pages, matching old URLs, titles or H1s to the closest live page.
- Keyword-to-topic mapping against a list of seed terms.
- Metadata optimisation: comparing the queries a page ranks for with its title, H1 and description to spot mismatches.
- Content gap analysis between your keywords and competitors’.
- Data cleaning, such as matching misspelled brand or product names.
Example
In MLforSEO’s redirect-mapping practical, the same crawl of a large blog was matched with PolyFuzz, RapidFuzz, Levenshtein and FuzzyWuzzy. PolyFuzz gave the best mappings on that dataset, RapidFuzz was acceptable, and the plain Levenshtein and FuzzyWuzzy scores were weaker, partly because of how each library normalises its scores. The lesson: compare outputs on your own data before choosing a default.
Limitations and things to watch
- These scores measure spelling, not meaning. “Trainers” and “sneakers” score poorly; use embeddings such as Sentence-BERT when meaning matters.
- Libraries differ in what a score means. A normalised
fuzz.ratiocan rate HARD/HARDER above HARD/HAND, so check which scorer you are using before setting a threshold. - Always review a sample of matches near your threshold by hand before shipping redirects.
- Fuzzy Pandas, once common in tutorials, has been unmaintained since 2019.
Learn it on MLforSEO
- What Fuzzy Matching Is, and Where It Fits in SEO
- 404 and Redirect Mapping with Fuzzy Matching in Google Colab (Python)
- How to Automatically Optimize your SEO Metadata with FuzzyWuzzy and OpenAI in Google Colab
- Automated Redirect Mapping with Triple Fuzzy Matching for Site Migrations (Notebook)
- The Introduction to Machine Learning for SEO course, which has a full fuzzy matching module
Sources and further reading
Other terms from Tools & Platforms
- Apps ScriptGoogle's cloud-based JavaScript platform for automating Google Sheets and other Workspace apps, often used to…
- BigQueryGoogle Cloud's serverless data warehouse for storing and querying very large datasets with SQL, including Sear…
- Claude (Anthropic)Anthropic's family of large language models and AI assistant, used for writing, analysis, coding and agentic w…
- Data StudioGoogle's free dashboard and reporting tool, renamed back to Data Studio in 2026, used to visualise SEO and ML…
- ElasticsearchAn open-source search and analytics engine for indexing large amounts of text, with fuzzy, phonetic and vector…
- GensimAn open-source Python library for topic modelling and document similarity, best known for LDA, LSI, word2vec a…
- Google CloudGoogle's cloud computing platform. For SEOs it hosts the ML APIs used most often: Natural Language, Knowledge…
- Google Cloud AutoMLGoogle's tools for training custom models without writing model code; AutoML for text was retired in Vertex AI…
- Google ColabGoogle's free, browser-based Python notebook that runs code on Google's servers, so you can use ML scripts wit…