Skip to content

AACsearch for Sanity

Index Sanity documents in AACsearch and power instant, schema-aware search for any Sanity-powered product.

Sanity + AACsearch

GROQ queries select which documents to index. Sanity webhooks keep AACsearch in sync without any cron jobs.

Sanity Studio plugin

Install sanity-plugin-aacsearch from npm. Manage index mappings and trigger resyncs directly from Sanity Studio.

Schema-aware indexing

Map any Sanity schema type to an AACsearch collection. Portable text, references, and arrays flattened automatically.

Webhook-driven sync

Sanity delivers document changes to AACsearch via HTTPS webhook. New documents, updates, and deletions all handled automatically.

GROQ-selected fields

Write a GROQ projection to select exactly which fields to index. Only the data your search needs leaves your Sanity dataset.

Frontend integration

The AACsearch browser SDK works with any Sanity-powered frontend. Use the React hooks or vanilla JS client.

Search analytics

Track which document types get searched, which queries fail, and how search discovery drives downstream conversions.

Connect Sanity to AACsearch in 3 steps

Install the plugin, write a GROQ query, and your content is searchable.

  1. 1

    Step 1

    Install the Sanity plugin

    Run npm install sanity-plugin-aacsearch in your Sanity Studio project. Add it to your sanity.config.ts plugins array.

  2. 2

    Step 2

    Write a GROQ projection

    Define which documents and fields to index using a GROQ query. Select exactly the fields your search needs — no extra data leaves your Sanity dataset.

  3. 3

    Step 3

    Configure webhook sync

    Sanity delivers document changes to AACsearch via HTTPS webhook. New documents, updates, and deletions are handled automatically in real time.

Frequently asked questions

Launch Search OS in one evening

Create an index, add documents and connect search from your app. Free tier covers a prototype — data persists when you upgrade.