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
sourcestringSource identifier (e.g. FR/Judilibre)
source_idstringDocument ID within source
data_typestringcase_law, legislation, or doctrine
titlestringDocument title
textstringFull document text
urlstringLink to original source
datestringPrimary date (decision date or publication date)
countrystringISO country code
languagestringLanguage code
metaobjectAdditional source-specific fields as JSON
Case Law Fields
Field Type Description
courtstringCourt name
chamberstringChamber or division
jurisdictionstringJurisdiction name
eclistringEuropean Case Law Identifier
case_numberstringCase or docket number
decision_typestringType of decision (e.g. arrêt, ordonnance)
decision_numberstringDecision number
court_tierinteger1 = supreme, 2 = appellate, 3 = first instance
summarystringEditorial or AI-generated summary
judgesstring[]List of judges or rapporteurs
Legislation Fields
Field Type Description
document_typestringType (e.g. regulation, directive, loi, Gesetz)
authoritystringIssuing authority or body
statusstringCurrent status (in_force, repealed, amended)
identifierstringOfficial identifier or number
eli_uristringEuropean Legislation Identifier URI
effective_datestringDate the law took effect
expiry_datestringExpiry date (if applicable)
quality_tierintegerData 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.
Next: Resolve API →