Gouv APIlegifrance.gouv.fr ↗
Search and retrieve French laws, decrees, and official notices from the Journal Officiel (JORF) via Légifrance. 5 endpoints covering full-text search and document retrieval.
What is the Gouv API?
This API provides 5 endpoints for searching and retrieving official French legal texts published in the Journal Officiel de la République Française (JORF) via Légifrance. Use search_jorf to run full-text queries across laws, decrees, and announcements with filters for document nature and sort order, or use get_jorf_text to pull the complete content and metadata of any individual document by its JORF identifier.
curl -X GET 'https://api.parse.bot/scraper/69909e5f-96c4-4df2-8ce7-2e913b4b56f3/search_jorf?page=1&query=eau&page_size=10&sort_value=PERTINENCE' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace legifrance-gouv-fr-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Légifrance JORF SDK — search legal texts, browse issues, retrieve full documents."""
from parse_apis.légifrance_jorf_api import Legifrance, SortValue, Nature, TextNotFound
client = Legifrance()
# Search for legal texts about water, sorted by relevance
for result in client.jorfresults.search(query="eau", sort=SortValue.PERTINENCE, limit=3):
print(result.title, result.id)
# Filter by nature: find decrees only
decree = client.jorfresults.search(nature=Nature.DECRET, limit=1).first()
if decree:
print(decree.title, decree.source)
# Retrieve full text details for a search result
if decree:
try:
full = client.jorftexts.get(text_id=decree.id)
print(full.title, full.metadata.nor, full.metadata.publication_date)
except TextNotFound as exc:
print(f"Text gone: {exc}")
# List the latest JORF issues
for issue in client.jorfissues.list_latest(limit=3):
print(issue.date, issue.number, issue.title)
# Get table of contents for a specific issue
contents = client.jorfissuecontentses.get(year="2026", month="06", day="12", number="0136")
print(contents.issue_date, contents.issue_number)
# Search succession (unclaimed estate) notices
for notice in client.successionnotices.search(limit=3):
print(notice.title, notice.url)
print("exercised: jorfresults.search / jorftexts.get / jorfissues.list_latest / jorfissuecontentses.get / successionnotices.search")
Full-text search over the Journal Officiel de la République Française (JORF). Matches titles and text bodies. Filters by nature of text (decree, announcement, etc.) and supports relevance or date sorting. Paginates via integer page counter. Each result carries a text_id usable with get_jorf_text for full content.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number. |
| query | string | Search keyword or expression. |
| nature | string | Filter by nature of text. Known values include 'annonce', 'decret', 'arrete', 'loi', 'ordonnance'. |
| page_size | integer | Number of results per page. |
| sort_value | string | Sort order for results. |
{
"type": "object",
"fields": {
"page": "integer current page number",
"results": "array of search result objects each with title, id, source, and url",
"page_size": "integer results per page",
"total_results": "integer total number of matching results"
},
"sample": {
"data": {
"page": 1,
"results": [
{
"id": "JORFTEXT000000649171",
"url": "https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000000649171",
"title": "LOI n° 2006-1772 du 30 décembre 2006 sur l'eau et les milieux aquatiques (1)",
"source": "Journal officiel"
}
],
"page_size": 5,
"total_results": 74558
},
"status": "success"
}
}About the Gouv API
What the API covers
The API surfaces the full content pipeline of the JORF: discovery of recent issues, table-of-contents browsing, full-text search, and individual document retrieval. list_latest_jorf_issues returns an array of recent issue objects, each carrying a date (YYYY-MM-DD), a zero-padded number, and a title. Those values feed directly into get_jorf_issue, which takes year, month, day, and number parameters and returns a structured sections array — each section has a title and an items array listing individual text titles and their IDs.
Search and filtering
search_jorf accepts a query string for keyword or phrase matching across JORF titles and bodies. The nature parameter filters results to a specific document category: accepted values include annonce, decret, arrete, loi, and ordonnance. Results paginate via the page and page_size parameters. Each result object in the results array exposes a title, id, source, and url. The id field is the JORF text identifier (e.g. JORFTEXT000054100654) used to call get_jorf_text. A separate search_succession_notices endpoint runs a pre-scoped search for unclaimed estate (succession vacante) and inheritance-related notices, returning the same result shape without requiring a query string.
Document retrieval
get_jorf_text accepts a text_id and returns the full document: a title, a full_text string, a content_sections array of titled sections with their content, and a metadata object that may include the NOR code, ELI identifier, jorf_number, and publication_date. This makes it possible to programmatically extract structured legal content rather than parsing a rendered page.
The Gouv API is a managed, monitored endpoint for legifrance.gouv.fr — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when legifrance.gouv.fr changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official legifrance.gouv.fr API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor newly published decrees and laws by polling
list_latest_jorf_issuesandget_jorf_issuedaily. - Build a French legislation search tool using
search_jorfwith thenaturefilter set toloiordecret. - Aggregate unclaimed estate notices for inheritance researchers using
search_succession_notices. - Extract NOR codes and ELI identifiers from
get_jorf_textmetadata to cross-reference documents in legal databases. - Index the full text of official announcements by retrieving
full_textandcontent_sectionsfromget_jorf_text. - Track regulatory changes in a specific domain by searching
search_jorfwith domain-specific keywords and filtering byarreteorordonnance.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Légifrance have an official developer API?+
What does `get_jorf_text` return, and how do I obtain a valid `text_id`?+
get_jorf_text returns the document's title, a full_text string, content_sections (an array of objects each with title and content), and a metadata object that may include NOR, ELI, jorf_number, and publication_date. A valid text_id is the id field present in any result object returned by search_jorf, search_succession_notices, or the items arrays within get_jorf_issue sections.What `nature` values can I use to filter `search_jorf` results?+
annonce, decret, arrete, loi, and ordonnance. These correspond to the main categories of text published in the JORF. Not every issue will contain all categories, and the filter is case-sensitive — use the lowercase French form as listed.Does the API cover JORF annexes, images, or tables embedded in legal documents?+
full_text and content_sections; embedded tables, images, or PDF annexes that appear in the official gazette are not included in those fields. You can fork this API on Parse and revise it to add an endpoint targeting those document components.Can I retrieve historical JORF issues from years or decades past, not just the latest ones?+
list_latest_jorf_issues only returns the most recently published issues. However, get_jorf_issue accepts an arbitrary year, month, day, and number, so you can query historical issues directly if you already know the date and issue number. Discovery of older issue numbers is not currently automated. You can fork this API on Parse and revise it to add a historical issue listing or date-range browsing endpoint.