Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates
Content Lake (Datastore)
Overview

  • Understanding Content Lake

    Technical limits
    API Versioning
    API CDN

  • Datasets and documents

    Datasets
    Documents
    Drafts
    IDs and Paths
    Perspectives
    Attribute limit
    Hot swap
    Cloud clone
    Backups

  • Querying with GROQ

    Introduction
    How queries work
    Custom functions
    Query cheat sheet
    Vision plugin
    Syntax reference
    GROQ @ Sanity Learn

  • Querying with GraphQL

    Introduction
    GROQ and GraphQL

  • Mutations

    Introduction to document mutations
    Mutate documents with actions
    Transactions
    Patches
    Document mutation patterns

  • Assets

    Introduction
    Upload, query, and delete assets
    Metadata
    Transformations
    IIIF

  • Content Operations

    Importing Data
    Restore a deleted dataset from a backup
    Migrating your schema and content
    Content migration cheat sheet
    Schema migration principles
    Schema change course @ Sanity Learn

  • Real-time and dynamic content

    Perspectives for preview and presentation
    Live Content API
    Listening API

  • Webhooks

    Introduction
    Best practices
    HTTP API reference
    Toolkit (JS)

  • Embeddings (Experimental)

    Introduction
    Create and query an embeddings index
    Embeddings Index CLI reference
    HTTP API reference

  • Security

    Access Your Data (CORS)
    Browser security & CORS
    Keeping your data safe
    Activity Feed

  • Reference

    GROQ Specification
    Common Sanity document types
    HTTP API
    Roles and permissions
    URL Format
    Authentication
    Using JSONMatch
    IP addresses used by Sanity

Content Lake (Datastore)Last updated December 31, 2025

Store and query structured content

Sanity's Content Lake stores your content as structured data, making it queryable, referenceable, and ready for delivery to any channel.

a screen shot of a program that says sanityfetcha screen shot of a program that says sanityfetch
Query and retrieve content

GROQ introduction

GROQ (Graph-Relational Object Queries) is Sanity's powerful query language designed to help you describe exactly what information your application needs.

GraphQL

How to deploy and query GraphQL API for your Sanity projects

Perspectives for Content Lake

Perform the same query but with different results based on the published or draft status of a document.

Libraries and clients

First and third-party libraries for interacting with your data in Content Lake

Document storage

Documents

Sanity stores your data, and some system data, in JSON documents.

Drafts and versions

How drafts work, and how you disable them

IDs and Paths

How document IDs work, and what you can do with them

Datasets

Managing multiple datasets within a project

Assets

Sanity provides extensible UI for managing assets, and an API for dealing with storage, resizing and deletion.

Create and mutate documents

Introduction to document mutations

Sanity's Content Lake offers a variety of methods for creating, editing, and deleting documents.

Mutate documents with actions

The Actions API let you use the same system Sanity Studio uses to mutate documents in Content Lake.

Document mutation patterns

Common patterns and snippets for mutating documents and data in the Sanity Content Lake.

Real-time & integration features

Live Content API

The Live Content API is perfect for fast-moving events like sports, news, and commerce. Deliver real-time experiences easily and at scale.

API CDN

Description of the CDN-distributed, cached version of the Sanity API.

Content operations

Migrating your schema and content

How to migrate schema and content within a Sanity project

Connected Content

Structured content is connected. It's what enables reusing and repurposing the same chunk of content in different contexts, and it's how you enable your content to be treated as data. The Content Lake has some unique capabilities that make connected, structured content not only possible but pleasant to work with both programmatically through APIs and in the studio. This article aims to unpack how to use and think about references. While it has some technical language and concepts, you should be able to tag along, even if you aren't super familiar with JavaScript, JSON, or GROQ, our primary query language.