Document Retrieval
Retrieve the full text and metadata of any document by its source and ID.
GET
/v1/documents/{country}/{source_name}/{source_id}
Fetch a single document with its complete text, metadata, and source-specific fields.
Path Parameters
| Parameter | Description |
|---|---|
country |
ISO country code (e.g. FR, DE, EU) |
source_name |
Source name within the country (e.g. Judilibre, EUR-Lex) |
source_id |
Document ID within the source (may contain slashes) |
Alternative form: If the
source_id contains characters that are difficult to encode in a URL path, use the query parameter form instead:GET /v1/documents/FR/Judilibre?source_id=JURITEXT000048123456
Cross-Table Search
The endpoint checks the case_law, legislation, and doctrine tables in order. The first match wins. You do not need to specify which table the document belongs to — the API resolves it automatically.
Response Fields
Common Fields (all document types)
| Field | Type | Description |
|---|---|---|
source | string | Source identifier (e.g. FR/Judilibre) |
source_id | string | Document ID within source |
data_type | string | case_law, legislation, or doctrine |
title | string | Document title |
text | string | Full document text |
url | string | Link to original source |
date | string | Primary date (decision date or publication date) |
country | string | ISO country code |
language | string | Language code |
meta | object | Additional source-specific fields as JSON |
Case Law Fields
| Field | Type | Description |
|---|---|---|
court | string | Court name |
chamber | string | Chamber or division |
jurisdiction | string | Jurisdiction name |
ecli | string | European Case Law Identifier |
case_number | string | Case or docket number |
decision_type | string | Type of decision (e.g. arrêt, ordonnance) |
decision_number | string | Decision number |
court_tier | integer | 1 = supreme, 2 = appellate, 3 = first instance |
summary | string | Editorial or AI-generated summary |
judges | string[] | List of judges or rapporteurs |
Legislation Fields
| Field | Type | Description |
|---|---|---|
document_type | string | Type (e.g. regulation, directive, loi, Gesetz) |
authority | string | Issuing authority or body |
status | string | Current status (in_force, repealed, amended) |
identifier | string | Official identifier or number |
eli_uri | string | European Legislation Identifier URI |
effective_date | string | Date the law took effect |
expiry_date | string | Expiry date (if applicable) |
quality_tier | integer | Data quality tier (1 = highest) |
Cache Headers
Responses include cache-control headers tailored to the document type:
Case law: max-age=86400 (24h)
Legislation: max-age=3600 (1h)
Court decisions are immutable once published, so they are cached aggressively. Legislation may be amended or consolidated, so it uses a shorter cache window.
Example
Request
curl https://legaldatahunter.com/v1/documents/FR/Judilibre/JURITEXT000048123456 \
-H "Authorization: Bearer sk-your-key-here"
Response
{
"source": "FR/Judilibre",
"source_id": "JURITEXT000048123456",
"data_type": "case_law",
"title": "Cour de cassation, Chambre civile 1, 15 mars 2024, 22-18.734",
"court": "Cour de cassation",
"chamber": "Première chambre civile",
"court_tier": 1,
"jurisdiction": "France",
"date": "2024-03-15",
"ecli": "ECLI:FR:CCASS:2024:C100215",
"case_number": "22-18.734",
"decision_type": "Arrêt",
"text": "LA COUR DE CASSATION, PREMIÈRE CHAMBRE CIVILE, a rendu l'arrêt suivant :\n\nFaits et procédure\n\n1. Selon l'arrêt attaqué (Paris, 12 septembre 2022), M. [X] a assigné la société [Y] en réparation du préjudice subi du fait de la diffusion de données personnelles...\n\n[full text truncated for documentation]",
"url": "https://www.legifrance.gouv.fr/juri/id/JURITEXT000048123456",
"country": "FR",
"language": "fr",
"summary": "La première chambre civile précise les conditions dans lesquelles le droit à l'effacement des données personnelles peut être opposé à un moteur de recherche.",
"judges": ["Mme Duval-Arnould", "M. Chevalier", "Mme Kerner-Menay"],
"meta": {
"formation": "Formation restreinte",
"solution": "Rejet",
"rapporteur": "M. Chevalier",
"avocat_general": "Mme Caron-Dégl'Innocenti"
}
}
Error Responses
| Status | Meaning |
|---|---|
404 |
Document not found in any table. Verify the source and source_id are correct. |
401 |
Missing or invalid authentication. See Authentication. |
429 |
Rate limit exceeded. Check the Retry-After header. |