Developer Portal
Open Data API & Documentation
We believe in radical transparency. All voting data, motion details, and council decisions are available to the public through our Open Data API. Use this portal to explore schemas, download datasets, and build integrations.
Public Datasets
Access raw data for analysis and auditing.
Secure & Anonymized
Voter privacy is protected via cryptographic hashing.
Real-time Access
Data is updated instantly as events occur.
API Endpoints
v1.0.0
GET
/api/v1/motions Public
Motions
Retrieve a list of all motions, including active, upcoming, and closed items.
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the motion |
| title | string | Title of the motion |
| status | string | Current status (active, closed, upcoming) |
| category | string | Category (infrastructure, budget, etc.) |
| level | string | Government level (town, municipal, provincial) |
| voting_deadline | date | ISO date string for deadline |
GET
/api/v1/votes Public
Vote Results
Get anonymized vote records for transparency and independent verification. Contains integrity hashes.
| Field | Type | Description |
|---|---|---|
| motion_id | string | ID of the motion voted on |
| vote_choice | string | Choice made (yes, no, abstain) |
| timestamp | number | Unix timestamp of the vote |
| integrity_hash | string | Cryptographic hash for verification |
GET
/api/v1/council-votes Public
Council Decisions
Access official council voting records and outcomes.
| Field | Type | Description |
|---|---|---|
| motion_id | string | ID of the motion |
| council_decision | string | Final decision (passed, rejected) |
| council_yes_votes | number | Count of council Yes votes |
| council_no_votes | number | Count of council No votes |
| decision_date | date | Date of decision |
GET
/api/v1/stats Public
Region Statistics
Demographic and engagement statistics for regions.
| Field | Type | Description |
|---|---|---|
| name | string | Region name |
| level | string | Administrative level |
| population | number | Total population |
GET
/api/v1/health Public
System Status
Check the operational status of the voting platform API.
| Field | Type | Description |
|---|---|---|
| status | string | Current system status (e.g., 'operational') |
| latency | number | API response latency in ms |
| version | string | Current API version |
Integration Guide
You can access our Open Data endpoints using standard HTTP requests. Below are examples of how to fetch the latest motions programmatically.
JavaScript / Node.js
const fetchMotions = async () => {
const response = await fetch(
'https://townvote.app/api/v1/motions'
);
const data = await response.json();
console.log(data);
};
fetchMotions();cURL
# Get all active motions curl -X GET \ https://townvote.app/api/v1/motions \ -H "Accept: application/json"
Rate Limiting & Usage
This public API is rate-limited to ensure stability. For high-volume access or commercial use, please contact the municipal administration. Data provided "as-is" for transparency purposes.