spatialdata-db: spatial omics datasets as SpatialData#

spatialdata-db is a catalog of public spatial omics datasets, from Visium and Xenium to MERSCOPE, CosMx and mass spectrometry imaging. Each dataset is converted to a SpatialData Zarr store, described by one row of the catalog and registered in the Lamin instance scverse/spatialdata-db. The catalog of 2026-11-01 holds 8471 datasets from 16 technologies. You can browse every dataset and collection on the website.

This Python client queries the catalog by technology, tissue, organism, gene or free text and loads the datasets you pick as SpatialData objects. It builds cohorts of datasets that you can freeze, split by study and turn into training data, and it collects the citations of the studies they come from. The sddb-cli command and the sddb-mcp server give the shell and AI agents the same queries and downloads.

A grid of twelve tissue thumbnails, each labelled with its technology
The 12 largest technologies in the catalog, one dataset each.

Installation#

pip install "spatialdata-db @ git+https://github.com/theislab/spatialdata-db-client@v0.1.3"
uv pip install "spatialdata-db @ git+https://github.com/theislab/spatialdata-db-client@v0.1.3"

This installs the alpha release, v0.1.3. The main branch may be ahead of it, and you get the newest code if you leave out @v0.1.3.

The client needs Python 3.12 or newer. It is not on PyPI yet, so install it from GitHub.

Quick example#

from sddb import Catalog

hits = Catalog().query(technology="Visium", tissue="lung")
hits.summary()
smallest = min(hits, key=lambda ds: ds.size_bytes)
sdata = smallest.to_sdata()  # about 7 MB, copied to the local cache once

Tutorials and reference#

From the website

Load a dataset or collection you found on the website.

From the website to Python
Tutorials

A numbered series from the first query to a frozen cohort with its citations.

Tutorials
Use cases

Longer analyses built on the client, such as an atlas of every Visium section.

Use cases
CLI and agents

Query, download and cite from the shell or an AI agent.

Command line and agents
API reference

Every public class and function, with its parameters.

API reference
Citations and licenses

Cite the studies behind your data and check what their licenses allow.

4. Citations and licenses

Cite and license#

A publication that describes the database is forthcoming. Until then, cite the studies behind the data you use: cohort.citations() writes their BibTeX entries, and sddb-cli cite does the same from the shell. Each dataset keeps the license of its source, and 4. Citations and licenses explains how to check and filter by license.