I Turned Claude Code Into My Personal SEO Analyst (Here's How)
20:52

I Turned Claude Code Into My Personal SEO Analyst (Here's How)

Semrush 09.04.2026 3 216 просмотров 89 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
What if you could turn AI into your own personal SEO analyst? In this episode of 10-Minute Tutorials, Chris Hanna (Senior Content Editor at Semrush) shows you how to transform Claude Code into a powerful SEO analysis agent—helping you research, analyze, and optimize content faster and more strategically. Instead of using AI for generic outputs, this tutorial walks through how to structure prompts and workflows so Claude Code can function like a dedicated SEO assistant—supporting everything from content analysis to search optimization. Relevant Links - Claude Code setup guide: https://code.claude.com/docs/en/quickstart - This prompt doc: https://docs.google.com/document/d/12Iy66mU496nmy6rdqC9tR5RJHZQ_ximAJpcd6svGyG4/copy - Google documentation for adding users to GSC: https://support.google.com/webmasters/answer/7687615?hl=en - Google documentation for adding users to GA4: https://support.google.com/analytics/answer/9305788?hl=en - Getting started with Semrush MCP: https://www.semrush.com/kb/1619-getting-started-with-mcp - Try Semrush One for free: https://www.semrush.com/lp/semrush-one-free-trial/en/?utm_source=video 🤖 What You’ll Learn - How to use Claude Code as an SEO analysis agent - How to structure prompts for better AI-driven insights - Ways to analyze content and uncover SEO opportunities faster - How to combine AI + SEO strategy for stronger performance - The difference between using AI casually vs. using it strategically - How to scale content workflows without sacrificing quality 📺 Chapters 00:00 - Intro to 20-Minute Tutorials 00:36 - Step1: Install and Set Up Claude Code 04:20 - Step 2: Connect GSC and GA4 10:04 - Step 3: Connect Semrush MCP 12:39 - Step 4: Cache Semrush Data 13:40 - Step 5: Build Your Dashboard 17:07 - Step 6: Download a Report 18:51 - Step 7: Talk to Your Data

Оглавление (8 сегментов)

Intro to 20-Minute Tutorials

What if I told you could talk to your SEO data? Like ask how many keywords a specific page ranks for or find the pages with lots of impressions but no clicks or even find which of your competitors have been building lots of links recently. Well, with Claude Code you can do exactly this and even more and I promise you do not need to know how to code to use it. I'm Chris and in this video I'll give you a step-by-step walk-through to turn Claude Code into your own SEO analysis agent. Let's get

Step1: Install and Set Up Claude Code

started. If you've never used Claude Code before then the first step is going to be to install it. You can do this on Mac or Windows by just following the instructions on the Claude Code documentation website. Now, I'll link that in the description below. It's fairly straightforward but you can also just set it up using the desktop app and that's what I'm going to show you in this video. You just go to the code option at the top of the screen and that will open up a new session in Claude Code for you and you don't need to actually access the terminal but you can still do pretty much everything that you would be able to do with the terminal. Now, if you are more technical or more experienced with the terminal command line whatever, you may want to just use it within that and you can follow this video as if you were using the desktop app. Everything will be the same other than a couple of things where you might need to install things slightly differently like the SEMrush MCP which I'll get to but this is generally less intimidating for beginners. So, I'm going to use this for the purpose of this video. I'll link a SEMrush article in the description that goes through all of the steps in more detail. So, regardless of which method you're using you can follow along and I will also include a document that you can basically copy and paste all of the commands. So, once you're in Claude Code whether you're using the terminal or the app, you're going to want to create a new folder. You can call it whatever you want and you can save it wherever you want. The important part is you're going to ask it to follow this file structure. Now, you can copy and paste this across from the document or just follow screen just now and you just want to basically tell Claude to use this file structure because each of these folders will store either a script that we're going to run. Again, you don't need to worry about coding them. I'll give you them in a second or it's going to be where you're going to store the data or the dashboard that we're going to build. So, fetchers I'll explain them. They're basically going to be snippets of code that Claude will run to get the data from Google Search Console or Google Analytics or Google Ads if you're using that and the actual data folders are just where that data is going to be stored. Now, you can also submit CSVs or whatever method you choose to find the data, you will store it in these files or you'll ask Claude to store it in these files. This dashboard folder is just where your dashboard that we're going to build is going to be stored. We'll get to that soon and then a folder for reports means that you can store reports for you or your clients and access them easily. So, I'll run this and then I will come back. So, about 30 seconds later Claude has created the file structure that we've asked for. You may have to accept a few permissions along the way and this will look different depending on whether you're using the desktop app or the terminal. You can obviously just choose what you're comfortable giving Claude access to. Remember this is an AI agent so you don't want to give it access to everything. It's best to work within a folder that you're comfortable sharing. But once it's done this, it will probably prompt you about the Claude. md file. Now, this is basically a set of instructions or background information you can give to Claude Code about your business, about your website, about what your goals of the project are and Claude will refer to this basically throughout the project to understand what it should be doing with your data and what you want it to do. So, for the MD file you can add pretty much whatever you want. You can think of it as like a brief description of your business. So, think about what the most important information would be that you'd want to give to Claude Code your SEO analyst here. So, I'm going to work with the Traffic Think Tank website which is a SEMrush property that is in the SEO education space. So, you'll see I have just given some information like the domain, type of website, what the goal is. I've listed some competitors, the data sources where we're going to get them from. I'll cover this in a second and some key context, what the blog covers and whether any of that content is gated. So, I'll submit that as the MD file and Claude will just write that to this MD file within the file structure that we have created.

Step 2: Connect GSC and GA4

So, we're going to connect Google Analytics and Google Search Console and there are two ways you can do it. You can connect it via APIs which I'm going to show you how to do in a second or you can just download CSV files of your relevant data and then add them to Claude Code telling it to save it to the relevant file so like data/GSC or GA4. I do recommend going the API route or at least trying it. It will be way more powerful. You can call on the data basically anytime. It will be more up to date and you don't need to keep downloading CSV files every time you want to run an updated analysis but you can just use CSV files if you want. Now, I am no API pro and I managed to do this fairly easily and the SEMrush article that I'll link in the description I do call out some more details than I might go over here just to help you kind of deal with some of the niche steps and use cases that you might come across but it is fairly straightforward and I'll show you how to do it right now. So, the first thing you need to do is to go into Google Cloud Console. Now, you may have never used this before but that's fine. But what you want to do is create a project. So, you'll see here I've got an example project but you can just click new project here, give the project a name and the organization what it belongs to and the parent resource and you just click create. It will take a wee second to create so I'll come back when that's ready. Okay, so that one's ready so I can just click select project and you can see it's selected it here. So, the next thing you want to do is enable APIs. So, you can either search for APIs at the top. You can see I've already done that or you can click APIs and services. You'll then see a big list of the available APIs here. Now, I you can either search through them and connect them here or you can click enable APIs and services and then I would just search for Search Console and then you just click enable to enable the API and then you do the same thing with Analytics. The only thing with Analytics to be aware of is that you don't want to go for either of these two. You the data API and you want to enable that. Next, come back to this main project screen and click on the IAM and admin button. Once this screen loads up, you'll see some information here. What we want to find are the service accounts. In here, you'll see you shouldn't have any yet so you want to click create service account. You'll give it a name. You can call it whatever you want. You'll see it just appear it creates an email address. You can give a description if you want and then just click create and continue. Select a role and here I would go for viewer. You are giving this access to your data so you'll want to be careful what permissions that you are comfortable giving. Then click continue. You can ignore this part for now and then click done and then you'll see here it's added as a service account. It says no keys and the next thing we want to do is create a key. So, we'll go to manage keys under this actions button and add key. We'll go create new key and we want for JSON or JSON and click create. This will create a private key that will automatically download and you can click close. Now, this is a key that you want to keep safe. What you want to do is then go back to Claude Code, upload that key and tell it to save it in the project group. Claude will know what to do with the key especially once we give it the fetcher scripts which I'll show you shortly. So, the next step is to jump over to Google Search Console and add this email which you can find in the service accounts page within Google Cloud Console and you want to give it read access in GSC and then you want to do something similar in GA4 where you're going to add it as a user so that the service account email can basically access the data within each platform. Now, I won't show you how to do that in this video but I'll link to these two documents here from Google that explain how you can add users to each platform if you've never done it before. Now, come back over to Claude Code and paste in this snippet of code which you'll find in the SEMrush article link below or the document link below. This is just going to tell Claude to install what it needs to access the data that we will set up with some scripts in a second and then the next thing we're going to do is create a config file and this is basically just going to give Claude Code some information about the properties that you've just linked. So, for example, you would have your website the domain, the GSC property and then your GA4 property ID and then if you're using Google Ads you would add the customer ID there or your client's ID if this is for clients and then we're going to add competitors as well. You can feel free to pause the video and do something similar here or again, you'll get all of this in the documents linked below. So, next it's even telling us that we're going to start making the fetcher scripts and that is the next step. These use the service accounts that we've just set up to basically pull information from Search Console and GA4 and you can either ask Claude to write these scripts for you or you can copy and paste them from the article or the document that I'll link below. So, I'm just going to copy and paste the ones that I want to use and I'm going to use one for GSC and one for GA4 but you can use it for Google Ads as well. I won't show you how to do that here but that can be really powerful for comparing your organic and paid search results to find keywords that you should or shouldn't be bidding on that kind of thing. You can find more about that in the article that I'll link below. So, I'm just going to paste in some scripts here, hit enter and it will save them to the fetcher folder that we created earlier. So, it will tell you that both fetchers have been created. They both expect this JSON file because I haven't but if you've added it already, you won't be asked that and then you can paste in something like this basically just asking Claude to verify that it can access the data and you can just have a skim through it and make sure that it's pulling the correct data. If there are issues at this stage then it's a lot easier to fix them now than later down the line but copying and pasting everything in shouldn't be any issues. So, you can see here I asked it to give me a summary of what we know and it spits out the summary correctly. Tells me that it's from the last 3 months of data and yeah, just gives me some insights here. So this tells me that it can read the data, which is great.

Step 3: Connect Semrush MCP

So moving away from Google sources of your data, we're going to look at how you can connect SEMrush. Now, you do this through what's called the MCP, which stands for model context protocol, and it's basically a way for Claude Code to speak to the SEMrush interface and allow data flow that you can then use and speak to effectively. Connecting the SEMrush MCP and giving Claude Code access to not just your first-party GSC and GA4 data, but also a wide range of SEMrush data points. It just makes for some really powerful analyses that I will get to a bit later on. And so it's well worth setting us up if you have a SEMrush subscription. You get access to the MCP on all SEMrush SEO classic subscriptions and all SEMrush one subscriptions. And you'll get a bunch of API units to use as well. If you're using the terminal here and not the desktop app, it's just a case of entering this into Claude Code as a command and then calling the MCP command, selecting SEMrush, and then going through the authentication workflow. If you're using the desktop app though, it's just a case of coming down here, going to connectors. You'll see I've got SEMrush MCP there, but you go to manage connectors. And then you will go to the plus button again, add custom connector, and here you will just paste in the name of the connector, and then you'll paste in the MCP remote server URL here, which you can get from the description or you can use the documentation. It's fairly straightforward. And then you just click add. Once you've done that, you will have access to it as a connector, and you'll be able to turn it on and off from here. So just like we did with the GA4 and GSC data, we want to confirm that Claude Code is able to access it. So we'll just paste in something like this and hit run. Once that's done, the tool will provide, in this case, the top 10 organic keywords. And you can see it's got position, volume, keyword difficulty scores, and ranking URLs, all taken from SEMrush. So that's great. That's working. Now, at the time I'm recording this video, the MCP connection doesn't yet pull in data from the AI visibility tool kit, but you can export data from that tool to be able to use it, and that can be really powerful for kind of cross-analyzing your SEO performance with your AI visibility performance. So you can just net over to SEMrush and go into one of the reports for your domain. You just enter at the top here, and you can use any of these reports that you want, but the visibility overview report lets you see all the prompts that your site is ranking for. And you just click export and then you'll be able to upload that file to Claude Code and explain that it's for AI visibility. It will be able to understand the CSV and what everything means, and you can then basically ask questions about your SEO visibility and your AI visibility.

Step 4: Cache Semrush Data

So back in Claude Code, the next stage is to cache some of the SEMrush data. We'll do that so that when it comes to building the dashboard, Claude Code already has a bunch of data that it can use to populate that. You can call via the MCP for various things, and I'll show you how to do that soon, for specific questions you want to ask, but it's a good idea to, yeah, cache some data to begin with so that it has like a baseline to build that dashboard and then any reports. So you just paste in something like this, which I will include in the document and the article that's linked, but you can ask for whatever you want here. I do recommend keeping it to, you know, reasonable numbers because the more you ask for here, the more API units you'll use, and also the more context window that you'll use each time Claude has to access the data. So the more important aspect there is probably the API units, but it's worth considering you don't necessarily want to ask for all keywords globally. So you'll see it's spat out some information here in terms of what it has cached to be used for our dashboard. So that's the fun part next is actually building your dashboard.

Step 5: Build Your Dashboard

Now, with a single prompt, Claude can build an entire web app based on the data that you have here, and it's a really useful way to visualize the data both for yourself, maybe for clients and stakeholders as well. Now, you can ask for anything you want here in terms of the dashboard you want to create. I'm just going to paste this in. It's a pretty good start, and you'll get access to this via the doc linked in the description or the SEMrush article. This will give you five tabs that cover most areas of SEO analysis in terms of the basics that you would want it to cover. But again, I encourage you to get creative here. So just hit enter, and the prompt is ready to go to tell Claude exactly what you want it to create. I just want to caveat this with the fact that this took about 15 minutes to create. The first time I ran this with a different site and a different setup, it only took a couple of minutes for the dashboard to come together, and that was great because I couldn't have put that kind of dashboard together myself in a couple of minutes. I couldn't put this kind of dashboard together myself in 15 minutes either, but it did get stuck. It took about 10 minutes, and it was showing me the token count that it had risen up beyond like 5,000, and I figured, right, stop. That's obviously not working, and tried it again, and it was again rising to that level, but then you can see this message here. It said, "Now I have everything I need. " And I thought, "Okay, at least it's ready to go. " So again, you may have to experiment a little bit here. If you find it's taking longer than maybe like 4 or 5 minutes and nothing seems to be happening, it could be worth stopping it and restarting it just to make sure that you're not wasting tokens on something that is not going to produce an output. So just to be aware of that. So once Claude has built the dashboard, it will tell you what it's built, and the next stage is to run it on your local host so that you can access it in your browser, and you can do that by just pasting in something like this, and it will tell you that the server is running, how to stop it if you want to stop it. Now, if I switch to that window, you can see here is my dashboard. Now, you can see total clicks, impressions, things like that, but then you'll also see SEMrush data, estimated traffic versus competitors, and you can hover over it, and it's fully interactive. And if you come down to the striking distance keywords, which are keywords that were ranking in positions 5 to 20, and therefore are potentially our easy wins, you can then sort them either by clicks within GSC or search volume, keyword difficulty to try and find the keywords that are potentially the easiest ones for you to rank for. And then you have these other tabs for competitive gap, content performance, and backlink profile. And so you can see this really interesting information is being pulled across from SEMrush, all with one prompt. And to share it with a client, you can easily just set up a project within something like Vercel or Netlify. I won't go into the details of that here, but you could probably even just ask Claude Code to help you with that setup or to point you in the direction of how you would set that up so that you aren't just running it on your local host, and instead you can share it with team members, stakeholders, clients. All of that stuff is fairly straightforward. Now, this is super impressive, and it is really easy to set up compared to the kind of work that this might take to do manually, but it is still created with an LLM. So you need to be vigilant with the data that you're sharing, and before you share any of this with stakeholders, clients, or before you act on any of the data here, you need to validate it. You need to go through and make sure it all makes sense and the numbers are being pulled from the right places. You don't want to make decisions on data that is either hallucinated by the AI or if it's drawing conclusions that are inaccurate, you don't want to act on that data. So just always be extra careful.

Step 6: Download a Report

So now for a few quick things you can do beyond just the dashboard. First of these is to generate a report. Now, you can paste in prompt like this, which you can get from the doc or the article linked below, and this will provide an outline for a report that you want Claude Code to generate, going from everything from an executive summary all the way through to competitive benchmarking, backlink opportunities, all of that kind of stuff. And you can ask for it in pretty much any format you want. I recommend going for a Word doc cuz then you can maybe save that to Google Docs, and then you can work in it and edit it before you send it to clients, that kind of thing, quite easily. Just like with the dashboard, I encourage you to get creative here. You can ask for pretty much anything you want. So you can see here Claude Code has produced the final report, and there's a whole load of information here, and you can see where it's saved the report to. I saved that docx file, and I opened it up with Google Docs. You could reformat this to look however you like, but I think as a starting point, things like executive summary and quick wins and things like this, again, formatting not perfect, but it's a really good start and something you could build on or tweak, customize if you were using this internally or if you were going to send it on to clients. Obviously, if you are going to send this report on to clients or stakeholders or take action on it yourself, you just need to make sure that the data is all making sense, validated, not being hallucinated, that kind of thing. In terms of producing this report, I did have to ask Claude a couple of times what it needed to produce a Word doc because the first time it tried to do it based on this prompt alone, uh started asking for a whole load of permissions, tried to access a whole load of data that I didn't think it needed access to. And so I stopped the process and asked what it needed to generate the Word doc. It then listed this out. Now, I'm not an expert. You should take caution whenever you're just telling Claude to do things based on what it's telling you is correct, but I just said, "Do that," and it managed to spat out the report.

Step 7: Talk to Your Data

The next way you can use this setup is arguably the most powerful way to do it, and that is to just talk to your data. And like I said in the beginning, that is exactly what you can do with the setup with Claude Code and connecting it to your GSC and GA4, and then combining that with SEMrush data. You can just paste in prompts like this one. We're going to get it to read the data from GSC specifically, find queries for our domain where we're ranking okay, but not great, and we are bringing in an impressions, and we want to combine that GSC data with SEMrush keyword difficulty and search volume data. And the idea here is that we will find keywords that we should be able to rank for based on the keyword difficulty information pulled from SEMrush. So once that was complete, Claude Code gave me a summary here of the 64 easiest wins for Traffic Think Tank, again based on the information that I gave above. Now, this is just one example of what you can do whenever you just speak to your data. It really is very powerful, and you can ask for anything that you want. I would suggest focusing on analyses that would take you a long time to do manually because that's where the time savings really are here. You still want to verify the data at every stage, but to get directional information this quickly based on the vast data sources that you can connect is just a really powerful way to speed up your overall SEO workflows. In the doc that I'll link in the description below, there are five of these analysis prompts that you can try for yourself. Again, just subbing in your domain and anything that you specifically want to get back, but you can really get creative here. So, use these as a starting point, but I really encourage you to experiment. By connecting Google and Semrush data to a tool like Quad Code that you can build and interact with, you can perform some powerful SEO tasks much faster and with much more flexibility than you ever could before. If you already have a Semrush One or Semrush SEO Classic subscription, you can start doing this immediately via the MCP. If you don't have one of these subscriptions yet, you can sign up via the link in the description below. Thanks for watching, and I'll see you in the next one.

Другие видео автора — Semrush

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник