---
title: "Retrieve delivered service hours for a line over a date range."
method: GET
path: "/api/service_hours"
tags: ["/api"]
---

# Retrieve delivered service hours for a line over a date range.

`GET /api/service_hours`

## Request body

- ServiceHoursParams — Parameters for the `/api/service_hours` endpoint. Attributes: line_id: Optional line filter. `None` returns all lines. start_date: Start of date range. end_date: End of date range. agg: Aggregation level — `daily`, `weekly`, or `monthly`.
  - `line_id` string
  - `start_date` string, date, required
  - `end_date` string, date, required
  - `agg` string, required

## Response `200`

Success

- ServiceHoursResponse — Response for `/api/service_hours` — scheduled vs. delivered service hours. Attributes: data: Service hours comparison data.
  - `data` object, required

## Changes

- **2026-07-17** `4bc220e599eb` — 1 warning, 1 info
  - removed the request property `single_route_id`
  - added the new optional request property `line_id`
- **2025-03-29** `4aea4f724666` — 1 warning, 1 info
  - removed the request property `line_id`
  - added the new optional request property `single_route_id`

[Change history](https://skmtc.dev/transitmatters/apis/data-dashboard-api/changes/api/service_hours/get.md)

---

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