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
```

Metadata

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 Provenance Actions
api_insee-1.0.1.tar.gz 10.0 kB Without provenance Details for api_insee-1.0.1.tar.gz

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

Security for api-insee 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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