PoliscopePoliscope
APIReferenzSearch

Exhaustive keyword scan (experimental)

GET
/search/scan

EXPERIMENTAL — this endpoint may change or be removed without notice. Exhaustive keyword scan for data analysis and export. Evaluates the boolean query as a strict full-text filter and returns every matching chunk, flat (ungrouped) and offset-paginated. Unlike /search there is no relevance ranking: all hits satisfy the query equally and arrive in a stable order. Paginate via limit/offset until offset + data.length reaches meta.pagination.total.

AuthorizationBearer <token>

API key as Bearer token

In: header

Query Parameters

q*string

Boolean keyword query evaluated as a strict full-text filter — a chunk either matches or it does not; there is no ranking. Supports AND (default, also implicit between adjacent terms), OR (alternation), NOT or leading - (exclusion), ( … ) for grouping, "…" for exact phrase match. Example: windkraft AND ("erneuerbare energien" OR solar) -atomkraft. Operators must be uppercase — lowercase counterparts are treated as regular terms.

Length1 <= length <= 1000
types?|array<>

chunkType filter as repeated query params or comma-separated list. Defaults to all types. Allowed values: agendaItemTitle, agendaItemDescription, document, proposalTitle, proposalDescription

entityIds?|array<>

Entity IDs (Regionalschlüssel) as repeated query params or comma-separated list. Use * suffix for prefix matching: 01* matches all entities in Schleswig-Holstein, 03101 matches LK Braunschweig exactly. Unallowed entities are silently stripped; the search runs only against permitted entities. Mutually exclusive with bbox.

bbox?string

Bounding box as 'west,south,east,north' (lon/lat). Resolves to entities whose geographic bounds intersect this box. Only entities the caller is permitted to access are included. Mutually exclusive with entities.

levels?|array<>

Administrative levels as repeated query params or comma-separated list. Values: 10=Bundesland, pr=Planungsregion, 40=Landkreis, 50=Verbandsgemeinde, 60=Kommune

dateFrom?string

Filter from this date (inclusive, ISO 8601)

Formatdate
dateTo?string

Filter up to this date (inclusive, ISO 8601)

Formatdate
newSince?string

Only return results ingested since this datetime (inclusive, ISO 8601). Useful for polling new content since the last check.

Formatdate-time
limit?integer

Page size (number of chunks per page, max 1000).

Default500
Range1 <= value <= 1000
offset?integer

Number of matching chunks to skip. Keep query and filters identical across pages of one scan. The scan runs against a live index: items ingested or removed mid-scan can shift the sequence, so a chunk near a page boundary may be skipped or repeated. Large offsets get progressively slower.

Default0
Range0 <= value <= 9007199254740991

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.poliscope.de/v2/search/scan?q=string"
{
  "data": [
    {
      "id": "string",
      "chunkType": "agendaItemTitle",
      "groupKey": "string",
      "groupType": "meeting",
      "agendaItemId": "string",
      "documentId": "string",
      "proposalId": "string",
      "entityId": "string",
      "entityLevel": "string",
      "date": "string"
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "limit": 0,
      "offset": 0
    }
  }
}
{
  "error": "BAD_REQUEST",
  "message": "string"
}
{
  "error": "BAD_REQUEST",
  "message": "string"
}
{
  "error": "BAD_REQUEST",
  "message": "string"
}
{
  "error": "BAD_REQUEST",
  "message": "string"
}