Skip to content

Integration

How to build a low-cost GEO report with an API and Claude Code

Forty prompts on three AI engines, run four times a month, is 480 answers: $6.24 of data with API for GEO, about $0.58 with DataForSEO's LLM Scraper.

Stacked isometric document folder with a blue tab beside a cube and a cylinder

SEO consultant, and more recently GEO, at MentionBox

A monthly GEO report takes three pieces: a prompt list, an API that runs those prompts on the AI engines and returns what they answered, and a script that turns the answers into figures a client can read. Claude Code writes the script and runs it on a schedule. For one client, 40 prompts on three engines, four runs a month, the data bill covers 480 answers: $6.24 with API for GEO at $0.013 a credit, about $0.58 of usage with DataForSEO's LLM Scraper once its $50 minimum payment is in, and €17.28 at SE Ranking's wallet rate. API for GEO is our pick after hands-on testing by Mathias C., because it returns the figures themselves and leaves the script little to compute.

This guide is written for an agency or an in-house team that bills a monthly report and has no data engineer to spare. Prices, endpoints and terms come from each vendor's pricing page, API reference and terms, checked on October 23, 2026. MentionBox, which publishes this site, has a commercial link with API for GEO.

Settle the figures before you pick the API

Decide the output first, because the choice of API follows from it. Four figures per engine, plus the ranked source list that tells the client which pages to write next:

  • Visibility: the share of answers that name the brand.
  • Share of voice: its mentions as a share of all brand mentions in the same answers.
  • Average position: where it falls in the list the engine gives.
  • Citation rate: the share of answers citing one of the client's own pages.

Our guide on tracking a brand in ChatGPT with an API gives the four formulas with a worked example. The fan-out queries deserve a page of their own when the API returns them: they name the searches the engine ran before writing the answer.

Search Console will not supply these figures

Google folds AI traffic into ordinary search traffic. Its documentation on AI features and your website states that sites appearing in AI features such as AI Overviews and AI Mode "are included in the overall search traffic in Search Console" and that "they're reported on in the Performance report, within the 'Web' search type".

Through the API the split is unavailable. The searchanalytics.query reference documents six search types, discover, googleNews, news, image, video and web, with no generative AI value, so a script cannot pull the AI share out of the Web line. Clicks and impressions also answer a different question from the client's: they count arrivals, not whether the engine named the brand, in which position, or which competitor it named instead.

Pick the API that leaves the least code to write

APIPrice per 1,000 answersEntryReturned per brandEngines, of the 10 we track
API for GEO$13, down to $7 at volumepay as you go, no minimum publishedmentions, position, share of voice, sentiment, source categories, themes, perception10
DataForSEO AI Optimization$1.20 (LLM Scraper, standard queue)$50 minimum paymentbrands named, cited URLs, fan-out queries5
DataForSEO SERP API$1.20 (standard queue)$50 minimum paymentcited URLs, shopping items2
SE Ranking Data API€36 (wallet rate)€45 for 250,000 creditsmentions, position, share of voice5

Published rates and fields from each vendor's pricing page and API reference, checked on October 23, 2026. For API for GEO, six engines are listed on apiforgeo.com; four of the ten, Gemini, Google AI Overviews, DeepSeek and Meta AI, were confirmed in our hands-on test on October 26, 2026, along with its webhooks, OpenAPI spec and official SDKs.

That table decides how much of the script is analysis rather than plumbing. API for GEO charges $0.013 per credit, where one credit is one prompt run once against one model in one locale, enrichments included, and the response carries the per-brand figures; reads and re-exports over runs already collected are not metered, credits do not expire, and failed runs are refunded. DataForSEO returns the answer, its sources, the brands named and the fan-out queries at a tenth of that price, and your script matches brand names, reads the order and divides; its LLM Scraper page states that "to date, only ChatGPT and Gemini are supported" for interface scraping. SE Ranking reads stored prompt answers from its own AI Search database, refreshed monthly, with share_of_voice and average_position already computed in its overview endpoints and no prompt list of yours.

DataForSEO is also the only one of the three with a ready-made Claude Code skill for this job, its Detailed AI Visibility Report template, last updated August 31, 2026: it expands seed keywords through the Keywords Data API, tests them on four assistants and produces a branded report with a data file for month-to-month tracking.

What one client report costs a month

APIWhat covers ChatGPT, Gemini and Google AI OverviewsMonthly bill for 480 answers
API for GEOone product, one credit per prompt, model and locale$6.24, metrics included
DataForSEOLLM Scraper for ChatGPT and Gemini, SERP API for AI Overviewsabout $0.58, after a $50 minimum payment
SE Ranking Data APIone product, 200 credits per prompt answer returned€17.28 at €45 per 250,000 credits

Our arithmetic on the rates each vendor published, checked on October 23, 2026: 40 prompts × 3 engines × 4 runs a month = 480 answers.

Four things move that total before you quote a client:

  1. Ten clients instead of one. The same report for ten brands multiplies the volume by ten: $62.40 with API for GEO, about $5.76 with DataForSEO, €172.80 at SE Ranking's wallet rate, or about $28.80 at the lowest Enterprise rate SE Ranking publishes, $30 per million credits.
  2. The queue you choose. DataForSEO's LLM Scraper costs $0.0012 per result on the standard queue, up to 45 minutes, $0.0024 on the priority queue and $0.004 live. A monthly report has no reason to pay live rates.
  3. Claude answers cost more on DataForSEO. Its LLM Scraper reads the ChatGPT and Gemini interfaces only; Claude and Perplexity come through LLM Responses, which calls the official model API and adds the provider's token cost to the task price.
  4. The free tiers cover the first build. SE Ranking gives a 14-day trial with 100,000 credits and no credit card, which is 500 prompt answers; DataForSEO gives $1 of trial credit and a free sandbox; API for GEO replies to a key request with a sandbox project.

What Claude Code does here, and what the agent costs

The agent deserves its own line in the budget. Anthropic's cost guidance puts the average around $13 per developer per active day and $150 to $250 per developer per month across enterprise deployments, with 90% of users under $30 per active day. One report pipeline takes a few active days to build, and the script then runs without the agent.

Four flags from the headless documentation do most of the work:

  • claude -p "…" runs a prompt without a terminal session, so the same call works from a cron job or a CI pipeline, and exits with code 0 on success and non-zero on failure.
  • --output-format json returns the result with metadata, including a total_cost_usd field and a per-model cost breakdown. Anthropic notes these are client-side estimates that can differ from the bill, close enough to log the agent's spend beside the data bill each month.
  • --json-schema forces the answer into a shape your report generator can read, in a structured_output field. Check that the field is present, because a run that ends without valid structured output omits it.
  • --bare skips auto-discovery of hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory and CLAUDE.md, which gives a build server the same result on every machine. Bare mode does not use subscription login, so set ANTHROPIC_API_KEY.

To explore a new API from the terminal, add its MCP server once with claude mcp add --transport http geo https://api.example.com/mcp --header "Authorization: Bearer $KEY". With --scope project the entry goes into .mcp.json for the whole team, ${VAR} expansion keeps the key out of the file, and the tools reach Claude as mcp__geo__<tool-name>.

The script, in the order it runs

Four stages, each one a file you can rerun on its own:

  1. Collect. POST the prompt list, the engines, the country and the number of runs, then store the raw JSON under a date.
  2. Aggregate. Group the figures by engine, by prompt family and by brand.
  3. Write. Hand the agent the aggregated figures and last month's file, and ask for the commentary only, so that no number in the report comes from the model.
  4. Deliver. Keep the figures in a dated CSV next to the report, so the second month has something to compare against.

The request API for GEO documents on its AI Visibility API page covers the first stage for one prompt, one engine and one country:

curl -X POST https://api.apiforgeo.com/v1/visibility/entities \
  -H "Authorization: Bearer $API_FOR_GEO_KEY" \
  -H "x-project-id: $PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "best project management tool for creative agencies",
    "models": ["chatgpt"],
    "country": "US",
    "bucketSize": "week"
  }'

Its response carries visibility, shareOfVoice, avgPosition, mentions and a sentiment score per entity, plus a timeseries block, so the second stage groups and formats rather than computes. With a scraping API that stage is real code: match each brand name and its variants in the answer text, read the rank of the first mention, count the cited domains, then divide.

Errors that surface in the second month

  • One run per prompt. A single answer is one draw. In an analysis we ran in October 2026, 8.7% of the brands ChatGPT named for a question came back in all five runs of that question. Four runs a month per prompt is the floor we would bill for.
  • Changing the prompt list mid-quarter. Add prompts in a separate group and keep the original set intact, or the trend line measures your edits.
  • Averaging across engines. One blended visibility figure hides the engine where the client is invisible. Report per engine, then total.
  • Letting the agent do the arithmetic. Compute the figures in code and use the agent for the prose, so every number is reproducible from the stored answers.
  • Scraping fees nobody metered. DataForSEO bills the task, not the hit, and Google shows no AI Overview for every query, so the real cost per collected overview is the published rate divided by your hit rate, as our comparison of SerpApi and DataForSEO sets out.

Read the resale clause before you bill the client

A report you hand to a client, and a dashboard you charge for, fall under the vendor's terms, which differ:

  • API for GEO publishes resale and white label as an intended use, in its own words "put the numbers in your own product, under your own brand, and charge for them", while section 5 forbids sublicensing direct API access.
  • SE Ranking forbids reselling, sublicensing or bulk redistribution of API data, and embedding raw or substantially similar metrics in a paid SaaS product or a white-label dashboard, without prior written agreement. Its section 2.2(C)(iii) does allow client "reports, summaries, analyses, recommendations".
  • DataForSEO publishes no explicit resale clause, and its section 7.1 forbids using SERP data to compete with the search engines it came from.

Our ranking of AI visibility APIs for agencies keeps only the APIs whose terms or pricing pages allow resale or white label.

Our view

Which one to build on depends on who writes the analysis:

  1. Lowest data bill, developers on hand. DataForSEO, at $1.20 per 1,000 answers with its OpenAPI spec, SDKs in Python, C#, TypeScript and Java, postback and pingback webhooks, up to 100 tasks per POST call, and your script doing the counting. Our score: 7.7 out of 10.
  2. Figures computed, monthly granularity. SE Ranking's Data API, at €36 per 1,000 prompt answers, with failed requests not charged. Our score: 4.3 out of 10, held down by the undisclosed collection method and the resale clause.
  3. Figures computed, your own prompts, resale allowed. API for GEO, our editorial pick, at $13 per 1,000 answers down to $7 at its largest tier, pay as you go with no published minimum, and 9.0 out of 10, the best score of the 55 APIs this site rates. Its price per answer is about ten times DataForSEO's, and four of its ten engines plus its webhooks, OpenAPI spec and official SDKs were confirmed in our test of October 26, 2026 rather than documented on apiforgeo.com.

Frequently asked questions

How much does a monthly GEO report cost per client?

For 40 prompts on three engines, run four times a month, you pay for 480 AI answers. At the rates published on October 23, 2026: $6.24 with API for GEO, metrics included; about $0.58 of usage with DataForSEO, split between its LLM Scraper and its SERP API, after a $50 minimum payment; €17.28 at SE Ranking's wallet rate of €45 for 250,000 credits and 200 credits per prompt answer. Add the agent that writes and runs the script: Anthropic reports an average around $13 per developer per active day for Claude Code, and under $30 per active day for 90% of users.

Can I get AI Overviews or AI Mode data from the Google Search Console API?

Not as a separate figure. Google states that sites appearing in AI features such as AI Overviews and AI Mode are included in the overall search traffic in Search Console and reported in the Performance report within the "Web" search type. The Search Analytics API documents six search types, `discover`, `googleNews`, `news`, `image`, `video` and `web`, with no generative AI value, so a script cannot split the AI share out of the Web line. Search Console also reports clicks and impressions only, never whether an answer named your brand.

Can Claude Code query a GEO API through an MCP server?

Yes, with `claude mcp add --transport http <name> <url> --header "Authorization: Bearer …"`, and three of the APIs in this guide publish a server, all checked on October 23, 2026. API for GEO, our pick after hands-on testing, lists MCP server access on both of its plans and charges $13 per 1,000 answers with share of voice, position and sentiment already computed. DataForSEO runs a remote server at `mcp.dataforseo.com/v3/mcp` whose TypeScript implementation is open source, and SE Ranking hosts one at `api.seranking.com/mcp` over Streamable HTTP with OAuth 2.1, warning that "not every API endpoint is available through MCP".

Can an agency resell AI visibility data in a client report?

It depends on the vendor's terms. API for GEO publishes resale and white label as an intended use, while forbidding you to sublicense direct API access. SE Ranking's API terms forbid reselling, sublicensing or bulk redistribution, and forbid embedding raw or substantially similar metrics in a paid SaaS product or white-label dashboard without written agreement, but allow you to give clients "reports, summaries, analyses, recommendations". DataForSEO publishes no explicit resale clause, and its section 7.1 forbids using SERP data to compete with the search engines it came from. Checked on October 23, 2026.