Machine Learning for SEO

Lazarina Stoi and JC Schwinnach explain how to apply machine learning to SEO, from traffic forecasting and keyword clustering to entity extraction. Start with a concrete project, clean your data, and validate with train-test splits. Avoid over-engineering and fine-tune pre-trained models rather than using them raw.
Chapters
Welcome to a new edition of Crawling Mondays. In this case, it is dedicated to a topic that is very, very exciting for me, machine learning for SEO. And to cover and go through this very exciting and technical topic too, I have a couple of people who have a lot of experience in this field. On one hand, I have Lazarina Stoi, Senior Manager of SEO and Data Science At Intrepid Digital. Hello, Lazarina. And on the other hand, I have JC Schwinnach, SEO strategist at TripAdvisor. Hello, JC. I'm so very excited to have you both here. Before starting our conversation though, I want to thank our today's episode sponsor, which is Content King. Content King is a real-time SEO crawling tool that will identify whatever something goes wrong on your website right away and alert you. To fix it as you should. So take a look at content curation on the link here below. And now to start the conversation, machine learning is a field within AI focusing on using data and algorithms in order to replicate how humans learn. I'm pretty much sure that all of you have learned about BERT, for example, which is Google's machine learning algorithm. But to explain more about machine learning, machine learning and more specifically machine learning within SEO, I want to start the conversation asking JC and Nazarina, what is machine learning within SEO and what are the best examples to understand machine learning and SEO and the capabilities within SEO?
Machine learning is really relevant to SEO because it's the same similar mindset. It's using data to train computers to make predictions. And essentially the role of the data scientist is to maximize the accuracy of those predictions. Like making more accurate with less computing costs. So it's a lot surrounding the data, a lot surrounding making it efficient. And SEO has that kind of mindset doing the same kind of things. We're trying to make things more efficient, higher quality, and better predict the outcome of what we're actually doing. And there are many, many models we can use. So models, to put it simply, is just statistical formulas that are applied on subset of data. So you're trying to compare models to achieve the higher prediction over time. And how it's useful to SEO really is because whatever kind of data, you can find some kind of model that fits with your data and make some kind of predictions. So you can make text predictions. So this is called natural language processing. You can make clustering prediction. You're trying to group keywords or group pages or group whatever together using machine learning models. And you can do a lot more things like predicting photos based on text. So you have stuff like DALL-E that right now is really up and coming. People are generating images using text. So this is— yeah, so it's all about taking data, making predictions, even traffic forecasting too.
There are more and more tools available to us SEOs that Pretty much this is what they leverage, right? Like we input the data to pre-train the model with our historical traffic and they tell us what we can expect in the future of our organic search traffic. Can you please also tell us a little bit which are the steps that we can take to start leveraging machine learning for SEO?
So in terms of steps, I think something that's very important to start off with is like JC mentioned, first of all, understanding what machine learning can and can't do and what are the different areas that machine learning is good at. For instance, we know that machine learning is good at recognizing patterns and large corpuses of data. We know that potentially if we're working with a very big website, it will be able to give us a lot of different insights that we wouldn't really be able to get if we are just manually going through pages or like getting insights on search results that we are doing an analysis for when you're working with a big enterprise website, this is the perfect place to start, is using a model to kind of bridge down the gaps between your understanding and what is actually observed by companies like Google or other search engines. So I think the first step is definitely understanding what machine learning can do and understanding a little bit about the main models that have been created. And even if not the models specifically, the areas where machine learning is best applied— is it processing text-based data? Is it processing numeric data? Are you making a prediction? Are you trying to extract insights? All of these things can take you in a very different direction. Also, if you are training a custom model, how do you do that? Are you going to use data to assess the performance of the model, or are you going to just let the model do its thing? Like, those are different strands of machine learning. So I think starting with a little bit of theory is important. And then my next big advice would be just to find a project that you're really passionate about, because when you're working on something that you to see the end result of, and you're not really that stressed for time, you can learn a lot of different things and you might test out something, it might be the wrong thing, but then because you want to make this work, you will try new things. You might find coding alternatives, you might find no-code alternatives, you might go into like a separate avenue and find something that really works for you. So I think working within your means and not trying to do everything all at once, but also gradually making progress every day is very important.
I love that you have covered this from a conceptual standpoint rather than going directly to the coding part, because I do believe that a lot of people think that, oh, I need to learn Python first in order to be able to even try to develop anything that leverages machine learning. But I know that there are also no-code alternatives, for example, BigML, obviously .ai. So there are a lot of platforms out there.
I would bring an additional point into the steps is you absolutely need to know how to process data. You need to be able to clean your stuff out because if you bring garbage in, you're bringing garbage out all the time. So you need to clean your data. Like, you can have all the best models. If you bring in crap in, in, you're gonna have a bad result. So you need to learn how to visualize your data, understand, okay, what are the areas where it can fail, and you want to clean that out. You want to backfill missing data like this. It happens all the time. You're missing data or you're— it's broken for some days or whatever. You need to be able to assess that and fix it.
I was actually learning a little bit about the challenges and I saw that some of the biggest challenges is that people start using pre-trained models by default and sometimes they actually only really work when the labels and features match what you actually have in your dataset. So you need to do a little bit of fine-tuning and many just like take it as it is. So it's not necessarily like the ideal type of circumstance and the output might not be necessarily good. Can you please share a little bit more about those necessary steps to validate well that you're doing the right thing? Because this is something that I will be very nervous about.
So one of the best things to do, and this is more in the coding sphere, but if you're not, let's say you're not a programmer at all, you can take a small, really small subset of your data, try to run it, understand what's going on, because you don't want to run all your data on the model. You're wasting time, energy, and the environment as well. Electricity usage. What you want to do, you want to run that as a small model, try to understand it using visualization of data. So you can use either Analytics or whatever, Data Studio. You can do your own dashboard, try to understand how your data is structured and find where you're missing data. That's the biggest piece, is missing data is always there. And then you want to complete that. Do you need all the data? Because Sometimes you want to put everything and you say, okay, I have all my data now. It's better if I put everything, but that's not true. You can add too much data and that data will break your stuff. So if you want to predict your SERP ranking and you're introducing, for example, the color scheme of your website, does it in fact— and you put that in, it's heavily weighted in your model. You may have the wrong prediction about your SEO traffic because you just looked at CSS values for it. So all these stuff are really important to learn how to clean it. And in order to understand it, if you go into code sphere, I would say look at scikit-learn train_test_split. So the way it does, it's you take a training set and then you want to predict the outcome of the data that you have in your test set. So you're predicting and then you're comparing before and after. But the reality is you're looking at what you would expect and what is reality what is happening in real time, and then you compare this, then you can have the accuracy of the, your model. This is called precision recall score. So you're trying to increase the precision of what you've done. So yes, scikit-learn train test split is the best way to kind of test your experiment on your model. And that's like basic data science that can help you improve your model over time.
This is amazing. You have mentioned fundamental steps to take to start. Let's go through the most common scenarios for forecasting or content clustering within SEO and the tools that you will use for them or platforms to use if you know how to code and no-code alternatives.
So I think JC is really talking about the numeric component of data science, whereas I can chime in a little bit more on the NLP side of things, because I would say that that's definitely my strongest suit. In terms of getting started and finding the opportunities where you can do NLP in SEO, that is definitely a lot of different things that you can do. Starting with a very simple, very common task that is in the ML world or data science world, you can do sentiment analysis and that could be involved in partially in processes like online reputation management. You can do entity extraction. Entity extraction is quite important when you're doing internal linking work, when you're trying to understand what entities are shown in the SERPs, what entities your competitors are talking about, building your content strategy. You can also do things like content clustering, like you mentioned, topic modeling when you're doing internal linking work, when you're trying to understand what content gaps exist on your website or maybe on your competitor websites. All of these different things can also be implemented in building out a YouTube strategy or like content calendar for a client. So there's definitely a lot of opportunities that you can implement machine learning or data science in, which don't necessarily involve that much coding because the beauty about this, all of the things that I mentioned, is that the big kind of giants in machine learning companies like AWS or Azure for Microsoft and Google Cloud, they already have APIs that are available for doing these tasks. And so I'm always like a very big advocate of you don't really have to start with learning the entire theory, learning how to build a model from scratch, because I think that if someone starts doing that and they get hung up on a 7-hour Python course or a machine learning A to Z. Most people quit after the second lesson because they're kind of overwhelmed. Whereas I feel like if you start backwards from the project and working your way backwards, somewhere along the line you will see, first of all, how quickly and how powerful it is to use an API that's already there, like Natural Language API or Vision API or whatever else it may be to help you with your project. And you don't even have to be as knowledgeable in coding. You have to be knowledgeable in troubleshooting, absolutely. So you need to know how to read Python code. You need to know how to, like, what this particular snippet of the code does, how it's structured, and how to troubleshoot it if something goes wrong. But beyond that, you just have to know when and where to apply it. And something else finally that I want to touch upon that I think is very, very important, there are cases where you shouldn't jump into machine learning as the option, even though it is readily available for you, especially with things like, let's say, forecasting, when it's a very important forecast for the business, when it's something that is really, really important for senior stakeholders. If it's a very high visibility, high profile case, if you wish, machine learning might not be the best option to do that. You might want to have different systems in place. that can help you to identify the mistakes in that model. And you will have to see if it's something that is a deal breaker if that goes wrong. If it impacts many different layers of your strategy, then maybe machine learning might not be the best option to do that, especially if you're a beginner, you're not really sure what you're doing. If you're an absolute beginner, you can start with Google's sentiment analysis and NLP API that's available. They already have code that you can implement in Google Sheets, so it could be as as simple as just adding an Apps Script to your Google Sheets spreadsheet that you have. The data that you need could be anything like maybe first-party collected data like form responses. It could be something like analyzing the titles of your competitors whenever you are doing assessment of how your company is being talked about on third-party sites. And then you can very easily see, first of all, what entities are mentioned there using that API. And you can also see the sentiment related to those entities. So for instance, if you form analysis and people completing a purchase leave feedback about how they found the site, what they liked about the service, whatever else it may be. You can get that feedback in a spreadsheet, run the script, which is already built for you. You don't have to train a model, you don't have to do anything fancy there, and that will pull out the main entities. So for instance, people talk positively about customer service, but they talk negatively about price. That's just a very quick use case about how you can get started doing this.
Amazing. It was like a couple of years ago that Andy Chadwick developed this very nice article in Search Engine Land. I remember how you can leverage BigML without any code at all for keyword clustering. And he showed like all the steps that you needed to get the training data, to training the ML model directly there. So I will highly recommend to take that article too, to get started in a very actionable, straightforward way. What would you recommend, especially if you already know a little bit How to code?
The simplest way to start is with entity, like understanding entities from your website is a simple way that you don't have to put in production but can give you a lot of insights on your data and that doesn't impact the user, right? So the earlier you are in the process, the less you want to touch the end user with what you're doing. So doing some clustering, it's all about understanding your data. You don't want to jump in content generation and put it on production right away. You're going to like— there is one big thing you have to really be careful is if you generate stuff with machine learning, whether it's internal linking, whether it's content generation, you add complexity to your site over time and over time it's hard to debug. And then your SEO have a hard time. Like what is working? Everything is machine learning generated. Nothing. You cannot debug anything. And over time you're losing SEO. But that being said, you can do Entity Graph. You can generate structured data for your site, the alt tags for your website. Just be careful. Use Google Search Console, use Google Analytics, try to extract all the stuff you can and generate your own label. Like, can you identify what page is crap or what page is good on your website? You can use index report from Google Search Console and label the pages based on whether it's always 500 or whether it's like crawl currently not indexed, you could say. Crawl currently not indexed, not good enough. And in that case, you would say those would be your label that you can use to train and cluster pages. And that way you could say, okay, now I have a sense of what pages are bad on my website. And you can start using machine learning like scikit-learn to cluster those pages and get an understanding of what features on your site make a page currently not indexed by Google. So that's code-wise. Otherwise, you can use those same kind of label on tools that are available. A lot of the— like, if you look at Charlie Wang, he's building a lot of machine learning apps using Streamlit, and you can look at what he already has.
Like, there are many of those apps that are already available that you can just input your own Search Console data and get that understanding of what's Yeah, there are many of those are open source for you to go and take a look at how it works and how you can leverage that to create your own.
I don't use a lot of no-code, but in Python, spaCy is really useful for natural language processing. They have a whole documentation on how to extract entities from text, and it's really easy. Like, you can go through it, and even if you just know bare minimum of Python, then you can do a lot of things with spaCy. Learn, use spaCy to start generating your entities. So this to me is, is really simple. You can use DALL-E for your fun generating images, trying to understand these, not too complex either. Otherwise, the most useful I would say is you want to learn the K-means model in scikit-learn, TF-IDF. You want to learn spaCy or NLTK for natural language processing.
Mine is a little bit different. So my little suggestion for anyone that's just starting would be just try to understand what are you trying to achieve, and then a little bit research in terms of how what you are trying to achieve translates into machine learning terms. So for instance, if you're generating meta descriptions, how would that task be described by machine learning folk? So it would be text generation. It would be unsupervised machine learning. And then once you have that description in you, and that could be applied to anything like forecasting, entity analysis, you name it. Once you have that description, you just have to find the resources and guarantee you for most of the tasks that most SEOs are doing, there would be a Colab, Google Colab notebook that is super, super easy to get started with, even for a beginner, because you just have to input your data. You have to perhaps do a little bit of troubleshooting, but other than that, you'll be good to go with something as simple as that. You wouldn't have to start from scratch. Imagine you've never done keyword research before and you're just starting out as a beginner. You would most likely start with a template that someone has already created and try to build on top of that for your custom use case, for your client, and so on. So why do it any other different way when you're trying machine learning? So my suggestion would be always look for Colab notebooks because they're super easy to get started. You don't need to install anything on your machine. Streamlit apps Like JC mentioned, there are super good alternatives as well. Lee Foote and Greg Bernhardt also create really good apps. So I just wanted to give them a mention here.
Yeah.
Use VM Studio when I am running code on my own machine. There's also a number of different apps that you can use that are in Hugging Face, Streamlit. So depending on the task that I'm doing, I might start off with a resource that someone has created, or I might start off with a code snippet doing what I'm trying to do and then build the code around it to align with my personal task that I'm trying to complete. Definitely one other resource that people should frequently reference when they're doing any sort of coding, Stack Overflow almost always will have that response.
To start wrapping up, what are the actionable tips that you will give to people to start with machine learning? In my case, I actually have to say that I was very impressed with Google Machine Learning courses that they do have. Also like leveraging the TensorFlow APIs, the TensorFlow Hub too. There are a lot of these huge repositories with pre-trained models too. So if you're starting even from a conceptual standpoint, they have this really good course of how to frame machine learning projects and to validate what Lazarino mentioned, if this is something that actually makes sense to do with machine learning or not.
I would definitely say start with a little bit of theory just to understand the basics of data science, machine learning. What models are out there? Just take a general understanding and then start with the specific project that you have in mind and work your way backwards. That would be my tip for beginners, especially starting out with SEO tasks.
I would say Google Colab. You don't have to install Python. You can start with that. It is preinstalled and you have a lot of packages. Again, follow the people that Lazarina mentioned. You're going to learn some packages. It's coming anyway, machine learning. And next, Look into your data and start visualizing your data, like especially entity. Like start with entity stuff with spaCy. Try to make graph of your entities on your website. You're gonna get an understanding of how text processing is being done. It's really useful for SEO. So I would really start with NLP first, understand this, then clustering.
Thank you, thank you very much, JC and Lazarina. I really appreciate Your input today, and thank you very much for watching today's edition. If you liked today's edition, remember to like the video and subscribe to the channel. Thank you very much. Bye bye.
More from Aleyda

How to Communicate and Sell AI Search Optimization (GEO, AEO, LLMO) to Decision Makers

AI Search Optimization (GEO, AEO): What is it, Common Errors & How to Optimize AI for Success

OpenAI has introduced shopping research in ChatGPT - #SEOFOMO TL;DR December 1st, 2025

OpenAI announces Instant Checkout and the Agentic Commerce Protocol - #SEOFOMO TL;DR Oct 6, 2025

Google's August 2025 Spam Update Finished Rolling Out - #SEOFOMO TL;DR September 29, 2025





