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
| Parameter | Type | Default | Description |
|---|---|---|---|
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
| Type | Description |
|---|---|
exact | Single document matched with high confidence |
ambiguous | Multiple documents match — provide more details to narrow |
pattern | Matched via country-specific citation pattern |
title_search | Found by searching document titles |
fallback_search | Found via semantic search (lower confidence) |
none | No match found |
error | An 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
| Format | Example | Resolves to |
|---|---|---|
| ECLI | ECLI:FR:CCASS:2006:CO00559 | Exact case law document |
| CELEX | 32016R0679 | EU regulation (GDPR) |
| Article reference | art. 6 code civil | French civil code article |
| German case number | BVerfG 1 BvR 123/20 | German constitutional court case |
| EU regulation | Regulation (EU) 2016/679 | GDPR full text |
| UK neutral citation | [2022] UKSC 5 | UK Supreme Court judgment |
| NOR code | JUSX2400001L | French legislative text |
| ELI | eli/loi/2024/... | European legislation identifier |
Tips
- Use
hint_countrywhen you know the jurisdiction — makes resolution significantly faster. - Use
hint_typeto narrow between case law and legislation when the citation is ambiguous. - For ambiguous results, the response includes a
disambiguationmessage suggesting how to refine your query.