3 Ways Claude Code and SE Ranking API Scale Agencies
An SEO agency automates three time-consuming workflows using Claude Code, SE Ranking's Data API, and n8n: an AI visibility lead magnet that qualifies prospects, a branded client audit deck generated automatically and sent via email, and a monthly PDF report with live SEO metrics that lands in client inboxes without manual work.
Each tool eliminates hours of repetitive tasks—pulling data from multiple sources, formatting reports, and building custom presentations—while delivering data-driven insights directly from SE Ranking's API.
The entire pipeline runs once built, freeing agency teams to focus on strategy instead of busywork.
Most SEO agencies are still doing this manually. Pulling data from five different tools. Building the same SEO audit deck before every pitch. Formatting the same report every single month. It’s hours of 'work about work' before you even get to the strategy. And here's what we did. We took three of the most time-consuming workflows in agency work — lead generation, client SEO audits, monthly reporting — and vibe-coded tools that run them automatically. Using Claude Code, SE Ranking's Data API, and n8n for autosends. And together, they make up one complete agency workflow. The first tool is an AI visibility lead magnet that brings in new leads. The second one is a client audit deck — a full domain analysis that gives prospects a clear picture of where they stand and what needs to happen next. Generated and sent out automatically with n8n. The third tool keeps these hot prospects
around with automated branded reporting. So let's get started with the first use case. Let’s imagine you’re running an agency. You offer SEO, social, AI search optimization services—maybe all bundled together. And right now, your goal is simple. You want to bring in more clients. But when someone lands on your site, you’ve got maybe 10, 15 seconds tops to show them why they should care. And “book a call” just isn’t enough anymore. So what do most agencies do instead? They offer some kind of free audit. But if you’ve tried this, you know how it goes. Either it’s too basic to impress anyone, or it takes your team way too much time to put together. And even with AI, you still end up stitching things together manually—pulling data, formatting it, trying to make it look custom. Not exactly what you’d expect, considering the AI-first world we’re living in.
So instead, you can build something like this. A free tool that acts as your lead magnet. Let’s say you want to show your prospects whether their brand is showing up in AI search. A user lands on the page, enters their domain, picks a country, chooses the AI engines…and clicks ‘Analyze’. Now behind the scenes, the tool does a few things automatically. First, it calls SE Ranking's Data API to find the top five organic competitors for that domain. Then for each of those domains, including theirs, it checks how often the brand shows up across the selected AI search engines. Then it pulls AI visibility metrics for every domain across every selected engine. So there's quite a lot going on in those 20 seconds. From the user’s side, it feels simple. They hit analyze…wait about 15–20 seconds…and land on a results page. They see their position vs competitors, how often
they’re mentioned, how often they’re cited with links, and their share of voice across AI search. And then below that you can see the full leaderboard with tabs for each engine. So, they can instantly see where they stand. And what I really like about this is the CTA at the bottom. It adapts based on where they land. If they're ranking first, they’ll see a green banner, meaning they're leading and that they should keep up the good work. But if they're not, they’ll see a red banner, which signifies that their competitors are taking over their AI visibility. And both versions push straight to a contact form, where the email capturing happens. So the tool is doing the qualifying and the selling work instead of your managers. Plus, you’re doing it automatically, without building custom reports every time. And the best part about bringing it to life is that all you need to do is describe what you want in plain English, and let Claude Code handle the rest. We actually have a separate video where
we break down exactly how everything looks and works in Claude Code — from setting up to connecting everything through the MCP server. So if you want to understand the building part in more detail, make sure to watch that next. For this tool, the whole thing took us about two hours to build from scratch, including setup and connecting all the pieces. I'll leave all the useful links and guides in the description. And of course, this is just one idea you can start from — but it should give you a sense of what's possible. And that it's way more doable — and takes way less time and cost — compared to doing it all manually every time. So attracting leads is no longer the problem because this approach does wonders. But once leads actually start booking calls, you’ll still need to break down what’s wrong and what to fix. And doing that manually every time doesn’t scale. And let’s be honest, we could definitely use the help. This brings us to our second use case. The automated client audit deck. One you can
build exactly the way you want, with the exact data you want inside it. Now I'm sure most of you have seen plenty of examples of this built with ChatGPT's Agent kit or something like Claude Cowork. And those work. But the beauty of this approach is this: First — you're getting real, structured SEO data directly from SE Ranking. Not AI pulling whatever it can find online, and, let’s be honest, still misusing the data or hallucinating sometimes. And second — you build this once. Your account manager doesn't have to write a single prompt. They just fill in the client-specific fields if needed and the whole deck generates and autosends itself. That's the part that actually saves your team hours upon hours every week. Let me show you how. So in the tool we built, you enter a client domain, pick a country or market, and optionally add up to five competitor domains — or leave it blank and it auto-detects them from SE Ranking.
And all of these fields are fully adjustable. You build this around the tasks you actually perform — so if your audits always focus on certain markets or you just need specific data to provide, you just hardcode that in. That form should basically reflect your workflow. And then there's this checkbox at the bottom — Include Site Health Audit. That one's up to you. If you check it, SE Ranking crawls the site live, which adds about three minutes to the generation time. Skip it if you just need the deck fast. Then let’s hit Generate. And while that's running, it's pulling live SEO data directly from SE Ranking across five dimensions — site health, AI visibility, keyword rankings, competitive gaps, and backlinks. All of that gets packaged into a nine-slide PowerPoint deck. Now if you want to build something like this yourself, you'll find the full Claude Code prompt we used in the description below, so you can start from exactly the same place. We'll also include some notes on how to feed it your own brand template and specify exactly what goes
on each slide — because what I'm showing here is a demo deck, and yours will look completely different once you tailor it to your agency. Now, let me click here to download the deck — and you can see it's already named after the client domain and the date. Nice. So what's actually inside? Let’s take a look. You've got your cover slide with your client domain, date of the audit, and a placeholder for your agency logo. As I mentioned, if you want the deck to come out fully branded every time, you just drop your brand guidelines, your logo, color palette, font choices into the same folder you're working in. Claude picks it up automatically and applies it to every deck it generates. Next we have an executive summary with three headline numbers (overall site health score, total number of brand mentions, and estimated monthly organic visits). Not bad. Oh, that looks good. This is the slide I want to spend a moment on — the AI visibility slide. You've got two tables here side by side.
The one on the left shows the client's performance broken down by engine. And the one on the right highlights "Where to Double Down." It compares the client to their top competitor per engine and tells you exactly what to do. Depending on what your client needs, you can go much deeper on this slide. Which engines to include, which metrics to show, and how to frame the competitor comparison. SE Ranking's API gives you the actual prompts where a brand is mentioned or cited as well as which pages on your client's site are being cited by AI engines. You can also get citation breakdowns, share of voice comparisons, and competitor presence side by side. You just tell Claude which of those metrics to surface and it builds the slide around that. The more specific you are, the more powerful the output. All of it is in your hands. Then we have Organic rankings with top keywords by traffic share, their positions and monthly
searches. If your client has significant drops, it could be flagged here as well. Then we move through site health — and you can see here Claude ran a full crawl and flagged exactly how many errors, warnings, and notices were detected. It's a nice teaser. Enough to show the client there's real work to be done, without giving everything away. Next are competitive gaps — keyword opportunities sitting wide open that competitors are already seizing. We also have a quick backlink snapshot with referring domains, and any toxic flags worth raising. In this case, distribution looks natural — no toxic flags. And then the last two slides are where the deck actually earns its place in a sales conversation. Priority recommendations. Three actions, ranked by impact, written in plain English. The tool looks across all five data dimensions, finds the three highest impact issues, and generates the recommendations on autopilot. And the final slide is on the next steps. A three month engagement plan with your agency
contact details. And a clear call to action to book a strategy call. Now here's where it gets even more automated. Because this doesn't have to stop at a download button. You can wire the whole thing into a simple automation in n8n so the deck gets sent out automatically — without you doing anything extra. And by the way — if you want to explore more SE Ranking automation ideas, there's already a growing library of SE Ranking workflow templates on n8n you can grab right now. Things like running SEO domain audits and generating blog posts, analyzing brand visibility in AI search, summarizing AI search visibility data — all ready to use. I'll leave the link in the description. So here's what we've got. Four nodes. A webhook trigger that fires when a prospect submits their details. A Google Sheets node that reads their domain and email from your leads sheet. A Google Drive node that grabs the
generated deck. And a Gmail node that sends it straight to their inbox as an attachment. And honestly — setting this up was simple because we just asked Claude what each node should contain. We described what we wanted the workflow to do and Claude walked us through exactly what to put where. This is the full workflow breakdown it created. I'll leave this step by step breakdown in the description so you can follow the exact same process if you want to replicate this. And just to show you how this actually works — let me trigger it right now manually by running this command in the terminal, because in a real setup this would fire automatically the moment a prospect submits their details. But for the demo, I'll just kick it off myself. So the workflow is running... Google Sheets pulled the prospect's email... Google Drive grabbed the deck... and Gmail is sending it out. And there it is. Email landed. Deck attached. Sent automatically to the right person without
anyone on the team lifting a finger. So imagine how this plays out connected to the lead magnet you’ve built. A prospect lands on your free AI visibility checker, runs their domain, sees the leaderboard — and realizes they're sitting in fifth place behind two competitors they know. They figure they want to know more. So they leave their email to get the full breakdown. And that's it — that's the trigger. n8n grabs their domain and email, then a full branded audit generates, and lands in their inbox automatically. You haven't done a thing. What a time to be in this industry. This stuff was unimaginable even two years ago. So that's how you convert a lead into a client. But now you need to keep them. And that means showing up every month with something that actually proves the work is paying off. That's what the third tool is for. A fully automated API-powered client report. A PDF
that pulls live data directly from SE Ranking's API and lands in your client's inbox every month — without anyone on your team touching it. And just like the previous two tools — we'll leave all the prompts and requirements to build this exact thing in the description. Grab them and start from the same place we did. Now let me just open it up and show you what it actually looks like. I'm going to run the local server… open my folder, hit npm run dev … and here's the tool. You enter the client domain, pick your country and market. And the reporting period defaults to last month automatically — which is exactly what you want for a monthly report. You can also set a custom date range if you need to. And then this field at the bottom — account manager notes. That's where you type a quick personal message before the report goes out. Once you hit generate, the report will be ready in a matter of minutes. Downloads straight as a PDF, ready to send.
And if you wanted to take this further — you could add a logo upload field for full white-labeling, a competitor domains field so the AI visibility comparison is always pulling the right brands, or a GA4 and Google Search Console toggle to layer in real click and session data on top of the SE Ranking metrics. All of that is buildable with the same approach. Claude confirmed it can. But honestly, even without any of that, what you're looking at right now is already enough to replace hours of manual reporting every single month. Let me open the PDF. Okay, what do we have here? The Cover page. Client domain, reporting period, generated date. Dark, clean background. And we haven't done a single thing manually to make it look like this. On the next page, we see an overall performance snapshot page. Four KPI tiles at the top, namely organic traffic, keywords in top 10, referring domains, and AI search mentions. All
pulling live from SE Ranking automatically. And what I really like here is the detail inside each tile. The keywords in the top 10 show how many are new and how many were lost during this period. And then below that you've got the full keyword movement breakdown — improved, declined, new, lost. Below we have the AI engine breakdown table. So the client can see exactly where their brand is showing up across AI engines. Not bad for starters. Let’s scroll next. We see performance analysis. Two columns: what improved this month on the left, what needs attention on the right. And none of this is written manually. The tool looks at the movement data and generates these bullets automatically. So "document signature gained 64 positions, now at number 20" — that came straight from the ranking data. "3,006 new keywords appeared in rankings" — pulled from SE Ranking. Same on the right — "certified mail
dropped 8 positions" is flagged because the drop crossed a threshold the tool is watching for. Okay, the test passed. On to the next page, and we see the AI brand presence trend over the last eight months as a bar chart. And then two tables side by side — top movers up and top movers down. So the client can see at a glance which keywords are climbing and which need attention. And this is really useful because you're not just showing them a ranking position in a vacuum — you're showing them the before and after for context which goes a long way. Also looks good to me. On to the final page. The priority actions here auto-generated from whatever the attention data flagged. And then the notes section at the bottom is where your account manager adds one short personal paragraph before the report goes out. Now, everything you see here is powered by SE Ranking's API. What's more, if your clients give you access to their Google Search Console and GA4 accounts,
you can pull real click data, impressions, sessions, and channel breakdown directly into this same report. Both Google’s APIs are free. You know the drill here: describe it to Claude, point it at the APIs, it handles the build. And connecting this to n8n is just as straightforward. Set a schedule trigger for the first day of every month, point it at your client list in Google Sheets, and every client gets their branded PDF automatically. You set it up once and it just runs. Magic, I know! And that's the full pipeline. The first tool brings in the lead. The second one converts them. The third tool retains them. All built with Claude Code, all powered by SE Ranking's API, and once they're running — your team can focus on activities that actually require humans in the loop. And if you want to replicate any of this for your own agency — the description has everything. All three prompts, the n8n setup breakdown, notes on branding. Start from there and make it yours.