---
title: "Search Courses By Condition"
method: POST
path: "/courses/search"
tags: ["Courses"]
---

# Search Courses By Condition

`POST /courses/search`

進階搜尋，根據條件取得課程。可以使用巢狀條件。

## Request body

- union
  - union[] — Complex course query condition.
    - union
      - CourseQueryCondition — recursive
      - CourseCondition — Single course query condition.
        - `row_field` 'id' | 'chinese_title' | 'english_title' | 'credit' | 'size_limit' | 'freshman_reservation' | 'object' | 'ge_type' | 'language' | 'note' | 'suspend' | 'class_room_and_time' | 'teacher' | 'prerequisite' | 'limit_note' | 'expertise' | 'program' | 'no_extra_selection' | 'required_optional_note', required — Course field names for querying.
        - `matcher` string, required — 搜尋的值
        - `regex_match` boolean — 是否使用正則表達式
      - 'and' | 'or' — Query operation type.
  - CourseCondition — Single course query condition.
    - `row_field` 'id' | 'chinese_title' | 'english_title' | 'credit' | 'size_limit' | 'freshman_reservation' | 'object' | 'ge_type' | 'language' | 'note' | 'suspend' | 'class_room_and_time' | 'teacher' | 'prerequisite' | 'limit_note' | 'expertise' | 'program' | 'no_extra_selection' | 'required_optional_note', required — Course field names for querying.
    - `matcher` string, required — 搜尋的值
    - `regex_match` boolean — 是否使用正則表達式

## Response `200`

Successful Response

- CourseData[]
  - `id` string, required — 課號
  - `chinese_title` string, required — 課程中文名稱
  - `english_title` string, required — 課程英文名稱
  - `credit` string, required — 學分數
  - `size_limit` string, required — 人限
  - `freshman_reservation` string, required — 新生保留人數
  - `object` string, required — 通識對象
  - `ge_type` string, required — 通識類別
  - `language` '中' | '英', required — Course language options.
  - `note` string, required — 備註
  - `suspend` string, required — 停開註記
  - `class_room_and_time` string, required — 教室與上課時間
  - `teacher` string, required — 授課教師
  - `prerequisite` string, required — 擋修說明
  - `limit_note` string, required — 課程限制說明
  - `expertise` string, required — 第一二專長對應
  - `program` string, required — 學分學程對應
  - `no_extra_selection` string, required — 不可加簽說明
  - `required_optional_note` string, required — 必選修說明

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nthusa/apis/nthu-data-api.md) · [All operations](https://skmtc.net/nthusa/apis/nthu-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nthusa/nthu-data-api/versions/a7a2f39dbc76/schema)
