GTFS リアルタイムとは
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
交通機関に関するリアルタイムの最新情報をユーザーに提供することで、乗換案内サービスの利便性が大幅に高まります。ユーザーは、今現在の運行状況に基づく発着時刻の最新情報を参考にして、移動計画をよりスムーズに立てることができます。万一遅延が発生した場合でも、出かける時刻を遅らせるなどして対応できます。
GTFS リアルタイムは、公共交通機関が運行車両に関するリアルタイムの最新情報をデベロッパーに提供できるようにするためのフィードの仕様です。この仕様は、公共交通機関の時刻表とその地理的情報に使用されるオープンなデータ形式である GTFS(General Transit Feed Specification)の拡張版です。GTFS リアルタイムは、実装のしやすさ、GTFS との相互運用性、乗客情報の重視などを念頭において設計されています。
この仕様の策定は、当初のリアルタイムの運行情報の提携交通機関や多数の乗換案内デベロッパーと Google との間で協力して行われました。現在は、Apache 2.0 ライセンスの下で公開されています。
Google マップのリアルタイムの運行情報とは
リアルタイムの運行情報は、リアルタイムの交通情報を Google マップとモバイル Google マップのユーザーに提供するサービスです。これらの交通情報には、リアルタイムの出発および到着時刻や運行情報が含まれています。
リアルタイムの運行情報では、出発時刻と運行情報の 2 種類の更新情報をリアルタイムでユーザーに提供します。乗換案内パートナーのフィードには、これらの更新情報が表示されます。Google では、交通機関の静的な時刻表で幅広く使用されている GTFS 形式に対応する GTFS リアルタイムのフィード形式を作成しました。Google で定期的に取得できる場所にフィードを送信すると、フィードは直ちに処理されてリアルタイムの運行情報として更新されます。
利用方法
- 以下の概要を読みます。
- 提供するフィードのタイプを決めます。
- フィードの例に目を通します。
- リファレンスを参考にして独自のフィードを作成します。
- フィードを公開します。
GTFS リアルタイムのフィードの概要
この仕様では現在、次のタイプの情報をサポートしています。
- ルート更新情報 - 遅延、中止、ルートの変更など
- 運行情報 - 停車地の変更や、駅、ルート、または路線網全体に関係する不測の事態
- 車両の現在地 - 現在地や渋滞の度合いなど、車両に関する情報
フィードで異なるタイプのエンティティを組み合わせることもできます(必須ではありません)。フィードの配信は HTTP 経由で行います。更新頻度は高いものとなります。ファイル自体は通常のバイナリ ファイルなので、どのタイプのウェブサーバーでもファイルのホストと配信が可能です(他の転送プロトコルも使用できます)。あるいは、ウェブ アプリケーション サーバーを使用した場合は、有効な HTTP GET
リクエストに対するレスポンスとしてフィードを返すこともできます。フィードを更新、取得する頻度についても、その具体的な方法についても、特に制約はありません。
GTFS リアルタイムは、運行車両の「今現在の」状態を表すことができます。したがって、フィードは定期的に(できれば車両位置自動特定システムから新しいデータが送信されたときは常に)更新される必要があります。
フィードタイプに関する詳細をご覧ください。
GTFS リアルタイムのデータ交換形式はプロトコル バッファをベースとしています。
プロトコル バッファは、構造化データをシリアル化するための、言語とプラットフォームに中立なメカニズムです(XML のようですが、XML より小さく、高速で、シンプルです)。データ構造は gtfs-realtime.proto ファイルで定義されます。さらにこのファイルを基に、Java、C++、Python などの各種言語を使ってさまざまなデータ ストリームとの間で構造化データを簡単に読み書きするためのソースコードが生成されます。
プロトコル バッファに関する詳細をご覧ください。
データ構造
要素の階層と、各要素のタイプの定義は、gtfs-realtime.proto ファイルで指定します。
このテキスト ファイルを使って、必要なライブラリをお好みのプログラミング言語で生成します。これらのライブラリは、有効な GTFS リアルタイムのフィードを生成するために必要なクラスや関数を提供するものです。ライブラリを利用することで、フィードの作成が簡単になるだけでなく、有効なフィードだけを生成することができます。
データ構造に関する詳細をご覧ください。
参考情報
GTFS リアルタイムに関するディスカッションに参加してこの仕様に対する変更や追加を提案するには、GTFS リアルタイムのヘルプグループにご登録ください。
Google マップとリアルタイムの運行情報
リアルタイムの運行情報は、交通機関の運行状況をリアルタイムにユーザーに伝える Google マップの機能です。Google マップにリアルタイムの交通情報を提供することに興味をお持ちの公共交通機関の方は、Google 乗換案内パートナー ページをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eGTFS Realtime allows public transportation agencies to provide real-time updates, like delays and vehicle positions, to applications, enhancing the rider experience.\u003c/p\u003e\n"],["\u003cp\u003eThe data is provided in a feed based on Protocol Buffers, allowing for efficient and flexible data exchange.\u003c/p\u003e\n"],["\u003cp\u003eLive Transit Updates within Google Maps uses GTFS Realtime feeds to give users access to real-time departure times and service alerts.\u003c/p\u003e\n"],["\u003cp\u003eTransit agencies can create their own feeds using the provided specification and examples to integrate their data with applications like Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eThe GTFS Realtime specification was designed with ease of implementation in mind and focuses on providing accurate passenger information.\u003c/p\u003e\n"]]],["GTFS Realtime provides transit agencies a method to share live updates with app developers, enhancing user experience with real-time arrival/departure times and service alerts. Key information types include trip updates (delays, cancellations), service alerts (station issues), and vehicle positions. Agencies can start by defining feed entities, reviewing examples, creating feeds using provided references, and publishing the feed. Feeds use Protocol Buffers, a structured data format, and are updated regularly via HTTP. Agencies interested in Google Maps integration can visit the Google Transit Partner Page.\n"],null,["# GTFS Realtime Overview\n\n| **Note:** To see a detailed list of recommended practices for feeds about realtime public transportation information, refer to the [GTFS Realtime Best Practices](https://gtfs.mobilitydata.org/best-practices/gtfs-realtime) on the Mobility Data site.\n\nProviding users transit data updates in real time greatly enhances their experience of your transit services. Providing up-to-date information about current arrival and departure times allows users to smoothly plan their trips. As a result, in case of an unfortunate delay, a rider would be relieved to know that they can stay home a little bit longer.\n\nGTFS Realtime is a feed specification that allows public transportation agencies to provide realtime updates about their fleet to application developers. It is an extension to [GTFS](/transit/gtfs#SubmitFeedToGoogle) (General Transit Feed Specification), an open data format for public transportation schedules and associated geographic information. GTFS Realtime was designed around ease of implementation, good GTFS interoperability and a focus on passenger information.\n\nThe specification was designed through a partnership of the initial [Live Transit Updates](/transit/gtfs-realtime#what_is_live_transit_updates_for_google_maps) partner agencies, a number of transit developers and Google. The specification is published under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).\n\nWhat is Live Transit Updates for Google Maps?\n---------------------------------------------\n\nLive Transit Updates is a service providing real-time transit updates to users of Google Maps and Google Maps for mobile. These updates include live departure and arrival times to transit stations and service alerts.\n\nLive Transit Updates provide two types of real-time updates to users: live departure times and service alerts. Transit partners provide these updates in their feeds. We created the GTFS realtime feed format to complement the widely-used GTFS format for static transit schedules. Your feed needs to be available on a location where we can fetch it periodically. The system immediately processes feed updates as Live Transit Updates information.\n\nHow do I start?\n---------------\n\n1. Continue reading the overview below.\n2. Decide which [feed entities](/transit/gtfs-realtime/guides/feed-entities) you will be providing.\n3. Take a look at [example feeds](/transit/gtfs-realtime/examples).\n4. Create your own feeds using the [reference](/transit/gtfs-realtime/reference).\n5. Publish your feed.\n\nOverview of GTFS Realtime feeds\n-------------------------------\n\nThe specification currently supports the following types of information:\n\n- **Trip updates** - delays, cancellations, changed routes\n- **Service alerts** - stop moved, unforeseen events affecting a station, route or the entire network\n- **Vehicle positions** - information about the vehicles including location and congestion level\n\nA feed may, although not required to, combine entities of different types. Feeds are served via HTTP and updated frequently. The file itself is a regular binary file, so any type of webserver can host and serve the file (other transfer protocols might be used as well). Alternatively, web application servers could also be used which as a response to a valid HTTP `GET` request will return the feed. There are no constraints on how frequently nor on the exact method of how the feed should be updated or retrieved.\n\nBecause GTFS Realtime allows you to present the *actual* status of your fleet, the feed needs to be updated regularly - preferably whenever new data comes in from your Automatic Vehicle Location system.\n\n[More about feed entities...](/transit/gtfs-realtime/guides/feed-entities)\n\nData format\n-----------\n\nThe GTFS Realtime data exchange format is based on [Protocol Buffers](https://developers.google.com/protocol-buffers/)\n\nProtocol buffers are a language- and platform-neutral mechanism for serializing structured data (think XML, but smaller, faster, and simpler). The data structure is defined in a [gtfs-realtime.proto](/static/transit/gtfs-realtime/gtfs-realtime.proto) file, which then is used to generate source code to easily read and write your structured data from and to a variety of data streams, using a variety of languages -- e.g. Java, C++ or Python.\n\n[More about Protocol Buffers...](/protocol-buffers).\n\nData structure\n--------------\n\nThe hierarchy of elements and their type definitions are specified in the [gtfs-realtime.proto](/static/transit/gtfs-realtime/gtfs-realtime.proto) file.\n\nThis text file is used to generate the necessary libraries in your choice of programming language. These libraries provide the classes and functions needed for generating valid GTFS Realtime feeds. The libraries not only make feed creation easier but also ensure that only valid feeds are produced.\n\n[More about the data structure...](/transit/gtfs-realtime/reference)\n\nGetting Help\n------------\n\nTo participate in discussions around GTFS Realtime and suggest changes and additions to the specification, join the [GTFS Realtime mailing list](http://groups.google.com/group/gtfs-realtime).\n\nGoogle Maps and Live Transit Updates\n------------------------------------\n\n[Live Transit Updates](/transit/gtfs-realtime#what_is_live_transit_updates_for_google_maps) is a feature within Google Maps that provides users with realtime transit information. If you are working for a public transportation agency that is interested in providing realtime updates to Google Maps, please visit the [Google Transit Partner Page](http://maps.google.com/help/maps/transit/partners/live-updates.html)."]]