# CourtListener Case Law Embeddings: Chunked US Court Opinion Text with 768-Dimensional ModernBERT Vectors for Semantic Legal Search (Free Law Project)

## Facts

- Provider: Free Law Project
- License: Public Domain (https://wiki.free.law/c/courtlistener/help/api/bulk-data/bulk-legal-data)
- Format: JSON (in sampled files)
- Stored at: Amazon S3, s3://com-courtlistener-storage/embeddings/opinions/freelawproject/modernbert-embed-base_finetune_512 (us-west-2)
- Access: public, readable without an account
- Category: Natural Language Processing
- Source: https://wiki.free.law/c/courtlistener/help/api/bulk-data/bulk-legal-data
- Page: https://scigantic.com/archive/810f98fd-b518-5efe-9ea8-469ecaf88be9
- Keywords: Natural Language Processing, JSON, AWS Open Data

## About

Dense vector embeddings of United States court opinions that power CourtListener's semantic search, released by Free Law Project for download. The folder holds one JSON file per opinion, named by the CourtListener opinion id (for example 100.json). Each file has the opinion id and a list of embeddings; every entry gives a chunk_number, the chunk text (a passage of the opinion, starting with the reporter citation, parties and court) and a 768-dimensional float vector. The vectors come from Free Law Project's fine-tuned ModernBERT model, modernbert-embed-base_finetune_512, which names the directory. The whole embeddings tree is about 2 TB; nightly S3 inventory files under embeddings/inventories/ in the same bucket list new and changed files. Opinion ids join to the opinions and opinion-clusters tables in the CourtListener bulk CSV exports (bulk-data/ in the same bucket) for court, date, case name and citations. Used for semantic retrieval over case law, retrieval-augmented generation for legal questions, clustering of judicial opinions and benchmarking legal text embedding models. Read each file with any JSON parser and stack the vectors with NumPy. License: Public Domain Mark 1.0, as Free Law Project states for its bulk data. Cite CourtListener, Free Law Project.

## Load the data

```python
import boto3
from botocore import UNSIGNED
from botocore.client import Config
s3 = boto3.client('s3', region_name='us-west-2', config=Config(signature_version=UNSIGNED))
s3.list_objects_v2(Bucket='com-courtlistener-storage', Prefix='embeddings/opinions/freelawproject/modernbert-embed-base_finetune_512/', Delimiter='/')
```

Lists the files with anonymous access. Runs on any machine, with no cloud account.

## Data structure

File types in sampled files: JSON

Example file: `embeddings/opinions/freelawproject/modernbert-embed-base_finetune_512/1.json`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/810f98fd-b518-5efe-9ea8-469ecaf88be9
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/810f98fd-b518-5efe-9ea8-469ecaf88be9
- Over MCP: `get_schema_card` with id `810f98fd-b518-5efe-9ea8-469ecaf88be9` at https://api.scigantic.com/mcp

## Related topics

- [JSON datasets](https://scigantic.com/topics/json)
- [Natural Language Processing datasets](https://scigantic.com/topics/natural-language-processing)
