
Search intent is the thing every SEO claims to optimise for and almost nobody classifies systematically. We eyeball a keyword, decide it “feels” informational, and move on. That works for ten keywords. It falls apart at ten thousand, which is exactly the scale at which AI search operates when it decides what a query really wants and which sources deserve to answer it.
So this post is about doing it properly, with machine learning. I am not going to hand you the scripts here (those live in the course, and I will be honest about why), but I am going to walk you through the full landscape of approaches so you understand what each one does, where it shines, and where it quietly misleads you. There are three families, and the best practitioners combine them.

Approach 1: Rule-based classification from the query
The most accessible approach classifies a query using rules, expressed as IF-else and regex logic. In its plain form this is not machine learning, but it becomes rule-based machine learning once the program learns or evolves its own rules. You can build a genuinely useful version in Google Sheets in an afternoon, then visualise it in Looker Studio.
What makes this powerful is that a single query carries far more than one “intent”. You can classify it along many dimensions at once.

Beyond the six above, the same rule-based sheet can flag whether the query is device-relevant (mobile-specific), whether it carries an implicit problem or struggle (“how to fix”, “won’t”, “can’t”), and its context (urgency and mood, so “fix printer now” reads differently from “printer troubleshooting”). Each dimension is a regex pattern you can read, audit and adjust, which is a big part of the appeal.
The catch, and it is a real one, is that intent is expressed differently in different industries. Transactional intent in ecommerce (“buy”, “price”, “coupon”) looks nothing like transactional intent in SaaS (“demo”, “free trial”, “API key”) or services (“book”, “consultation”, “portfolio”). A generic keyword list will quietly mislabel a chunk of your data. The fix is to turn your hardcoded lists into dictionaries you customise per niche, and to refine your regex for plurals, typos and word boundaries.
Macro versus micro intent
Here is the nuance most classification skips, and where it gets genuinely interesting for a brand. Standard classification flattens a lot of queries into one bucket.

“Best sneakers for kids” and “Nike Air Max low-midi kids white online discounts” both get labelled commercial or transactional. But for an ecommerce brand they mean completely different things. The first says “I know roughly what I want and need a nudge.” The second says “I have done my research and I have precise conditions.” Micro-intents like this are brand-subjective, and the previous approaches miss them. You reverse-engineer them using n-grams and word frequencies across your own query set, which is the kind of step-by-step work the course walks through.
Approach 2: Classification from SERP features
The second family is my favourite for effort-to-insight ratio, because it lets Google do the hard part. Instead of guessing intent from words, you reverse-engineer it from what actually ranks. Export your keywords and their SERP features from any keyword tool, and map each feature to the intent it usually signals. A featured snippet and People Also Ask lean informational; shopping and product results lean transactional. Coded into a dictionary and a short Python function, you get an intent split for thousands of keywords in seconds.
It works because it reverse-engineers what Google has already decided the query is for. And you can layer it: classify intent by the type of pages that rank (resource pages point to informational intent, company pages to navigational, product pages to transactional), or at broader scale by the domains that rank, building a dictionary of holistic intent per site across the top domains in your niche. Combined with the query-based approach, it captures nuance with remarkably little research effort.
Approach 3: ML-assisted classification
The third family brings in actual models. ML-assisted classification uses machine learning to identify intent automatically, often combining classification, query semantics, entity extraction and word embeddings into a single label. Two approaches are worth knowing in detail.

The transformer-based approach uses a zero-shot classifier to label queries against your intent categories with no training data. On a GPU it is very fast, under three minutes for roughly 1,700 keywords, but less accurate out of the box because it leans on a pre-trained model; fine-tuning improves it. The semantic parsing approach is where it gets clever. Instead of treating the query as a bag of words, it runs entity extraction and uses the results as weighted signals: entity types (CONSUMER_GOOD, PRICE and PRODUCT push toward transactional; ORGANIZATION and URL toward navigational), entity salience (more prominent entities count more), entity sentiment, the actual entity names, and how entities relate to the main verb. It accumulates evidence across all the entities in a query rather than flipping on a single flag. It is slower, three to five minutes for the same set, but noticeably more precise.
That entity-based method is a preview of a whole module still to come, and it is a good example of how these techniques stack. Classification, entity extraction and embeddings are not competing approaches; they are ingredients.
Why I am not giving you the scripts here
I want to be straight with you about this. Everything above is the “what” and the “why”, and I hope it is genuinely useful on its own. But the four Python scripts, the ready-to-use Google Sheets template with every regex formula built in, and the annotated Colab notebooks that turn these approaches into something you run on your own keyword export, those are the paid part of the work, and they represent weeks of building and testing.
Get the full practical
The complete search-intent practical, four Python scripts (rule-based, SERP-feature, transformer, and semantic entity-based), the Google Sheets template with every formula, and the walkthrough notebooks, lives in the Introduction to Classification module of the course.
Where to start today
If you want to build intuition before you go deeper, start with the concepts. Read what search intent actually is in a semantic keyword workflow and how to use SERP feature analysis, since both underpin the approaches above. And if you have never run a classification before, our free Text Classification with Google’s Natural Language API guide is the gentlest possible on-ramp. Then come build the real thing in the course.
Related glossary terms
MLforSEO Academy
Take your skills further — pick your path
Semantic ML-enabled Keyword Research
by Lazarina Stoy
Query understanding, search intent and semantic clustering for how people and AI really search.
View course →AI Search Optimisation & Agentic SEO
by Beatrice Gamba
How agentic systems retrieve, evaluate and select — and how to become the source they cite.
View course →AI Search, LLMs, Entity SEO & Knowledge Graph Strategies
by Beatrice Gamba
Build the entity authority and knowledge-graph presence that makes AI recognise and trust your brand.
View course →Introduction to Machine Learning for SEO
by Lazarina Stoy
Ship practical ML workflows — classification, clustering, entity extraction — no CS degree required.
View course →




