Skip to main content
## API Insee

Python helper to request Sirene API

API Sirene give access to French companies and business database. Entities are recorded since the creation
of this administrative register in 1973. To use this API you have to create an account on <https://api.insee.fr/>

You will find the official documentation [here](https://api.insee.fr/catalogue/site/themes/wso2/subthemes/insee/pages/item-info.jag?name=Sirene&version=V3&provider=insee). All examples described here comes from the official documentation.


#### Installation

You can install the helper with pip

```
pip install api_insee
```

To use the api within a python script

```python
from api_insee import ApiInsee

api = ApiInsee(
key = # your consumer key,
secret = # your consumer secret
)

```

#### Siren and Siret service

To get information about a siren number

```python
data = api.siren('005520135').get()
```

This simple code call ```https://api.insee.fr/entreprises/sirene/V3/siren/005520135``` and return these data :

```json
{
"header": {
"statut": 200,
"message": "OK"
},
"uniteLegale": {
"siren": "005520135",
...
"periodesUniteLegale": [
{
"dateFin": null,
"dateDebut": "2007-11-19",
"etatAdministratifUniteLegale": "C",
"changementEtatAdministratifUniteLegale": true,
"nomUniteLegale": null,
...
}
...
]
}
}
```

The same logic for a siret number

```python
data = api.siret('39860733300059').get()
# call https://api.insee.fr/entreprises/sirene/V3/siret/39860733300059
```

Release files for api-insee 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for api-insee 1.0.1
File Size Uploaded
api_insee-1.0.1.tar.gz 10.0 kB Details

Release files / api_insee-1.0.1.tar.gz

Download URL api_insee-1.0.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
297e07a7640363c636a3c4cfbe170356a1b66f728a264dd5e4bd80c204ebc837
BLAKE2b-256 checksum
How to use checksums
76c1bc26c6b0d5fd8ccf6ad5358492ed703225a3b128ec0cd199c316fefdf370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.12

Release history Release notifications | RSS feed

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

This release

1.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page