---
title: "Retrieve scheduled service counts for a route over a date range."
method: GET
path: "/api/scheduledservice"
tags: ["/api"]
---

# Retrieve scheduled service counts for a route over a date range.

`GET /api/scheduledservice`

## Request body

- ScheduledServiceParams — Parameters for the `/api/scheduledservice` endpoint. Attributes: start_date: Start of date range. end_date: End of date range. route_id: Optional route filter. `None` returns all routes. agg: Aggregation level — `daily`, `weekly`, or `monthly`.
  - `start_date` string, date, required
  - `end_date` string, date, required
  - `route_id` string
  - `agg` string, required

## Response `200`

Success

- GetScheduledServiceResponse — Response for `/api/scheduledservice` — scheduled service counts and hours. Attributes: start_date_service_levels: Service levels at the start of the date range. end_date_service_levels: Service levels at the end of the date range. counts: Scheduled trip counts keyed by date string. service_hours: Service hours keyed by date string.
  - `start_date_service_levels` ServiceLevelsByDayKind, required — Service levels grouped by day type. Attributes: weekday: Weekday service breakdown. saturday: Saturday service breakdown. sunday: Sunday service breakdown.
    - `weekday` ByDayKindServiceLevels, required — Service levels for a specific day type (weekday, Saturday, or Sunday). Attributes: date: Reference date (YYYY-MM-DD). service_levels: Service count by hour (24 entries, index 0 = midnight).
      - `date` string, required
      - `service_levels` integer[], required
    - `saturday` ByDayKindServiceLevels, required — Service levels for a specific day type (weekday, Saturday, or Sunday). Attributes: date: Reference date (YYYY-MM-DD). service_levels: Service count by hour (24 entries, index 0 = midnight).
      - `date` string, required
      - `service_levels` integer[], required
    - `sunday` ByDayKindServiceLevels, required — Service levels for a specific day type (weekday, Saturday, or Sunday). Attributes: date: Reference date (YYYY-MM-DD). service_levels: Service count by hour (24 entries, index 0 = midnight).
      - `date` string, required
      - `service_levels` integer[], required
  - `end_date_service_levels` ServiceLevelsByDayKind, required — Service levels grouped by day type. Attributes: weekday: Weekday service breakdown. saturday: Saturday service breakdown. sunday: Sunday service breakdown.
    - `weekday` ByDayKindServiceLevels, required — Service levels for a specific day type (weekday, Saturday, or Sunday). Attributes: date: Reference date (YYYY-MM-DD). service_levels: Service count by hour (24 entries, index 0 = midnight).
      - `date` string, required
      - `service_levels` integer[], required
    - `saturday` ByDayKindServiceLevels, required — Service levels for a specific day type (weekday, Saturday, or Sunday). Attributes: date: Reference date (YYYY-MM-DD). service_levels: Service count by hour (24 entries, index 0 = midnight).
      - `date` string, required
      - `service_levels` integer[], required
    - `sunday` ByDayKindServiceLevels, required — Service levels for a specific day type (weekday, Saturday, or Sunday). Attributes: date: Reference date (YYYY-MM-DD). service_levels: Service count by hour (24 entries, index 0 = midnight).
      - `date` string, required
      - `service_levels` integer[], required
  - `counts` object, required
  - `service_hours` object, required

---

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