Route Matrix API (v1.2)

Download OpenAPI specification:Download

For the latitude and longitude points of the requested origin and destination (up to 50 points), we perform a route matrix with the road network for automobiles and return a list of required times and distances.

Route matrix

Route Matrix API

For the requested origin and destination lists, provide the following:

  • A list of summary information (travel time and distance) for routes from each origin to each destination

The following uses are anticipated:

  • Get a summary of route information (travel time and distance) from each departure point to each destination in bulk



Please note the following when using this API.

  • The range of latitude and longitude that can be entered using this API is limited to within Japan.
  • 以下の地点がリクエストに含まれている場合、status_code=400 のリクエストエラーとなることがあります。
    • Locations accessible only by air
    • According to our data, some remote islands (*) where ferry routes have not yet been established.
      (*) Hachijojima (Tokyo), Aogashima (Tokyo), Miyakojima (Okinawa Prefecture), Ishigakijima (Okinawa Prefecture), etc.
    • A location where there are no roads nearby.
  • 出発地から目的地までの経路が見つからない場合、その出発地と目的地の組み合わせの distancetimenull となります。
  • Route shape and turn-by-turn guidance information will not be returned.
  • The response timeout for this API is 30 seconds. Depending on the route distance and the number of origin and destination points, your request may time out. In that case, please try reducing the number of points.
  • costing=truck の場合、大型貨物自動車向けの交通規制を回避する経路探索を行う都合上、costing=auto と比較してAPIの応答時間が長くなる場合があります。
  • This API has a rate limit of one request per second. When using this API repeatedly, please wait until the response to the previous request has been returned before submitting the next request.
  • 本APIのPV(ページビュー)は、コスト数(出発地×目的地の数)分、カウントされます。
    出発地と目的地の組み合わせの distancetimenull となる場合もカウント対象です。
    例:出発地:10地点、目的地:100地点の場合、10×100 = 1000PV

Authorizations:
api_key
header Parameters
x-api-key
required
string

Authentication is performed using an API key.
Please enter the API key provided by our company.

content-type
required
string

Please set the following for content-type.
application/json

Request Body schema: application/json
required
Array of objects[ items [ 1 .. 50 ] ]
List of latitude and longitude of the departure location to enter

Format

"sources":[{"lon":<経度1>,"lat":<緯度1>},{"lon":<経度2>,"lat":<緯度2>},...,{"lon":<経度n>,"lat":<緯度n>}]

Please set between 1 and 50 locations.

Input example

"sources":[
  {"lon":139.703360,"lat":35.69363}
],
required
Array of objects[ items [ 1 .. 50 ] ]
List of latitude and longitude of destinations to enter

Format

"targets":[{"lon":<経度1>,"lat":<緯度1>},{"lon":<経度2>,"lat":<緯度2>},...,{"lon":<経度n>,"lat":<緯度n>}]

Please set between 1 and 50 locations.

Input example

"targets":[
  {"lon":139.703460,"lat":35.69368}
],
costing
required
string
Vehicles targeted for route search
Value Meaning
auto Ordinary car
truck Track

Format

"costing":<車種>

車種は autoortruck を設定してください。

Input example

"costing":"auto"
object
Route search options

Format

"costing_options":{<車種>:{"use_ferry":<フェリー利用優先度>,"use_tolls":<有料道利用優先度>,"height":<車高>,"width":<車幅>,"weight":<車重>,"hazmat":<危険物搭載有無>}}

costing で指定する対象車種(autoortruck)の、経路探索のオプションを設定してください。costing と一致しない経路探索のオプションは無視されます。

Input example

"costing_options":{
  "auto":{
    "use_ferry":0.0,
    "use_tolls":0.0,
    "height":1.6,
    "width":1.6
  }
},
"costing_options":{
  "truck":{
    "use_ferry":0.0,
    "use_tolls":0.0,
    "height":2.6,
    "width":2.0,
    "weight":10.0,
    "hazmat":false
  }
},

Responses

Request samples

Content type
application/json
{
  • "sources": [
    ],
  • "targets": [
    ],
  • "costing": "truck",
  • "costing_options": {
    }
}

Response samples

Content type
application/json
{
  • "sources_to_targets": [
    ]
}

Change history

Date Content
2025年8月28日 costing_option に以下のリクエストインターフェースを追加
 ・height(車高)
 ・width(車幅)
 ・weight(車重) ※truckのみ
 ・hazmat(Whether or not hazardous materials are on board) *truckのみ
costingの車種に応じた車幅(auto: 1.6m、truck: 2.6m)未満の車幅制限がある道路を通行しない制限事項を削除
status_code=400 のリクエストエラーとなるケースに「周囲に道路が無い出発地または目的地が含まれる場合」を追加