Search Legal Texts
search_legal_textsFind legal articles from their subject or wording when the article number is unknown; returns a ranked shortlist with highlighted snippets and the exact total. Query in French, descriptive terms (« délai de recours contentieux refus implicite »); put the code in the code filter (slug or exact name), keep the query for the subject. The response carries a facets block (code, jurisdiction): per filter name, a map of filter value to article count — reuse those keys verbatim to refine. Chain a hit into get_legal_text with its url, plus date when the dispute is governed by an earlier version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Restrict to one code/text by its URL slug ("code-civil", as in facets.code) or exact name. Omit to search the whole navigable referential. | |
| date | No | Consultation date (YYYY-MM-DD) — searches the versions valid at that date (point-in-time, same semantics as get_legal_text). Omit to search the versions currently in force. | |
| limit | No | Maximum number of results (default 10). Above 20 the window is clamped, not refused. | |
| query | Yes | French query over legal articles. Matches article titles (boosted) and bodies; alias expansion handles acronyms and usual names. | |
| jurisdiction | No | Filter by country/legal order, as an ISO 3166 alpha-2 country code: "FR" (France, the bulk of the corpus) or a foreign code ("SN", "DZ", "MA", "VN", "PE", …); plus "UE" for EU law and "INTL" for treaties/international law. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hits | Yes | ||
| query | Yes | ||
| total | Yes | ||
| facets | Yes | Per filter name, a map of filter value to article count under the current query (code, jurisdiction). Reuse keys verbatim as filter values. Each axis is capped to its top 10. |