NEWOur agents now make the SEO fixes on your site and check what worked →
Gemini logoSanity logo

Fix Sanity SEO from Gemini

Gemini reads your real Google Search Console data through SEOmatic, finds what is holding your Sanity documents back, stages the fix, and tells you whether it worked. In Approval mode nothing goes live on Sanity until you approve it.

  • Your real Search Console data
  • Fixes staged in Sanity, with your approval
  • Each change measured afterwards
Start Trial
SEOmatic astronaut working in Gemini
Gemini logo
Gemini

Last Updated

November 2026

Connect Gemini

A custom app in the Gemini web app, or one command in Gemini CLI for Gemini Code Assist and API-key users.

Cost

Free to connect and to read your Search Console. Staged fixes are part of paid plans, with a 14-Day Trial for $1, credited to your first payment. See pricing.

How to Fix Sanity SEO from Gemini

Why Gemini Needs SEOmatic on Sanity

Gemini cannot reach your Sanity admin on its own. With SEOmatic connected, it answers from your real Search Console data, names the documents that are losing clicks, and stages the fix. You approve it in the conversation or in SEOmatic, and SEOmatic writes it to Sanity through the Sanity Content Lake API.

What It Looks Like

You: Why does /guides/toilet-keeps-running get impressions but so few clicks?

Gemini: From Sep 13 to Oct 10 (28 days), /guides/toilet-keeps-running had 3,480 impressions and 31 clicks at position 8.6 for "toilet keeps running". That is a low click rate for page one, so the title is the first thing to test: it reads "Running Toilet". I staged a new title, "Toilet Keeps Running? 4 Fixes in Order of Likelihood", to be written to the SEO title field of that document. Approve it here or in SEOmatic and it goes live on Sanity.

An example on a demo site; your numbers come from your own Search Console.

Step 1: Connect Sanity to SEOmatic

Go to manage.sanity.io, open your project, and under API, then Tokens add a token with Editor permissions or higher. In SEOmatic, go to Connections and select Sanity. Paste the token along with your Project ID and dataset, then pick the document type to work in. The full walkthrough, with every screen, is on the Sanity integration page.

Step 2: Connect SEOmatic to Gemini

At gemini.google.com, open Settings, then Connected Apps, choose Add a custom app and paste this URL, then sign in to SEOmatic. Using Gemini CLI with Gemini Code Assist or a Gemini API key? Run gemini extensions install https://github.com/Minh42/seomatic-mcp in your shell instead.

Connect Gemini
https://app.seomatic.ai/api/mcp

Other ways to connect are on the Gemini page.

Step 3: Ask Gemini, Then Approve

Paste any of these into Gemini. It answers from your data and stages the fix; you approve it before it reaches Sanity.

  • “Which pages built from my Sanity documents lost clicks this month?”
  • “Find pages Google has not indexed and trace them to their documents.”
  • “Audit my live site and tell me which issues live in content and which in code.”

More that work well in Gemini:

  • “Which pages has Google not indexed?”
  • “Audit my homepage”
  • “Do AI answers mention my brand?”

Did It Work?

After you approve, SEOmatic writes the change through the Sanity Content Lake API and checks that it is live. Then it measures the result against the page's own baseline and your site's trend: 14 days after a title change, 28 after a content refresh, 90 after a new page. Each change is marked verified, ineffective or regressed (inconclusive when the data cannot tell yet), and a low-risk change that loses traffic is rolled back on its own. Ask Gemini "Did my Sanity title changes work?" and it answers from those verdicts.

What Gemini Can Change on Sanity

Writes And Improves Documents

New documents written from research, plus rewrites of the title, slug and meta on ones already published.

Finds Your Real Field Names

Agents resolve where your meta and body actually live in the same query that finds the document, so nothing is guessed.

No Orphan Fields

Sanity accepts any key you send, and a guessed name would create a field nothing renders. Canonical and noindex are only ever written to a field your document already has.

Sanity's schema lives in your Studio, not in the API, so a write to a guessed field name succeeds and quietly creates an orphan nothing renders. Agents resolve the document's real shape before they write.

Every field, limit and safeguard is on the Sanity integration page.

Requirements

Sanity

A Sanity project and dataset, plus an API token with Editor permissions or higher, created under API > Tokens in manage.sanity.io. You will also need your Project ID and dataset name, usually production.

Gemini

Gemini web app: a personal Google account, age 18 or over, in the US, in English, with History on. Gemini CLI: a Gemini Code Assist license, a Gemini API key or Vertex AI. Google stopped Gemini CLI for personal Google sign-ins (free, Google AI Pro and Ultra) on June 18, 2026; those accounts use Antigravity, whose terminal agent, Antigravity CLI (agy), replaced it. Plus a free SEOmatic account.

Use Gemini on Another Platform

Frequently Asked Questions

Can Gemini fix SEO on my Sanity site?

Yes, through SEOmatic. Gemini reads your Search Console data, finds the documents losing clicks and stages the fix, which SEOmatic writes to Sanity once you approve. The three setup steps are on this page.

What can Gemini change on Sanity?

SEOmatic works on your documents through the Sanity Content Lake API. Which fields it can write there, and every limit, are listed on the Sanity integration page.

How do I know if a Sanity fix worked?

SEOmatic measures every change it ships against the page's own baseline and your site's trend, 14 days after a title change, 28 after a content refresh and 90 after a new page, and marks it verified, ineffective or regressed, or inconclusive when the data cannot tell yet. Gemini can read those verdicts for you.

What do I need on the Gemini side?

Gemini web app: a personal Google account, age 18 or over, in the US, in English, with History on. Gemini CLI: a Gemini Code Assist license, a Gemini API key or Vertex AI. Google stopped Gemini CLI for personal Google sign-ins (free, Google AI Pro and Ultra) on June 18, 2026; those accounts use Antigravity, whose terminal agent, Antigravity CLI (agy), replaced it. Plus a free SEOmatic account.

Will Gemini publish to Sanity without asking?

No. Every fix your assistant stages waits for your approval before it touches your site, and your assistant is told never to approve on its own. Approved changes are stored with the page's previous state, so any edit to an existing page can be rolled back. SEOmatic's own scheduled agents can ship reversible work, including single new articles, without a click unless you pick Approval mode in your autonomy settings; changes to your URLs or indexing, and new page sets, always wait for you.

Is it free?

Connecting is free with no card. Search Console reports, page checks and 30-page site audits are free, as often as you like; live market data uses free questions, 5 a month plus a one-time 5 the first time you sign in from an assistant, and 10 more when you connect Search Console. Staging and publishing fixes is part of paid plans, which start with a 14-Day Trial for $1, credited to your first payment.

digi-business-uk

Each local area page used to take us half a day to create and optimize.


With SEOmatic, we can create hundreds of pages in the same time, which helps our clients make the best use of their budget.


It's transformed how we deliver scalable SEO solutions.

will-hawkins

Will Hawkins

Marketing Director, Digi-Business UK

Give Your Site an SEO Team

Agents read your Search Console data, do the work, and prove what actually moved. You decide what ships.

  • You decide what ships
  • Verified live
  • One-click rollback

14-Day Trial for $1, credited to your first payment.