@maschinenlesbar.org/lobbyregister-cli
    Preparing search index...

    Class LobbyregisterClient

    Index
    • How many entries match a query (and filters).

      The API has no count-only mode: a live probe of /sucheJson (2026-06) showed it ignores pageSize (both 0 and 1 return the full result set, e.g. all 2351 entries for q=Energie, with the correct resultCount). So this downloads every matching record, like search, and reads resultCount. A blank q rejects with LobbyValidationError, as in search, and so do filters search would reject; options.allowUnknownFilters is search's. When resultCount and the number of downloaded results disagree, resultCount is returned all the same (see resultCountMismatch).

      Parameters

      • Optionalq: string
      • Optionalfilters: readonly SearchFilter[]
      • options: { allowUnknownFilters?: boolean } = {}

      Returns Promise<number>

    • Search the register; returns the full envelope (resultCount + results).

      /sucheJson ignores page/pageSize and always returns every match, so they are not sent: the client downloads the whole set and slices results itself (pageSize entries, 1-based page, default 1). resultCount stays the true total. Both must be integers >= 1, and page needs pageSize; otherwise LobbyValidationError is thrown before any request.

      q and sort may be omitted, but not blank: the register reads a blank q as no query (the whole register) and a blank sort as the default order, so "" or whitespace rejects with LobbyValidationError before any request.

      An unknown key in params is a LobbyValidationError. Each filter attribute must be one of SEARCH_FILTER_ATTRIBUTES (the register ignores any other and would return the whole unfiltered set), and each value one of SEARCH_FILTER_VALUES (the register matches nothing for any other: a reply of 0), else LobbyValidationError before any request. Values are matched case-insensitively and a bare sub-code from the data is sent with its parent (FOI_EU_LAWS → FOI_EUROPEAN_UNION|FOI_EU_LAWS; see normaliseFilter). allowUnknownFilters: true lifts both catalogues for an attribute or value the register added after this release. With filters, the reply must also echo every filter in searchParameters.facets; one the register ignored (it would return the unfiltered set) throws LobbyError. A reply without a facets array cannot be checked and is passed through.

      The register ignores an unknown or wrong-case sort and falls back to its default order. When searchParameters.sortOrder differs from the requested sort, the result carries sortIgnored: { requested, applied } (see ignoredSort); the data is still returned.

      Parameters

      Returns Promise<SearchResult>