Open Data API Public

Public read-only API for visual pollution reports in Morocco — no authentication required.

tayr.ma · Developers · MCP

Endpoint

GET https://tayr.ma/api/open/reports

No authentication. CORS is open (Access-Control-Allow-Origin: *). Cached for 5 minutes.

Draft reports (status=not_yet) are never included, regardless of query filters.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Results per page (1–200)
categorystringFilter by category
statusstringFilter by status (approved, resolved, …)
formatstringjsonjson · geojson · csv

JSON fields

Each item in items includes: id, title, category, status, location, latitude, longitude, severity, createdAt, resolvedAt.

Examples

curl "https://tayr.ma/api/open/reports?page=1&limit=10"
curl "https://tayr.ma/api/open/reports?format=geojson&limit=200"
curl "https://tayr.ma/api/open/reports?format=csv&status=resolved" -o reports.csv

Response shape

{
  "total": 42,
  "page": 1,
  "limit": 50,
  "pages": 1,
  "items": [ { "id": 5, "title": "...", ... } ]
}

License & usage

Data is open for research, journalism, and non-commercial apps with attribution to Tayr (tayr.ma). For commercial use or large-scale integration, reach us via the contact page.