Reference Resolution

Turn loose legal citations into exact documents. Handles ECLI, CELEX, article references, case numbers, and more.

POST /v1/resolve

POST /v1/resolve

Resolve a legal citation to one or more documents.

Request Body

ParameterTypeDefaultDescription
reference string required The legal citation to resolve
hint_country string ISO country code hint for faster resolution
hint_type string case_law, legislation, or doctrine

How Resolution Works

The resolver runs through up to seven stages, returning as soon as a confident match is found.

1
Fast-path regex
Matches machine-readable identifiers (ECLI, CELEX, ELI, NOR codes) directly against the database.
2
Pattern resolver
Country-specific citation patterns from a rules database. Handles formats like German case numbers and French article references.
3
Cache lookup
Previously resolved references are cached for speed. Identical citations return instantly.
4
LLM parsing
AI extracts structured fields from the citation — court, date, number, article, code — then queries with those fields.
5
Relaxed query
Broadens the search by dropping source filters, searching across all sources for the extracted fields.
6
Title search
For references 15+ characters, searches document titles using full-text matching.
7
Semantic fallback
Hybrid search with a high confidence threshold (>0.85). Only returns results the system is very confident about.

Match Types

TypeDescription
exactSingle document matched with high confidence
ambiguousMultiple documents match — provide more details to narrow
patternMatched via country-specific citation pattern
title_searchFound by searching document titles
fallback_searchFound via semantic search (lower confidence)
noneNo match found
errorAn error occurred during resolution

Response Format

{
  "reference": "art. 1240 code civil",
  "resolved": true,
  "match_type": "exact",
  "documents": [{
    "source": "FR/Legifrance",
    "source_id": "LEGIARTI000006438858",
    "title": "Article 1240 du Code civil",
    "text": "Tout fait quelconque de l'homme...",
    "data_type": "legislation",
    ...
  }],
  "elapsed_ms": 156
}

Supported Reference Formats

FormatExampleResolves to
ECLIECLI:FR:CCASS:2006:CO00559Exact case law document
CELEX32016R0679EU regulation (GDPR)
Article referenceart. 6 code civilFrench civil code article
German case numberBVerfG 1 BvR 123/20German constitutional court case
EU regulationRegulation (EU) 2016/679GDPR full text
UK neutral citation[2022] UKSC 5UK Supreme Court judgment
NOR codeJUSX2400001LFrench legislative text
ELIeli/loi/2024/...European legislation identifier

Tips

Next: Discovery →