Next.js developer in Nantes

Next.js for businesses in Nantes, delivered remotely by one developer.

Next.js developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.
  • Local WordPress meetup: Nantes WordPress Meetup

My WordPress.org profile

France publishes company identity data openly, and one public API makes it searchable: the API Recherche d’entreprises. A Nantes software team that builds supplier onboarding, a CRM form that fills itself from a SIREN, or a map of companies near a point can call it from a Next.js app. The limits are strict enough to shape the code. This page follows the official sources and says what I could not confirm. I write the integration, and your adviser reads the licence for your case.

The Loire at the Quai de la Fosse in Nantes

Quai de la Fosse on the Loire in Nantes. Photo: Duch, CC BY-SA 4.0, via Wikimedia Commons.

#What does the API Recherche d’entreprises do?

According to its page on data.gouv.fr, it lets anyone search for and find a French company. The search can be textual, by name, address, directors and elected officials, or geographic. Each result carries the name, the SIREN, the SIRET and the NAF code. The page names Insee and INPI as partners.

The OpenAPI specification shows two endpoints on https://recherche-entreprises.api.gouv.fr:

  • GET /search finds legal units and matching establishments by name, address, directors or elected officials, or by SIREN or SIRET.
  • GET /near_point finds them around a latitude and longitude.

#Do I need an API key?

The data.gouv.fr page describes access as open, “totalement ouverte d’accès”, and mentions no key. The specification lists no key either. A build should treat the access model as something to re-read before launch, not as a permanent fact.

#What are the rate limits?

The OpenAPI specification states them precisely:

  • At most 7 requests per second per IP address.
  • A limit of 30 requests per second per ASN, described as a maximum and not a guaranteed rate.
  • Excess use may be restricted temporarily, with priority for internal systems and public services.
  • Above the limit the API returns HTTP 429, with a Retry-After header that gives the wait time.
  • Clients should send a descriptive User-Agent header.

The data.gouv.fr page adds that the administration may lower the limit if its servers are overloaded.

The limit counts per IP address. A Next.js app that calls the API from its servers uses its host’s outbound address for all visitors, so one busy minute shares one budget. That follows from how the limit is defined, and I have not measured it for any host. It is the reason to cache and to handle 429 in the code, not in the user interface.

From the specification:

ParameterDetail
qText, or a SIREN of 9 digits or SIRET of 14 digits; with an identifier, other filters are silently ignored
pageStarts at 1
per_pageDefault 10, limited to 25
radiusFor near_point, default 5 km, up to 50 km
etat_administratifA or C
minimal and includeTrim the response; include only works with minimal=true
limite_matching_etablissements1 to 100, default 10

The specification also lists filters for postcode, commune code, department, region, legal nature, company size category and activity. The est_administration filter is flagged in the specification as not exhaustive and as possibly returning false positives, so do not treat it as a complete list of public bodies.

#How do I call it from Next.js?

From a Server Component or Route Handler. The Next.js docs say fetching on the server keeps the request close to the source and reduces the JavaScript sent to the browser. The second reason is the rate limit: a server-side function gives you one place to cache and to back off, which browser calls do not.

// lib/entreprises.ts
import { cacheLife } from 'next/cache'

const BASE = 'https://recherche-entreprises.api.gouv.fr'

export async function searchCompanies(q: string, page = 1) {
  'use cache'
  cacheLife('hours')
  const url = `${BASE}/search?q=${encodeURIComponent(q)}&page=${page}&per_page=25`
  const res = await fetch(url, {
    headers: { 'User-Agent': 'your-app-name (contact address)' },
  })
  if (!res.ok) {
    throw new Error(`search failed: ${res.status}`)
  }
  return res.json()
}

Three details come from the Next.js use cache page. The directive needs cacheComponents: true in next.config.ts, and cached functions must be async. An error thrown inside a cached function reaches the caller as a reconstructed error, so the page recommends returning a serializable value for expected failures. In this sketch a 429 or any other error is thrown, which keeps it out of the cache; the caller catches it and reads the reason from the reconstructed error. And the default in-memory cache behaves differently by host: on serverless platforms entries typically do not persist across requests, while self-hosted Node.js and Docker keep them. A cache that works on a laptop may absorb far less traffic on serverless hosting, so measure the hit rate after deployment.

Because only a successful result is returned, only a successful result can be cached. The Retry-After value is lost in the thrown error, so a production version would pass it in the error message or handle 429 in an uncached wrapper.

#What does the Licence Ouverte 2.0 require?

The API page gives no licence of its own. The footer of the site says content is available under the “Open Licence 2.0” unless stated otherwise. That is a statement about the site, so I do not claim it for API responses. The Sirene dataset that Insee publishes on data.gouv.fr is under the Licence Ouverte version 2.0, according to its data.gouv.fr page.

The licence text on the Etalab repository grants a free, worldwide, non-exclusive and unlimited right to reuse the information, commercially or not. It allows reproducing, adapting, redistributing and including it in your own product or application. It sets these conditions:

  • Name the source, at least by naming the licensor, and a hyperlink to the source can do that.
  • State the date of the most recent update of the reused information.
  • Do not suggest that the licensor or another public body endorses you or your reuse.
  • Do not mislead third parties about the content, source or update date of the information.
  • Reuse personal data only in line with data protection law.

In a Next.js page this is a footer line or a source note under the data, plus a stored date of the last fetch. A fetchedAt field next to cached results makes the update date available to the UI. I am not a lawyer. Whether the attribution wording suits your product is for you and your adviser.

#What does the API not return?

The data.gouv.fr page lists exclusions: the predecessors and successors of an establishment, non-diffusible companies, and companies whose RCS registration was refused. It also says the API does not give access to the whole Sirene base and serves only to search for a company by name or address.

That matters for design. A company missing from the response is not proof that it does not exist. A form that rejects a SIREN because the API returned nothing would block a real customer. Show “not found in the public search” and let the user continue or contact you.

#What about the Insee Sirene API?

Insee runs its own Sirene API through its API portal. When I tried to read the portal, it returned an error page, and I found no other official Insee page that stated its access terms or quotas. I therefore make no claims about it. What I did confirm from data.gouv.fr is the other route: Insee publishes the Sirene base as monthly stock files under the Licence Ouverte 2.0, each reflecting the register at the end of the previous month, covering data back to 1973, with daily updates available through the API. If you need the whole register and not a search, the stock files are the documented path, and a monthly import job is a different build from a live API call.

#How should the app handle French company data in practice?

  • Cache search results and store the fetch date with them.
  • Keep the 429 and Retry-After handling in one server module.
  • Send a descriptive User-Agent.
  • Show the source and the update date wherever the data appears.
  • Do not rely on the API for non-diffusible companies or for the full register.
  • Re-read the access terms before launch, because the page does not promise a permanent model.

#How does a project run?

  1. You send the use case, expected daily volume, hosting and whether you need a live search or a full import. Emails get an answer within one working day.
  2. I write down the scope and my assumptions, with questions on caching, attribution and not-found states.
  3. I build on a staging copy, and you test with real SIREN and SIRET values.
  4. Release follows your written sign-off on the staging copy.

Work happens remotely, and decisions stay in email and shared documents. For the full Next.js offer, see the Next.js developer page.

Need this service: Next.js developer in Nantes?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Explore other WordPress services and knowledge base