Claude Code for SEO with DataForSEO: research and audits for a few dollars
The sequel to my OpenSEO guide: how I use an AI agent and a pay-as-you-go API for keyword research, AI visibility checks, audits and a study of 1,684 Google profiles. With the real costs.
By Valerio Aloi · Published: October 23, 2026
In my OpenSEO guide I explained how to run a self-hosted SEO dashboard on Cloudflare. For day-to-day work it’s great. But for a few months now I’ve done most of my research another way: I ask Claude Code to query DataForSEO directly, save the data and analyse it. That is how I built my study on local SEO and AI (352 questions, 1,684 Google profiles, 810 websites) for about $5.60 in data.
Here is how I use it, what it really costs and where you need to be careful.
The two tools
- Claude Code is Anthropic’s agent that works on a project’s files: it reads, writes, runs commands and scripts, and uses external tools connected through MCP (Model Context Protocol). You use it from the terminal or the desktop app. The Claude Pro plan is enough: I pay €21.96 a month for it in Italy.
- DataForSEO is an SEO data provider with an API: Google SERPs, Maps, keyword volume and difficulty, backlinks, Lighthouse, AI engine answers. It is pay-as-you-go, with no subscription, but to get started a $50 minimum top-up is required. The balance never expires, and there is $1 of trial credit for new accounts (DataForSEO pricing).
Together they change the cost model: instead of a monthly subscription to a suite, you pay for Claude Pro plus only the data you request, and the agent does the analysis.
How I connect them
- The DataForSEO MCP server: I register it in the project’s MCP configuration in Claude Code (a
.mcp.jsonfile in the folder), with the API credentials. From then on I can ask in plain language, «check volume and difficulty for these 15 keywords in the US», and Claude Code calls the right endpoints. - Scripts for big jobs: for collections of hundreds of requests I have Claude Code write small Python scripts that call the API directly, save results as JSON and can be re-run. They stay in the project, documented.
- Credentials out of git: the file with the keys is never committed or shared.
What I use it for, with the real costs
| Job | What Claude Code did | DataForSEO cost |
|---|---|---|
| Study on local SEO and AI | 352 questions to ChatGPT, Gemini, Perplexity and Google, 180 Maps searches, 810 websites read, name matching, statistical models | about $5.60 in total |
| AI visibility check | 80 answers from 4 engines on 20 questions | $0.36 live, $0.20 queued |
| Volume for 40 keywords | A single call, results straight into a table | about $0.02 |
| Keyword research for an article | Volume, difficulty, suggestions and a SERP check | a few cents |
| Lighthouse on client sites | SEO and AI-agent scores for three sites, to quote them with a date | a few cents |
The same AI visibility check, run earlier with OpenSEO’s built-in tool, cost me $1.04, and 36 of 80 answers failed because of Worker limits. Calling DataForSEO directly brought it down to $0.36, with all 80 answers delivered; the next round, in queue mode, cost $0.20 for another 80.
Claude Code also runs the audits that need no paid data. After every deploy of this site, for example, I have it compare all 400-plus HTML files in the build with the live ones and check 404 responses, hreflang and internal links. OpenSEO’s self-hosted crawler reads only part of the pages, so I do these checks this way.
How to spend even less
- Use the queue, not «live»: many endpoints have a standard queue mode (you post the job and fetch the result later, for free) that is far cheaper than an instant answer. In my runs a SERP or Maps search cost $0.0006 queued versus $0.002 live, an AI engine answer $0.0012 versus $0.004.
- Batch: DataForSEO Labs data costs $0.012 per call plus $0.00012 per result, so 40 keywords in one call cost almost the same as one.
- Get an estimate first: I always ask Claude Code what a job will cost before running it, and approve it myself.
- Reuse data: everything I download ends up in files in the project, and next time I start from there instead of calling the API again.
Where to be careful
- Check the numbers: the agent can get a calculation wrong or misread a field. In the study I checked the name matching by hand (50 of 51 correct among the most-cited) and every published figure traces back to the data files.
- Read missing data correctly: for many non-English keywords difficulty comes back as 0, which means «no data», not «easy». Look at the SERP before deciding.
- Queues sometimes stall: it happened to me with Gemini, stuck for over half an hour. Then you switch to live mode, knowing it costs more.
- Security: credentials stay on your machine; the agent works on your files, so keep the project under version control.
Three things that actually happened while I wrote these guides
- The Bing data was wrong. For the guide to search engines beyond Google I asked DataForSEO for Bing results on 20 searches like «dentist catania». In queue mode, 12 of 17 results had nothing to do with the search (for «psychologist catania» it returned online calculators). Re-run live, more than half were still off-topic: for «restaurant catania» it returned Yahoo Finance pages. I discarded all of them. Without spot checks I would have published numbers made up by a bug.
- The model costs more than expected. One Claude Sonnet 5.5 answer with web search cost $0.056, because the model reads many pages (over 15,000 tokens). The same question on Claude Haiku 5.5 cost $0.0126. For 20 questions that was $1.10 versus $0.25: I tested a single question, saw the real cost and chose before running the rest.
- When PageSpeed says no. To measure the scores I quote on my homepage, PageSpeed Insights’ anonymous quota had run out. I ran Lighthouse through DataForSEO instead, with the date noted next to every number.
OpenSEO or Claude Code + DataForSEO?
I use both. OpenSEO for an always-ready dashboard: Search Console, rankings, domain overviews. Claude Code with DataForSEO for anything custom: research for an article, a check on a client, a study with thousands of data points. When a question doesn’t fit a ready-made panel, the second route costs less and goes further.
If you’d like an audit of your site done this way, the first one is free.
Claude Code and DataForSEO FAQ
How much does it cost to use Claude Code with DataForSEO?
About €22 a month plus the data you use. For Claude Code the Claude Pro plan is enough (I pay €21.96 a month in Italy). DataForSEO is pay-as-you-go with no subscription, with a required $50 minimum top-up; the balance never expires. In my experience keyword research for an article costs a few cents, and a study of 352 questions and 1,684 Google profiles cost about $5.60.
Do I need to code to use Claude Code with DataForSEO?
No, not for simple requests: with the DataForSEO MCP server connected you ask in plain language and Claude Code picks the endpoints. For large collections it’s worth having it write scripts, and being able to read them helps.
What is the difference between DataForSEO queue and live mode?
In queue mode you post the job and fetch the result later, and it costs much less: in my runs $0.0006 per SERP versus $0.002 live. Live mode answers immediately but costs more.
Does Claude Code replace OpenSEO?
No, I use them together: OpenSEO as an always-ready dashboard for Search Console and rankings, Claude Code with DataForSEO for custom research and audits.
Can you trust data processed by an AI agent?
Only if you check it. I have every figure verified against the data files, check a sample of results by hand and distrust missing values, such as a keyword difficulty of 0.
Want an audit done this way?
A free SEO audit of your site, with real data and a short list of things to fix.