# France Crime Statistics by Commune & Department (SSMSI) (`france-open-data/france-crime-statistics`) Actor

Official recorded crime in France per commune, department or region: counts, rate per 1,000, yearly trend since 2016 and department rank. SSMSI / Ministère de l'Intérieur open data.

- **URL**: https://apify.com/france-open-data/france-crime-statistics.md
- **Developed by:** [France Open Data](https://apify.com/france-open-data) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 one area × indicator yearly series

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## France Crime Statistics by Commune & Department (SSMSI)

### What it does

Returns one row per area × crime indicator with the yearly series of recorded offences/victims, rate per 1,000 inhabitants (per 1,000 households for burglaries), first vs latest rate change in %, and for departments/regions the rank among all areas (1 = highest rate). Communes with too few cases are flagged `published: false` by SSMSI (no number given).

**Who it's for:** Real-estate and relocation sites, local journalists, insurers, security companies, data journalists and civic-tech apps.

All numbers come straight from the official source at run time. Nothing is estimated or modelled; field names are neutral and every item carries `source` and `source_url`.

### Input

Defaults work out of the box. Example:

```json
{"level": "department", "areas": ["93", "75"], "indicators": ["Cambriolages de logement", "Homicides"]}
```

### Free sample output

Real item from a run on 2026-10-24 (series truncated to the last 3 points):

```json
{
 "input": "75",
 "level": "department",
 "area_code": "75",
 "indicator": "Cambriolages de logement",
 "count_unit": "Infraction",
 "rate_basis": "per 1,000 households",
 "latest_year": 2025,
 "latest_count": 7072.0,
 "latest_rate_per_1000": 5.0545976,
 "first_year": 2016,
 "first_rate_per_1000": 6.8707504,
 "rate_change_pct": -26.4,
 "series": [
  {
   "year": 2023,
   "count": 11961.0,
   "rate_per_1000": 8.5489313,
   "population": 2103778.0,
   "published": true
  },
  {
   "year": 2024,
   "count": 9235.0,
   "rate_per_1000": 6.6005669,
   "population": 2103778.0,
   "published": true
  },
  {
   "year": 2025,
   "count": 7072.0,
   "rate_per_1000": 5.0545976,
   "population": 2103778.0,
   "published": true
  }
 ],
 "rank_highest_rate_first": 62,
 "areas_ranked": 101,
 "source": "SSMSI (Ministère de l'Intérieur), bases statistiques de la délinquance enregistrée, Licence Ouverte 2.0",
 "source_url": "https://static.data.gouv.fr/resources/bases-statistiques-communale-departementale-et-regionale-de-la-delinquance-enregistree-par-la-police-et-la-gendarmerie-nationales/20260709-120038/donnee-dep-data.gouv-2025-geographie2026-produit-le2026-06-25.csv"
}
```

Export as JSON, CSV, Excel or via the Apify API. Fields: `input, level, area_code, indicator, count_unit, rate_basis, latest_year, latest_count, latest_rate_per_1000, first_year, first_rate_per_1000, rate_change_pct, series, rank_highest_rate_first, areas_ranked, source, source_url`.

### Pricing

Pay per event: **$0.005 per result row ($5 per 1,000)**, charged only for successful rows (event `indicator-row`). Errors are returned with an `error` field and are not charged. Apify free-plan credits cover thousands of rows.

### Data source & licence

SSMSI (Service statistique ministériel de la sécurité intérieure), 'Bases statistiques communale, départementale et régionale de la délinquance enregistrée par la police et la gendarmerie nationales', data.gouv.fr, Licence Ouverte 2.0. The newest file is picked automatically.

### Limits

Recorded crime only (complaints and police findings), not victimisation surveys. Commune-level small counts are not published by SSMSI. Paris/Lyon/Marseille are single communes (75056, 69123, 13055). Official APIs/open data files only, no scraping, no personal data.

# Actor input Schema

## `level` (type: `string`):

Commune level downloads a ~40 MB file (about 15-60 s).

## `areas` (type: `array`):

Department codes (75, 93, 2A), commune names or INSEE codes (Marseille, 69123), or region codes (11, 93).

## `indicators` (type: `array`):

SSMSI indicator names; leave empty for all 18.

## `sinceYear` (type: `integer`):

First year of the series (data starts 2016).

## Actor input object example

```json
{
  "level": "department",
  "areas": [
    "75",
    "93",
    "13"
  ],
  "sinceYear": 2016
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "areas": [
        "75",
        "93",
        "13"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("france-open-data/france-crime-statistics").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "areas": [
        "75",
        "93",
        "13",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("france-open-data/france-crime-statistics").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "areas": [
    "75",
    "93",
    "13"
  ]
}' |
apify call france-open-data/france-crime-statistics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,france-open-data/france-crime-statistics"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ejjpYuRrbfoRuVNCL/builds/v2nSwytlq3QkgN2G0/openapi.json
