Civicamente

API for civic research

Documentation and access to aggregated civic research data: authentication, sample limitations and usage conditions.

What is the API for?

The API exposes aggregated data for exploring results and trends among Civicamente participants. It supports research and education; these data are not representative measurements of the whole population.

How do I access it?

Consult the OpenAPI specification for endpoints, parameters and authentication. Protected endpoints require an authorised key. Check availability, quotas and reuse conditions before starting an integration.

What are the data limitations?

Participation is voluntary. Language, geographic coverage, group sizes and assessment versions may affect comparisons. Do not use aggregates to identify participants or describe the sample as a representative survey.

Request examples

curl
curl "https://www.civicamente.ch/api/v1/datasets/overview?country_iso=CH" -H "X-API-Key: YOUR_API_KEY"
Python
import os, requests
response = requests.get(
    "https://www.civicamente.ch/api/v1/datasets/overview",
    params={"country_iso": "CH"},
    headers={"X-API-Key": os.environ["CIVICAMENTE_API_KEY"]},
    timeout=30,
)
response.raise_for_status()
print(response.json())
R
library(httr2)
request("https://www.civicamente.ch/api/v1/datasets/overview") |>
  req_url_query(country_iso = "CH") |>
  req_headers(`X-API-Key` = Sys.getenv("CIVICAMENTE_API_KEY")) |>
  req_perform() |>
  resp_body_json()