API endpoints

The project's Flask API is kept with the same endpoints and record format (a JSON array of rows). They're now static JSON files, so they're always available no server to sleep or database to expire. Running python3 app.py also serves them at the original paths (/mental_health, /indicator, /health).

GETstatic/data/mental_health.jsonwas /mental_health

OSMI mental health survey

All 1,258 cleaned survey responses with every column (age, gender, country, treatment, workplace support …).

Open
GETstatic/data/indicator.jsonwas /indicator

World Bank indicators original extract

The original 2014–2019 extract (1,578 rows), with a "type" field marking countries vs regional aggregates.

Open
GETstatic/data/indicators_2000_2021.jsonnew in 2026

World Bank indicators, 2000–2021

Suicide rates (total, male, female), GDP, life expectancy, alcohol, health spending and labour indicators for every country and year, with region and income group.

Open

Usage

// JavaScript
const res = await fetch('https://ermiasgelaye.github.io/Mental-Health-Predictor/static/data/mental_health.json');
const rows = await res.json();   // [{ Timestamp, Age, Gender, Country, treatment, ... }, ...]

# Python
import pandas as pd
df = pd.read_json("https://ermiasgelaye.github.io/Mental-Health-Predictor/static/data/indicator.json")
countries = df[df["type"] == "country"]