Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Scrub boilerplate from the raw H1 of an executive-brief so it can be used as the article <title>. Per seo-metadata-contract.md ยง2:

      • strip a leading Executive Brief โ€” / Executive Brief - prefix (the template boilerplate that masks the story)
      • when lang is provided, also strip the translated boilerplate prefix in that language (Exekutiv sammanfattning โ€” in SV, Zusammenfassung โ€” in DE, Synthรจse exรฉcutive โ€” in FR, etc.). See ./brief-prefixes.ts for the per-language dictionary.
      • strip a trailing โ€” YYYY-MM-DD / - YYYY-MM-DD / YYYY-MM-DD (dates belong in article:published_time, not the SERP title)
      • if the cleaned title is < 20 chars โ€” too short to be a real story headline โ€” return null so the caller can fall back to a BLUF sentence or to the fallback subfolder-based title.
      • if the cleaned title equals (case-insensitive, punctuation-stripped) the prettified subfolder fallback (e.g. Government Propositions for the propositions subfolder), return null so the caller falls back to a BLUF-synthesised title with a real actor + verb. Without this guard, lazy template H1s like # Executive Brief โ€” Government Propositions 2026-05-08 ship as the bare category label.

      Parameters

      • raw: string
      • Optionalsubfolder: string
      • Optionallang: Language

      Returns string