AI agents need structure. Build the foundation now
Content Lake

The database optimized for content operations

a collage of images, text, and code

Store any content shape

Store any JSON in Content Lake, structured or unstructured. Make it instantly queryable. Define schemas when you need them and connect to any system with an API.

Query with precision

GROQ is our open-source query language for JSON. Query and reshape results with database-level precision. All without being forced into someone's generic API.

Reuse with referential integrity

Content Lake maintains true referential integrity between content pieces. Build complex context graphs while ensuring that broken references never break your applications.


The database built for content

Schema when you want it, freedom when you don’t

Schema docs
// In Sanity Studio: Define content models for your editorial interfaces
export default {
  name: 'product',
  type: 'document',
  fields: [
    {
      name: 'title',
      type: 'string',
      validation: Rule => Rule.required()
    },
    {
      name: 'category',
      type: 'reference',
      to: [{ type: 'category' }]
    }
  ]
}

// Meanwhile, Content Lake can store any valid JSON:
const document = {
  _id: 'custom-document',
  _type: 'anything',
  arbitraryField: 'No schema needed!',
  nestedData: {
    whatever: ['you', 'want'],
    counts: 42
  }
}
GROQ

Query anything

Explore GROQ
// Query across differently structured documents 
*[_type in ["legacyPost", "article", "blogEntry"]] { 
  title, 
  // Safely access fields that might not exist in all documents 
  "author": coalesce(authorName, author->name, "Unknown"), 
  // Transform on the fly based on document structure 
  "summary": select( defined(excerpt) => excerpt, defined(content) => pt::text(content)[0...150] + "...", "No summary available" ), 
  // Gather related content regardless of reference field name 
  "related": *[references(^._id)] 
}
Mutations, Patches, Actions

The most powerful way to update your content

Learn about Transactions
// Make precise updates independent of schema constraints 
client.patch('document-id') 
  // Add fields that weren't in original schema 
  .set({ newMetricField: 'value', 'deeply.nested.property': true }) 
  // Perform mathematical operations .inc({viewCount: 1}) 
  // Conditional mutations based on current state 
  .ifRevisionID('previous-revision') // Array operations preserving referential integrity 
  .append('relatedContent', [ {_type: 'reference', _ref: 'doc-123'} ]) 
  // Perform migrations on the fly 
  .unset(['legacyField', 'deprecated.nested.field']) 
  .commit({visibility: 'async'})
Perspectives

Query your content from any angle

Learn about Perspectives
illustration of previewing content in different places in time

Orchestrated content across all teams

Single Source of Truth

Content Lake becomes your organization's content hub, connecting previously isolated systems and ensuring consistent experiences across all customer touch-points—from websites to apps to in-store displays.

No More "DO NOT PUBLISH"

Group related changes into managed releases, preview exactly how they'll look together, and schedule precise publishing times—all without disrupting your regular content workflow.

The heart of content operations

Content Lake is the real-time content database that gives your team structured storage, granular mutations, and APIs to power everything from editorial workflows to downstream delivery.

G2 badge: momentum leader, spring 2025G2 badge: spring 2025 users most likely to recommend mid-marketG2 badge: grid leader enterpriseG2 badge: spring 2025 high performer mid-market

Developers love Sanity

All G2 reviews

We built separate Studios for editorial and ad workflows, but both run on the same Content Lake. That shared structure is what lets us move fast across teams and brands.

A portrait of Nick Woodward
Nick Woodward
Director of Engineering, Morning Brew

Ready to build? Let's make it real.

Sign up for Sanity for free and start crafting your first project.

Get Started