Fara beint í efni

Rafmennt API and developer documentation

Read published information about electrical-trades education in Iceland: courses, upcoming groups, events, fees and journeyman examinations. Most source content is Icelandic; search with topic keywords such as ljósleiðarar or sveinspróf.

Access is free and anonymous. No account, API key or authentication setup is needed. These interfaces only search, list and read public content. They do not access the CMS, drafts, personal records, registrations or payments.

OpenAPI specification · Content index · Agent instructions · Access guidance

Quickstart

Search for a topic, then use a returned path to read its canonical page. The following requests are safe to try on the live public service.

Search public content — bash
curl -sS 'https://www.rafmennt.is/api/v1/search?q=raf&limit=5'
Read a page as Markdown — bash
curl -sS 'https://www.rafmennt.is/api/v1/page?path=/endurmenntun/verdskra&format=markdown'

Use the canonical source URL when citing a result. Course dates, availability, eligibility and membership-based prices can change; read the selected course page before making a recommendation. The pricing document contains the published fee table.

Public REST API

API directory. All REST operations use GET; HEAD and cross-origin OPTIONS are supported.

Dates use YYYY-MM-DD. List endpoints accept limit (1–40, default 40) and cursor. Responses contain results, total, pageSize and nextCursor. Follow the HTTP Link with rel="next", or pass nextCursor with the same filters. A null nextCursor marks the last page. A stale cursor returns INVALID_PAGINATION; restart without cursor.

json
{"results": [], "total": 0, "pageSize": 40, "nextCursor": null}

For bulk reference data, use the Schema Feeds index and JSON Lines feeds for courses, events, pages and articles. These contain published Schema.org entities.

Errors, limits and retries

REST errors use application/problem+json (RFC 9457), with status, code, detail and hint. Invalid filters return 400; unknown or private pages return 404; unsupported methods return 405; temporary service failures return 500.

json
{
"type": "about:blank",
"title": "Not found",
"status": 404,
"detail": "The page is unknown or is not published public content.",
"code": "PAGE_NOT_FOUND",
"hint": "Use a path returned by public search. Private and CMS pages are unavailable.",
"instance": "/api/v1/page"
}

REST, MCP, A2A and NLWeb share a limit of 120 requests per 60 seconds per IP at each Cloudflare location. RateLimit-Policy describes the quota. Cloudflare does not expose an exact remaining count. On HTTP 429, wait the Retry-After interval (60 seconds). For temporary network or 5xx failures, retry with exponential backoff and jitter. Reading is safe to retry; no operation creates or changes a record.

MCP and browser agents

Connect an MCP client to the server described in this card, using Streamable HTTP at https://www.rafmennt.is/mcp. Discover the live tools with tools/list: search_public_site, find_courses, list_upcoming_events and read_public_page. Tool input and output schemas are self-contained; errors carry structured code, message and hint fields.

MCP client configuration — json
{
"mcpServers": {
"rafmennt-public": {
"type": "streamable-http",
"url": "https://www.rafmennt.is/mcp"
}
}
}

Compatible browsers also receive WebMCP tools on public pages, including open_public_page. Support is feature-detected through document.modelContext, with navigator.modelContext as a compatibility fallback. Browser tools are removed when leaving the public site layout. The CMS has no public browsing tools.

Installable skills with SHA-256 digests · Agent Plugin manifest · Resource discovery · A2A card

NLWeb search and streaming

NLWeb 0.55 supports keyword retrieval in list mode. POST a JSON query.text and optionally prefer.streaming. JSON responses carry _meta and typed results, or an application-level failure with an error code. Streaming uses SSE start, result, error and complete events.

Search with NLWeb — bash
curl -sS 'https://www.rafmennt.is/ask' \
-H 'Content-Type: application/json' \
--data '{"query":{"text":"raf"},"prefer":{"mode":"list"}}'
Stream NLWeb results — bash
curl -N 'https://www.rafmennt.is/ask?q=raf&streaming=true'

Use the canonical origin shown above directly for POST requests. Redirects from another hostname may discard the request body. Generated summaries, personal conversations and autonomous actions are not supported.

Versioning and testing

REST version 1 lives at /api/v1 and sends the API-Version: 1 response header.

  • Existing /agent/search, /agent/courses, /agent/events and /agent/page URLs remain compatible aliases.
  • Clients should accept new response fields. Breaking changes will use a new major URL version.
  • Before retiring a version, we will publish Deprecation and Sunset headers with at least 90 days notice here.

Testing

Try the live endpoints for small read-only integration checks. Automated tests use an isolated local database; a separate public sandbox is not available.

Keep queries free of personal data. For a content question the site does not answer, contact Rafmennt.