このサイトの数字はすべて、無料のJSON呼び出しで取得できます。開発者向けAPI
Every figure here is versioned JSON. Free to use, with or without a key.Every figure here is versioned JSON. Free to use, with or without a key.
ベースアドレス https://otranspo.ca/api/public/v1
Free, key optional · 1,000 a day, 60 a minute · code MIT · version 1.0.0
- アクセス
Free
key optional
- リクエスト制限
1,000 a day
60 a minute; more on Developer
- コードのライセンス
MIT
データは提供元の利用条件に従います
- バージョン
1.0.0
stable · 180 days’ notice
Plans
Free
1,000 calls a day, 60 a minute. No key needed; a free key counts your calls separately from everyone else on your network.
Credit ‘Data: OTranspo (otranspo.ca)’ wherever you show the data.
Developer
$10 a monthor $100 a year (CAD)
- 100,000 calls a day, 600 a minute
- Bulk downloads and full history
- Support by email
Journalists, students and council staff: the free tier is yours. Write to us if you need more for a story or a study.
How to send a key
curl -H "Authorization: Bearer otr_…" https://otranspo.ca/api/public/v1/route-states限界
Each answer carries X-RateLimit-Remaining (this minute) and X-RateLimit-Daily-Remaining (today, UTC). Over the limit you get 429 with the time it resets.
一度の呼び出しで、最初から最後まで
リクエスト
curl https://otranspo.ca/api/public/v1/route-statesこの回答は、このサイトから実際に取得したものです。お問い合わせのたびに取得します。
応答(短縮版) スキーマ
実行中…
すべてのリソース、39件
パスは、全体が書かれていない場合は /api/public/v1 から始まります。行を開くと、HTTPステータス、エラーコード、アクセス、不確かさ、スキーマが見られます。
索引と仕様ここから開始2
APIの一覧GET /api /public /v1—JSON
HTTPステータス
200
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
endpoints.id · endpoints.path
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
OpenAPI 3.1 仕様GET /openapi.json—JSON
HTTPステータス
200
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
operationId · path
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
現在の運行状況今この瞬間の状況5
現在出ている運休GET /current-cancellations—JSON
HTTPステータス
200 · 400 · 503
エラー理由コード
unsupported_query 400 · current_cancellations_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
trips.tripId · trips.routeId
出典と不確かさ
Only explicit CANCELED/DELETED notices for timetable trips in the current snapshot are listed. Empty or unavailable feeds do not prove that no trips were cancelled; outside-timetable notices may be withheld.
路線の状態:予定と実際GET /route-states—JSON
HTTPステータス
200 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
operatorId · routeId
出典と不確かさ
This is not an operator alert. Routes without published positions use positions_not_published; stale or missing feeds return unavailable.
インシデント(英語とフランス語)GET /incidents—JSON
HTTPステータス
200 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
publicId · slug · updates.id
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
公式のサービスアラートが一件GET /alerts /{alertId}format=json|csv · alertIdJSON · CSV
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_alert_id 400 · unsupported_format 400 · alert_not_found 400 · alert_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
alert.id · alert.operatorId
出典と不確かさ
The notice is the operator’s own wording. Kept wordings start when we first saw the notice, not when the operator posted it, and an empty list does not prove the notice never changed.
駅の発車案内GET /stations /{stationId}format=json|csv · stationIdJSON
HTTPステータス
200 · 400 · 404 · 503
エラー理由コード
invalid_station_id 400 · unsupported_format 400 · station_not_found 404 · station_board_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
station.id · lines.routeRecordId · departures.tripId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
データと報告各ページの元になっている数値11
信頼性の根拠データGET /reliability-evidenceformat=json|csvJSON · CSV
HTTPステータス
200 · 400 · 503
エラー理由コード
unsupported_format 400
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
routeId · window
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
路線の根拠データGET /routes /{routeId} /evidenceformat=json|csv · routeIdJSON
HTTPステータス
200 · 400 · 404 · 503
エラー理由コード
invalid_route_id 400 · unsupported_format 400 · route_not_found 404 · route_evidence_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
route.routeId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
日別の路線サービスGET /routes /{routeId} /service-evidencewindow=day|week|month|28d · date · format=json|csv · routeIdJSON
HTTPステータス
200 · 400 · 404 · 503
エラー理由コード
invalid_route_id 400 · unsupported_window 400 · invalid_service_date 400 · unsupported_format 400 · route_not_found 404 · route_service_evidence_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
routeId · window
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
駅または選挙区のサービスGET /places /{kind} /{placeId} /service-evidencedate · kind=station|ward · placeIdJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
unsupported_place_kind 400 · invalid_place_id 400 · unsupported_query 400 · invalid_service_date 400 · place_service_evidence_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
kind · placeId · operatorId
出典と不確かさ
Observation and cancellation completeness are explicitly unverified; no-position candidate counts remain null and comparison eligibility is false.
データ証拠のダウンロードGET /evidence /{evidenceId}format=json|csv · evidenceIdJSON · CSV
HTTPステータス
200 · 400 · 404
エラー理由コード
unsupported_format 400 · not_found 404
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
evidenceId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
選挙区の成績表GET /ward-scorecardsformat=json|csvJSON · CSV
HTTPステータス
200 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
snapshotId · wardId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
過去のスコアカードGET /historical-scorecardssnapshotId=historical-scorecards:<sha256> · routeIdJSON
HTTPステータス
200 · 400 · 404 · 422
エラー理由コード
snapshot_id_required 400 · invalid_route_id 400 · invalid_parameters 400 · snapshot_not_found 404 · route_detail_not_published 422 · route_not_in_snapshot 404
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
snapshotId · routeId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
サービス報告のアーカイブGET /service-report-archivekindJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_archive_query 400 · archive_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
kind · period
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
予測の精度GET /prediction-calibration—JSON
HTTPステータス
200 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
operatorId · routeId · routeContext · horizonBucket
出典と不確かさ
Later observed arrival is a comparison, not ground truth or a validated prediction interval; independent validation is false.
選択したサービスのレポートGET /api /insights /reports /selected?period={period}&date={YYYY-MM-DD}period=day|week|month · date=YYYY-MM-DD · operator=all|oc_transpo|sto · routeJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_selection 400 · selected_report_unavailable 503 · invalid_route_hour_selection 400 · route_hours_unavailable 503
アクセスと利用制限
匿名です。このパスには、公開 API の制限は設定されていません。
変わらない識別子
period · date · operator · method
出典と不確かさ
Without route, the selected-report contract is unchanged. With route, the selected-route-hours contract returns at most48 method-separated local-hour prediction groups, preserving requested report operator separately from routeOperator. These mutable retained predictions do not prove physical arrivals, complete archive coverage, zero service or an immutable publication.
予測比較の入力データGET /api /insights /reports /selected /comparison-evidence?period={period}&date={YYYY-MM-DD}period=day|week|month · date=YYYY-MM-DD · operator=all|oc_transpo|stoJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_comparison_evidence_selection 400
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
payload.edition · payload.selection · checksum.value
出典と不確かさ
This opt-in export preserves the exact captured route/day read results, declared calendar, comparison refusals and measured source-code manifest. It is bounded to 20,000 input rows and 8 MiB and does not claim an atomic database snapshot, statistical independence, confidence intervals, physical service delivery, causation, equivalence or model eligibility. Schema validation alone does not verify checksum or replay; consumers must perform those checks separately.
呼び出しの例
GET /api/insights/reports/selected/comparison-evidence?period={period}&date={YYYY-MM-DD}
履歴と再生すでに起きたこと6
過去の運休と欠便GET /historical-cancellationswindow=day|week|28d|month · date · assessment=noneJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
unsupported_query 400 · unsupported_window 400 · invalid_service_date 400 · unsupported_assessment 400 · historical_cancellations_unavailable 503 · historical_cancellation_limit_exceeded 400
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
period · records.tripId
出典と不確かさ
Historical polling completeness is unverified and schedule matching may be unassessed; unknown coverage is not zero cancellations.
市のリプレイGET /replaydate · routeFamily · operator · fromMinute · minutes · summaryJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
date_required 400 · invalid_route_family 400 · invalid_operator 400 · replay_positions_unavailable 503 · published_replay_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
date · routeFamily · operator
出典と不確かさ
Replay is historical and never live; only captured/published archive evidence is returned.
確認された車両(日ごと)GET /fleet-historydate · operator=all|oc_transpo|sto · route · feedIdJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_fleet_history_lookup 400 · invalid_fleet_history_date 400 · invalid_fleet_history_operator 400 · fleet_history_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
serviceDate · operator · route
出典と不確かさ
Retained feed observations are not a physical fleet inventory; missing retention is not zero service.
車両IDのフィード(日ごと)GET /fleet-history /feed-idsdate · operator=all|oc_transpo|sto · cursorJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_fleet_feed_id_selection 400 · invalid_fleet_history_date 400 · invalid_fleet_history_operator 400 · invalid_fleet_feed_id_cursor 400 · fleet_feed_id_census_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
date · operator · digest · collisionOrdinal
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
同じ車両IDの時間による変化GET /vehicles /{vehicleId} /visibility-historyformat=json|csv · vehicleIdJSON
HTTPステータス
200 · 400 · 404 · 503
エラー理由コード
invalid_vehicle_id 400 · unsupported_format 400 · vehicle_history_unavailable 503 · vehicle_history_not_found 404
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
vehicleId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
Vehicles seen, in bulkGET /bulk /fleet-historyfrom · to · operator=all|oc_transpo|sto · route · feedIdJSON
HTTPステータス
200 · 400 · 401 · 403 · 429 · 503
エラー理由コード
unsupported_query 400 · invalid_bulk_range 400 · invalid_fleet_history_lookup 400 · invalid_fleet_history_operator 400 · fleet_history_unavailable 503 · api_key_required 401 · invalid_api_key 401 · plan_required 403 · rate_limited 429
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
serviceDate · operator · route
出典と不確かさ
Each line is the fleet-history evidence for one seven-day window; retained feed observations are not a physical fleet inventory and missing retention is not zero service.
時刻表とオフライン公開されている時刻表6
路線ごとの時刻表GET /transit-planning /{routeId}date · routeIdJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_route_or_date 400 · use_history_for_past_dates 400 · planning_baseline_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
routeId · serviceDate
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
ネットワーク全体の時刻表GET /transit-planning /networkdateJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_parameters 400 · invalid_service_date 400 · network_baseline_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
serviceDate
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
二点間の道路経路POST /transit-planning /street-pathbodyJSON
HTTPステータス
200 · 400 · 503
エラー理由コード
invalid_body 400 · invalid_segment 400
アクセスと利用制限
匿名で利用できますが、信頼できるオリジンが必要です。分散型のレート制限が有効な場合は、毎分60件までです。
変わらない識別子
from · to
出典と不確かさ
Path may be unavailable when routing source data is absent; no path is not evidence of no accessible route.
オフライン用時刻表パックGET /offline-pack—JSON
HTTPステータス
200 · 503
エラー理由コード
offline_pack_not_published 503 · offline_pack_unavailable 503
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
packId · digest
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
オフラインパックのマニフェストGET /offline-pack /manifestpackJSON
HTTPステータス
200 · 404 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
packId · shards.id
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
オフラインパックの一部GET /offline-pack /shards /{id}idbytes
HTTPステータス
200 · 404 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
id · digest
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
登録簿と方針変更した内容とその理由6
訂正の登録簿GET /correctionsformat=json|csvJSON · CSV
HTTPステータス
200 · 400
エラー理由コード
unsupported_format 400
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
records.id · records.revision
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
ポリシー一覧GET /policy-register—JSON
HTTPステータス
200
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
records.id · records.revision
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
アクセシビリティの保証GET /accessibility-assurance—JSON
HTTPステータス
200
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
evidence.id · remediationLog.id
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
地域の対象範囲とデータの新しさGET /regional-coverage—JSON
HTTPステータス
200 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
operators.operatorId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
通知とヘルプの窓口GET /journey-service-policy—JSON
HTTPステータス
200
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
contractVersion · channels.channel
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
車両の表示確認GET /fleet-presentation—JSON
HTTPステータス
200 · 503
エラー理由コード
—
アクセスと利用制限
匿名でアクセスできます。分散レート制限がオンの場合は、毎分60回までです。
変わらない識別子
evidence.operatorSamples.operatorId
出典と不確かさ
Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.
共有リンクとソーシャルカード3
アクセスと利用
アクセスと利用Limits, caching, versions, privacy and licence
- アクセス
- Every GET resource is public and free to use, with or without a key. Bulk and history resources need a Developer key. The two POST resources (making a share link, drawing a street path) only accept requests from otranspo.ca itself.
- リクエスト制限
- 1,000 calls a day and 60 a minute, with or without a free key; 100,000 a day and 600 a minute on the Developer plan. Read the X-RateLimit-* headers on every answer; X-RateLimit-Status says when limits are degraded.
- Keys
- Send a key as Authorization: Bearer otr_… or X-API-Key. Never in the address. A wrong, revoked or expired key gets 401, never a keyless answer.
- キャッシュ
- The index is kept 30 seconds by your browser and 5 minutes at the edge. Live resources such as cancellations are sent no-store. Offline timetable pieces never change once published.
- バージョン
- 各レスポンスには、スキーマ名とschemaVersionが入っています。互換性のない変更は、新しい /v2 パスで提供します。Deprecation、Sunset、Linkヘッダーで180日前に知らせます。
- プライバシー
- 個人データは送らないでください。道路経路に送られた座標は、そのリクエストにだけ使います。記録も保存もしません。応答には、アカウントID、経路検索、メールアドレス、ネットワークアドレス、内部の証拠リンクは含まれません。
- 不明はゼロではありません
- リソースが存在していても、応答が利用できない場合があります。status、evidenceState、情報源の時刻、対象範囲、制限事項を読んでください。路線の状態は、時刻表と実際に見られたバスを比べたものです。事業者からの運行情報ではありません。
- ライセンス
- コード:MIT。OC TranspoとSTOのデータは、それぞれのオープンデータ規約に従い、クレジット表示が必要です。当サイトの数値:CC BY 4.0、クレジットは otranspo.ca です。
- 未対応
- No SDK is published, no second city is supported, and partner tenant-key access is not open. This page does not claim them.