API Store Home

French and English coexist on this site

To provide the Sirene and nomenclature APIs for the general public, INSEE chose to rely on an open source solution initially in English. In order to accelerate the opening of the service, INSEE has preferred not to wait for the completion of all translation operations, resulting in the coexistence of both languages ​​in certain pages of the site or certain messages. INSEE will correct this situation in the coming months. Please excuse us for this inconvenience.

Where to start to use an INSEE API ?

To use an INSEE API, you must respect several steps.

  1. You must have created an account using the button
  2. Log in with the button
  3. On the page of the API that interests you, click on the Subscribe button
  4. Then you need to generate an access token, for that 
    • On the window confirming your subscription, click on View subscriptions
    • Then click on the Generate Keys button
  5. With the keys, a first access token has been generated, and you can then use this access token to test the chosen API by returning to the API page and positioning yourself on the tab. API Console.
  6. Fill in the query parameters of the API and click on the button Try it out!

To use the following API

  1. You must be logged in
  2. On the page of the API that interests you, click on the Subscribe button
  3. Click Stay on this page
  4. You will then be able to test the chosen API from the Console tab of the API, for which you will need a valid access token.
  5. Fill in the query parameters of the API and click on the button Try it out!

What is the concept of application ?

An application is an API pool that you can access from the same access token.

There is a default application (named DefaultApplication)

But you can also register in this section an application for every application module that you develop, and declare for each of them one or more INSEE APIs that they are querying: the application that subscribes to an API, and not the user account.

Thus, a user account can have one or more applications, and each application can subscribe to one or more APIs.

What is the purpose of My Apps ?

The My Applications section allows you to create new applications, manage the applications you have declared.

From this screen you will be able to unregister one of your applications from an API. < / p>

It is also possible to delete an application, in which case all subscriptions are canceled and its token is automatically invalidated.

What is an access token ?

An access token is a string supplied by the INSEE API catalog, which is to be used as a parameter for each API call and allows you to identify yourself. p> To use an API, you need a valid access token By default, a token has a validity period of one week.

A token is associated with an application. query all APIs that the application has subscribed to.

How to generate your first access token ?

See step number 4 of « Where to start to use an INSEE API? »

How to renew my access token ?

Tokens are valid for one week by default.

Renewal can be done:

  1. Manually from the application page on this site
  2. By calling the access token generation API (see the application page for more details)

    The token command allows to :

    1. generate a token if you do not have one. It is possible to add in the body of the request the validity_period parameter to indicate in seconds the desired duration of validity of the token.
    2. the current token if it already exists.

    The following cURL command demonstrates how to generate an access token by using the client authentication type.
  3. The revoke command allows you to revoke the current token.

INSEE recommends its users to renew the chips once a day.

What are the keys generated for ?

The keys are an identifier and password of an application, they are generated with the first token of the application, these keys are used when renewing the access token by API.
Fields marked with * are compulsory.
Retype Email