---
title: "Get Bus Schedules"
method: GET
path: "/buses/schedules"
tags: ["Buses"]
---

# Get Bus Schedules

`GET /buses/schedules`

取得指定條件的公車時刻表。
- **details=False**: 回傳簡易時刻表（僅發車時間）。
- **details=True**: 回傳詳細時刻表（包含每站預估到達時間）。

## Query parameters

- `bus_type` 'all' | 'main' | 'nanda', required — Bus route type.
- `day` 'weekday' | 'weekend' | 'current', required — Day type including current day option.
- `direction` 'all' | 'up' | 'down', required — Bus direction.
- `details` boolean — 是否包含詳細站點時間資訊
- `time` string, nullable — 時間。若搜尋 day 選擇 current 時失效。
- `limits` integer, nullable — 最大回傳資料筆數。預設為 5 筆，可以透過查詢參數調整。

## Response `200`

取得公車時刻表信息。

- union[]
  - union
    - BusDetailedSchedule — Unified detailed bus schedule for both Main and Nanda campus.
      - `dep_info` BusSchedule, required — Unified bus schedule entry for both Main and Nanda campus.
        - `time` string, required — 發車時間
        - `description` string, required — 備註
        - `dep_stop` string, required — 發車地點
        - `line` string — 路線 (主校區: red/green, 南大: route_1/route_2)
        - `bus_type` 'route_83' | 'large-sized_bus' | 'middle-sized_bus', required — Bus vehicle type.
      - `stops_time` BusArriveTime[], required — 各站發車時間
        - `stop` string, required — 公車站牌名稱
        - `arrive_time` string, required — 預計到達時間
    - BusSchedule — Unified bus schedule entry for both Main and Nanda campus.
      - `time` string, required — 發車時間
      - `description` string, required — 備註
      - `dep_stop` string, required — 發車地點
      - `line` string — 路線 (主校區: red/green, 南大: route_1/route_2)
      - `bus_type` 'route_83' | 'large-sized_bus' | 'middle-sized_bus', required — Bus vehicle type.

## Other responses

- `422` — Validation Error

---

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