API Examples
The public eCrime.ch API examples repository contains small Python scripts for common reporting and integration workflows.
Support Policy
Section titled “Support Policy”No support is available for scripts published in this GitHub repository.
The examples are provided as-is and are intended as starting points. Users are responsible for reviewing, testing, securing, adapting, scheduling, and operating them in their own environments.
Support for the eCrime.ch API itself remains subject to the applicable eCrime.ch support agreement.
Available Examples
Section titled “Available Examples”Daily claims CSV report by email
Section titled “Daily claims CSV report by email”The daily CSV email script retrieves newly listed victims, removes duplicate records, generates an Excel-friendly CSV file, and sends it through a customer-provided SMTP server.
It supports a dry-run mode that creates the CSV without sending email.
Regional monthly report generator
Section titled “Regional monthly report generator”The regional report generator creates monthly country or multi-country reports using eCrime.ch API data.
It produces:
- HTML and Markdown reports
- an incident CSV
- a JSON summary
- SVG charts for trends, actors, and sectors
The generator has no fixed local paths and does not require Chromium.
Getting Started
Section titled “Getting Started”Clone the repository and install its dependency:
git clone https://github.com/ecrime-ch/ecrime-api-examples.gitcd ecrime-api-examplespython3 -m pip install -r requirements.txtKeep API keys and other credentials in environment variables. Never commit them to source control.