Skip to main content

Developers

Dzaleka Online Services API

Public JSON endpoints for published content, dashboards, search, feeds, and selected submission workflows across Dzaleka Online Services.

Base URL

https://services.dzaleka.com/api

Authentication

Read access is public. Some action endpoints accept JSON submissions without account auth.

Format

JSON responses by default. RSS is available at /api/rss.

Rate limiting

Collection and search endpoints are limited to 60 requests per minute per IP.

Discovery

Agents can discover this API from Link response headers on HTML pages, the API catalog at /.well-known/api-catalog, the browser tool server card at /.well-known/mcp/server-card.json, and the OpenAPI document below.

Agent guidance

/llms.txt

Plain-text summary of what this site covers, when an agent should use it, and where the developer resources are.

text/plain

API catalog

/.well-known/api-catalog

Well-known discovery document in Linkset JSON format for agents and automated API clients.

application/linkset+json

MCP server

/.well-known/mcp

Live Model Context Protocol server over Streamable HTTP, also served at /mcp. GET returns a discovery document; POST JSON-RPC 2.0 to run the read-only tools.

application/json

Deprecation policy

/api/deprecation-policy

Machine-readable versioning and deprecation policy: how removals are signalled, the notice period, and any endpoint currently scheduled for retirement.

application/json

MCP server card

/.well-known/mcp/server-card.json

SEP-1649-style discovery document describing the browser-side WebMCP tool surface and where to learn more about it.

application/json

OpenAPI description

/api/openapi.json

Machine-readable OpenAPI 3.1 document for the public API.

application/openapi+json

API status

/api/status

Lightweight health and discovery status document.

application/json

Homepage Link header

</llms.txt>; rel="describedby"; type="text/plain", </.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json", </api/openapi.json>; rel="service-desc"; type="application/openapi+json", </api-docs>; rel="service-doc"; type="text/html", </api/status>; rel="status"; type="application/json"

Markdown negotiation

HTML pages also respond in markdown when the request sends Accept: text/markdown. Those responses return Content-Type: text/markdown, Vary: Accept, and an x-markdown-tokens estimate for agents.

MCP server

/.well-known/mcp is a live Model Context Protocol server over Streamable HTTP, protocol version 2025-06-18. Send a GET for a discovery document, or POST JSON-RPC 2.0 to run its read-only tools: search_dzaleka, list_dzaleka_collection, search_dzaleka_encyclopedia, get_dzaleka_encyclopedia_entry. It is unauthenticated and shares the same rate limit as the REST API.

curl -X POST https://services.dzaleka.com/.well-known/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}'

Full walkthrough in the agent access guide.

Command-line client

The DZDK CLI wraps this API for terminal and script use. Install it with pip install dzdk (Python 3.8+), then run dzdk health to check every endpoint, or dzdk search --query "legal aid" to search. See the DZDK CLI guide for the full command list.

Browser agent tools

On supported browsers, site pages also publish read-only WebMCP tools for search, services search, weather summary, urgent help contacts, language support routes, and newcomer first steps. The published server card lives at /.well-known/mcp/server-card.json, and published agent skills are available at /.well-known/agent-skills/index.json.

Errors and versioning

Every error is an RFC 9457 problem document served as application/problem+json, including unknown /api/* paths. Branch on code, which is stable across releases; title and detail are human-readable and may change.

{
  "type": "https://services.dzaleka.com/api-docs#error-not_found",
  "title": "Resource not found",
  "status": 404,
  "code": "not_found",
  "detail": "No encyclopedia entry with slug \"no-such-entry\".",
  "resolution": "Verify the identifier, or list available records from the collection endpoint.",
  "instance": "/api/encyclopedia/no-such-entry"
}
CodeStatusWhat to do
bad_request400Bad requestCheck the query parameters against /api/openapi.json and retry.
invalid_body400Invalid request bodySend a JSON object matching the request schema in /api/openapi.json.
not_found404Resource not foundVerify the identifier, or list available records from the collection endpoint.
collection_not_found404Collection not foundUse /.well-known/api-catalog to discover valid collection endpoints.
method_not_allowed405Method not allowedCheck the allowed methods in the Allow header or /api/openapi.json.
rate_limited429Rate limit exceededWait for the number of seconds in Retry-After, then retry.
upstream_unavailable503Upstream service unavailableThis is usually transient. Retry with exponential backoff.
internal_error500Internal server errorRetry once; if it persists, report it at https://services.dzaleka.com/contact.

Rate limits

60 requests per minute per IP. Successful responses carry RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset (seconds) and RateLimit-Policy, so clients can self-throttle. A 429 adds Retry-After. The legacy X-RateLimit-* headers are still sent, but X-RateLimit-Reset is a Unix timestamp rather than a duration.

Versioning

The current version is 1.0.0, echoed on every response as API-Version. Send API-Version on a request to pin it. Breaking changes ship under a new major version; endpoints scheduled for removal return Deprecation (RFC 9745) and Sunset (RFC 8594) headers with at least six months of notice. The full policy, and anything currently scheduled for removal, is published at /api/deprecation-policy.

Collection endpoints

Most collection endpoints support `GET`, `POST`, and `OPTIONS`. The encyclopedia is read-only and uses dedicated query, detail, suggestion, and facet endpoints.

Encyclopedia

/api/encyclopedia
GETOPTIONS
entries

Sourced encyclopedia entries with filters, pagination, detail records, suggestions, facets, and JSON-LD.

Dedicated documentation

Services

/api/services
GETPOSTOPTIONS
services

Published service organisations and support listings.

Resources

/api/resources
GETPOSTOPTIONS
resources

Published resources, documents, and downloads.

Events

/api/events
GETPOSTOPTIONS
events

Published community events and activity listings.

Photos

/api/photos
GETPOSTOPTIONS
photos

Photo gallery items and related metadata.

Jobs

/api/jobs
GETPOSTOPTIONS
jobs

Published job listings and opportunity notices.

News

/api/news
GETPOSTOPTIONS
news

Published news articles and updates.

Courses

/api/courses
GETPOSTOPTIONS
courses

Published e-learning course records and learning resources.

Community Voices

/api/community-voices
GETPOSTOPTIONS
community-voices

Community stories and voice submissions that are already published.

Profiles

/api/profiles
GETPOSTOPTIONS
profiles

Published skills exchange profiles.

Talents

/api/talents
GETPOSTOPTIONS
talents

Talent directory records exposed through the API.

Marketplace Listings

/api/marketplace
GETPOSTOPTIONS
marketplace

Published marketplace product and service listings.

Stores

/api/stores
GETPOSTOPTIONS
stores

Published marketplace stores and vendor storefronts.

Rights Navigator

/api/rights
GETPOSTOPTIONS
rights

Published rights and legal guidance entries from the rights navigator.

Artists

/api/artists
GETPOSTOPTIONS
artists

Published artist profiles used by the public art catalogue.

Artworks

/api/artworks
GETPOSTOPTIONS
artworks

Published artwork records from the public art catalogue.

Poets

/api/poets
GETPOSTOPTIONS
poets

Published poet profiles and creative directory entries.

Dancers

/api/dancers
GETPOSTOPTIONS
dancers

Published dancer and dance crew profiles.

Docs

/api/docs
GETPOSTOPTIONS
docs

Documentation pages from the docs content collection.

Pages

/api/pages
GETPOSTOPTIONS
pages

Published markdown reference pages served through the catch-all page route.

Search and feeds

Search

/api/search
GETOPTIONS

Search across multiple collections with rate limiting and a short cache.

  • `q` required search query, minimum 2 characters
  • `collections` optional comma-separated list such as `services,resources,news`
  • `limit` optional results per collection, default `10`
https://services.dzaleka.com/api/search?q=education&collections=services,events&limit=5

Search Index

/api/search-index.json
GET

Flat public search index used by site search and lightweight integrations.

https://services.dzaleka.com/api/search-index.json

RSS Feed

/api/rss
GET

XML RSS feed for the latest news items.

https://services.dzaleka.com/api/rss

Data snapshots and dashboard endpoints

Emergency Alerts

/api/alerts
GET

Curated high-priority alert items for the data page and crisis messaging.

https://services.dzaleka.com/api/alerts

Population Snapshot

/api/population
GET

Population totals, demographic split, nationality breakdown, and trend series.

https://services.dzaleka.com/api/population

Finance Snapshot

/api/finance
GET

UNHCR funding snapshot used by the data dashboard.

https://services.dzaleka.com/api/finance

Weather

/api/weather
GET

Current weather and forecast data, with a safe fallback if the upstream weather source is unavailable.

https://services.dzaleka.com/api/weather

Weather Alerts

/api/weather-alerts
GET

Weather alert feed for the weather page, sourced from the upstream CAP RSS feed when available.

https://services.dzaleka.com/api/weather-alerts

Geolocation

/api/geolocation
GET

Same-origin geolocation proxy returning coarse location data or a safe unavailable response.

https://services.dzaleka.com/api/geolocation

Charts

/api/charts
GET

Prepared chart series used by visual dashboard sections.

https://services.dzaleka.com/api/charts

Analytics Pageviews (deprecated)

/api/analytics/pageviews
GET

Deprecated, and scheduled for removal on 1 March 2027. Returns a hardcoded zero and never reported real data. Do not build against it.

https://services.dzaleka.com/api/analytics/pageviews

Action and submission endpoints

These endpoints accept request bodies and are used for export flows, skills matching, visit booking confirmations, and community voice submissions.

Export

/api/export
GETPOSTOPTIONS

Export multiple content collections in one response, with optional metadata and stats.

  • `GET` returns the export endpoint description and supported collections.
  • `POST` accepts a JSON body with `collections` and optional `options.includeMetadata` / `options.includeStats`.
curl -X POST "https://services.dzaleka.com/api/export" -H "Content-Type: application/json" -d '{"collections":["services","resources","events"],"options":{"includeMetadata":true,"includeStats":true}}'

Match Category

/api/match-category
POST

Accepts a skills category and returns a simple matching confirmation response for the skills exchange flow.

  • Body requires `category`.
curl -X POST "https://services.dzaleka.com/api/match-category" -H "Content-Type: application/json" -d '{"category":"Business"}'

Submit Voice

/api/submit-voice
POST

Submits a community voice/story payload for follow-up review and email notification.

  • Body requires `title`, `author`, and `content`.
curl -X POST "https://services.dzaleka.com/api/submit-voice" -H "Content-Type: application/json" -d '{"title":"Story title","author":"Name","content":"Story text"}'

Spatial GeoJSON Data

/api/v1/spatial.json
GET

Returns an RFC 7946 GeoJSON FeatureCollection of all 92+ Dzaleka spatial nodes, Site Register records, and Public Art catalogue data.

  • Supports query parameters: `category`, `zone`, `protocol`, and `format=json`.
  • CORS allowed (*). Published under CC BY-SA 4.0 Open Access.
curl -sS "https://services.dzaleka.com/api/v1/spatial.json?category=public_service"

Spatial CSV Export

/api/v1/spatial.csv
GET

Serves a tabular CSV file export of all 92+ Dzaleka spatial nodes for QGIS, Excel, or Python data analysis.

  • Supports query parameters: `category` and `zone`.
curl -sS "https://services.dzaleka.com/api/v1/spatial.csv"

Send Booking Confirmation

/api/send-booking-confirmation
POST

Processes a visit booking request and sends a booking confirmation email.

  • Used by the visit booking flow. Requires booking details in JSON.
curl -X POST "https://services.dzaleka.com/api/send-booking-confirmation" -H "Content-Type: application/json" -d '{"name":"Visitor","email":"visitor@example.com","visitDate":"2026-04-20","visitTime":"10:00","groupSize":"2-5","tourType":"standard","meetingPoint":"appfactory","paymentMethod":"cash"}'

Example responses

Collection response shape

{
  "status": "success",
  "count": 147,
  "data": {
    "services": [
      {
        "id": "sample-service",
        "collection": "services",
        "title": "Sample service"
      }
    ]
  }
}

Search response shape

{
  "status": "success",
  "query": "education",
  "totalResults": 3,
  "results": {
    "services": [
      {
        "slug": "sample-service",
        "title": "Education service",
        "collection": "services",
        "url": "/services/sample-service"
      }
    ],
    "events": [
      {
        "slug": "sample-event",
        "title": "Education workshop",
        "collection": "events",
        "url": "/events/sample-event"
      }
    ]
  },
  "cached": false
}

Export response shape

{
  "status": "success",
  "data": {
    "services": [
      {
        "id": "sample-service",
        "title": "Sample service"
      }
    ],
    "resources": [
      {
        "id": "sample-resource",
        "title": "Sample resource"
      }
    ],
    "metadata": {
      "exportDate": "2026-04-14T01:00:00.000Z",
      "totalCollections": 2,
      "collections": [
        "services",
        "resources"
      ]
    },
    "stats": {
      "totalItems": 2,
      "itemsPerCollection": {
        "services": 1,
        "resources": 1
      }
    }
  }
}