---
title: "Search Schools"
method: POST
path: "/school/_search"
tags: ["School"]
---

# Search Schools

`POST /school/_search`

Search for `Schools` with filtering capabilities.

## Query parameters

- `limit` integer
- `offset` integer

## Request body

- object
  - `filter` SchoolFilter, required — Filter object for School
    - `equals` SchoolFilterEquals — Equality/Inequality filter fields for School
      - `id` string, uuid, nullable — Unique identifier for the School
      - `meta` MetaFilterEquals — Equality/Inequality filter fields for Meta
        - `createdAt` string, date-time, nullable — Timestamp when the resource was created
        - `createdBy` string, uuid, nullable — User who created the resource
        - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
        - `updatedBy` string, uuid, nullable — User who last updated the resource
      - `external` ExternalFilterEquals — Equality/Inequality filter fields for External
        - `sourceID` string, nullable — The ID of the external source
        - `source` string, nullable — The source of the external information
      - `title` string, nullable — The title of the school
      - `unitID` string, uuid, nullable — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
      - `unitCode` string, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` string, nullable — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` string, nullable — Municipality code of the school, is used in reports and printed on grade documents
      - `schoolType` 'GR' | 'GY' | 'FS' — The type of schooling provided at the school
    - `notEquals` SchoolFilterEquals — Equality/Inequality filter fields for School
      - `id` string, uuid, nullable — Unique identifier for the School
      - `meta` MetaFilterEquals — Equality/Inequality filter fields for Meta
        - `createdAt` string, date-time, nullable — Timestamp when the resource was created
        - `createdBy` string, uuid, nullable — User who created the resource
        - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
        - `updatedBy` string, uuid, nullable — User who last updated the resource
      - `external` ExternalFilterEquals — Equality/Inequality filter fields for External
        - `sourceID` string, nullable — The ID of the external source
        - `source` string, nullable — The source of the external information
      - `title` string, nullable — The title of the school
      - `unitID` string, uuid, nullable — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
      - `unitCode` string, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` string, nullable — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` string, nullable — Municipality code of the school, is used in reports and printed on grade documents
      - `schoolType` 'GR' | 'GY' | 'FS' — The type of schooling provided at the school
    - `greaterThan` SchoolFilterRange — Range filter fields for School
      - `meta` MetaFilterRange — Range filter fields for Meta
        - `createdAt` string, date-time, nullable — Timestamp when the resource was created
        - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
      - `external` ExternalFilterRange — Range filter fields for External
    - `smallerThan` SchoolFilterRange — Range filter fields for School
      - `meta` MetaFilterRange — Range filter fields for Meta
        - `createdAt` string, date-time, nullable — Timestamp when the resource was created
        - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
      - `external` ExternalFilterRange — Range filter fields for External
    - `greaterOrEqual` SchoolFilterRange — Range filter fields for School
      - `meta` MetaFilterRange — Range filter fields for Meta
        - `createdAt` string, date-time, nullable — Timestamp when the resource was created
        - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
      - `external` ExternalFilterRange — Range filter fields for External
    - `smallerOrEqual` SchoolFilterRange — Range filter fields for School
      - `meta` MetaFilterRange — Range filter fields for Meta
        - `createdAt` string, date-time, nullable — Timestamp when the resource was created
        - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
      - `external` ExternalFilterRange — Range filter fields for External
    - `contains` SchoolFilterContains — Contains filter fields for School
      - `id` string[] — Unique identifier for the School
      - `meta` MetaFilterContains — Contains filter fields for Meta
        - `createdBy` string[] — User who created the resource
        - `updatedBy` string[] — User who last updated the resource
      - `external` ExternalFilterContains — Contains filter fields for External
        - `sourceID` string[] — The ID of the external source
        - `source` string[] — The source of the external information
      - `title` string[] — The title of the school
      - `unitID` string[] — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
      - `unitCode` string[] — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` string[] — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` string[] — Municipality code of the school, is used in reports and printed on grade documents
      - `schoolType` SchoolType[] — Type of schooling provided at the school
    - `notContains` SchoolFilterContains — Contains filter fields for School
      - `id` string[] — Unique identifier for the School
      - `meta` MetaFilterContains — Contains filter fields for Meta
        - `createdBy` string[] — User who created the resource
        - `updatedBy` string[] — User who last updated the resource
      - `external` ExternalFilterContains — Contains filter fields for External
        - `sourceID` string[] — The ID of the external source
        - `source` string[] — The source of the external information
      - `title` string[] — The title of the school
      - `unitID` string[] — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
      - `unitCode` string[] — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` string[] — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` string[] — Municipality code of the school, is used in reports and printed on grade documents
      - `schoolType` SchoolType[] — Type of schooling provided at the school
    - `like` SchoolFilterLike — LIKE filter fields for School
      - `meta` MetaFilterLike — LIKE filter fields for Meta
      - `external` ExternalFilterLike — LIKE filter fields for External
        - `sourceID` string, nullable — The ID of the external source
        - `source` string, nullable — The source of the external information
      - `title` string, nullable — The title of the school
      - `unitCode` string, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` string, nullable — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` string, nullable — Municipality code of the school, is used in reports and printed on grade documents
    - `notLike` SchoolFilterLike — LIKE filter fields for School
      - `meta` MetaFilterLike — LIKE filter fields for Meta
      - `external` ExternalFilterLike — LIKE filter fields for External
        - `sourceID` string, nullable — The ID of the external source
        - `source` string, nullable — The source of the external information
      - `title` string, nullable — The title of the school
      - `unitCode` string, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` string, nullable — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` string, nullable — Municipality code of the school, is used in reports and printed on grade documents
    - `null` SchoolFilterNull — Null filter fields for School
      - `meta` MetaFilterNull — Null filter fields for Meta
        - `createdBy` boolean, nullable — User who created the resource
        - `updatedAt` boolean, nullable — Timestamp when the resource was last updated
        - `updatedBy` boolean, nullable — User who last updated the resource
      - `external` ExternalFilterNull — Null filter fields for External
        - `sourceID` boolean, nullable — The ID of the external source
        - `source` boolean, nullable — The source of the external information
      - `unitID` boolean, nullable — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
      - `unitCode` boolean, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` boolean, nullable — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` boolean, nullable — Municipality code of the school, is used in reports and printed on grade documents
    - `notNull` SchoolFilterNull — Null filter fields for School
      - `meta` MetaFilterNull — Null filter fields for Meta
        - `createdBy` boolean, nullable — User who created the resource
        - `updatedAt` boolean, nullable — Timestamp when the resource was last updated
        - `updatedBy` boolean, nullable — User who last updated the resource
      - `external` ExternalFilterNull — Null filter fields for External
        - `sourceID` boolean, nullable — The ID of the external source
        - `source` boolean, nullable — The source of the external information
      - `unitID` boolean, nullable — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
      - `unitCode` boolean, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
      - `csnSchoolCode` boolean, nullable — The School Code provided by CSN, required for reports to CSN
      - `municipalityCode` boolean, nullable — Municipality code of the school, is used in reports and printed on grade documents
    - `orCondition` boolean, required — OrCondition decides if this filter is within an OR-condition or AND-condition
    - `nestedFilters` SchoolFilter[] — NestedFilters of the School, useful for more complex filters

## Response `200`

Response for School Search operation - returns filtered School results

- object
  - `data` School[] — Array of School objects
    - `id` string, uuid, required — Unique identifier for the School
    - `meta` Meta — Meta contains information about the creation and modification of a resource for auditing purposes
      - `createdAt` string, date-time, required — Timestamp when the resource was created
      - `createdBy` string, uuid, nullable — User who created the resource
      - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
      - `updatedBy` string, uuid, nullable — User who last updated the resource
    - `external` External — External is a reusable object that can be used to store external information from another system, used for third-party integration tracking.
      - `sourceID` string, nullable — The ID of the external source
      - `source` string, nullable — The source of the external information
    - `title` string, required — The title of the school
    - `unitID` string, uuid, nullable — The ID of the Unit the school belongs to. Null if the school is not assigned to a Unit.
    - `unitCode` string, nullable — The School Unit Code provided by SCB, is used in reports and printed on grade documents
    - `csnSchoolCode` string, nullable — The School Code provided by CSN, required for reports to CSN
    - `municipalityCode` string, nullable — Municipality code of the school, is used in reports and printed on grade documents
    - `schoolType` 'GR' | 'GY' | 'FS', required — The type of schooling provided at the school
  - `pagination` Pagination — Pagination parameters for controlling result sets in list operations
    - `offset` integer, required — Number of items to skip from the beginning of the result set
    - `limit` integer, required — Maximum number of items to return in the result set
    - `total` integer, required — Total number of items available for pagination

## Other responses

- `400` — Bad Request - The request was malformed or contained invalid parameters
- `401` — Unauthorized - The request is missing valid authentication credentials
- `403` — Forbidden - Request is authenticated, but the user is not allowed to perform the operation
- `404` — Not Found - The requested resource does not exist
- `409` — Conflict - The request could not be completed due to a conflict
- `422` — Validation error for School Search operation - request data failed validation
- `429` — Too Many Requests - When the rate limit has been exceeded
- `500` — Internal Server Error - An unexpected server error occurred

---

[API](https://skmtc.net/meitner/apis/directory-api.md) · [All operations](https://skmtc.net/meitner/apis/directory-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/meitner/directory-api/revisions/014348a7bc35/schema)
