API Documentation
The 4life.earth API provides programmatic access to citizen science project data and submissions. All endpoints return data in JSON, CSV, or GeoJSON formats for easy integration with external applications.
FAIR Data Principles
Findable
All data is accessible through standardized REST APIs with clear documentation and metadata.
Accessible
Data is freely available without authentication for public projects. Open access for research and education.
Interoperable
Multiple data formats (JSON, CSV, GeoJSON) ensure compatibility with various tools and platforms.
Reusable
Rich metadata and clear licensing enable data reuse for research, education, and policy development.
Privacy & Anonymity
Anonymous Access: All public data is available without authentication or personal information.
Data Protection: Personal identifiers are removed from public datasets. Only aggregated and anonymized data is exposed.
Open Science: Data is shared under open licenses to promote transparency and scientific collaboration.
Endpoints
/api/observations
Retrieve recent observations from all projects or filtered by specific project
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
format | string | No | Response format (json, csv, geojson) |
project_id | string | No | Filter by specific project ID or slug |
bounds | string | No | Geographic bounds (north,south,east,west) |
coordinates | string | No | Center point with radius (lat,lng,radius_km) |
limit | number | No | Number of observations to return (default: 100, max: 1000) |
days | number | No | Filter observations from last N days (default: 30) |
Example Request
curl "https://4life.earth/api/observations?format=json&project_id=water-quality&coordinates=52.3676,4.9041,10&limit=50"
Example Response
{
"observations": [
{
"id": "observation-id",
"project_id": "project-id",
"project_title": "Water Quality Monitoring",
"data": {
"water_temperature": 18.5,
"ph_level": 7.2,
"turbidity": 2.1
},
"location": {
"lat": 52.3676,
"lng": 4.9041,
"address": "Amsterdam, Netherlands"
},
"status": "approved",
"submitted_at": "2024-01-10T14:30:00Z",
"type": "form_submission"
}
],
"metadata": {
"total": 150,
"filtered_by": {
"project_id": "water-quality",
"coordinates": [52.3676, 4.9041, 10],
"days": 30
},
"format": "json",
"generated_at": "2024-01-15T10:30:00Z"
}
}