Content Lake

The database optimized for content operations

a collage of images, text, and code

Store any content shape

Query with precision

Reuse with referential integrity


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

No More "DO NOT PUBLISH"

The heart of content operations

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

Cursor.com is powered by a custom Sanity Studio, which allows our team to use agents to update every part of the site, defined in code. When we publish new content changes, we're able to see them live immediately, making it fast to iterate on webpages and blogs.

A portrait of Lee Robinson
Lee Robinson
VP, Developer Education

Ready to build? Let's make it real.

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

Get Started