European Parliament MCP Server API - v1.3.9
    Preparing search index...
    • Internal

      Normalise an MEP identifier into the bare token that matches the EP API's q.author field for /parliamentary-questions (typically person/{id}).

      The question client applies the author filter client-side via case-insensitive substring match against q.author, so the safest portable token is the trailing non-empty segment after the last / or - delimiter:

      • person/124810124810
      • MEP-124810124810
      • 124810124810

      Returning the bare id makes the filter robust to whichever upstream formatting the EP API uses (person/{id} is the documented shape). Trailing delimiters are tolerated — the function returns the original trimmed input rather than an empty string.

      Parameters

      • subjectId: string

      Returns string