path - 경로를 나타내는 최대 100개의 위도/경도 쌍 목록입니다. 위도와 경도 값은 쉼표로 구분해야 합니다.
위도/경도 쌍은 파이프 문자('|')로 구분해야 합니다. path 매개변수를 제공하면 API는 먼저 경로를 차량이 이동할 가능성이 가장 높은 도로에 스냅한 후(snapToRoads 요청과 마찬가지로) 관련 도로 구간의 속도 제한을 결정합니다. API가 경로를 스냅하지 않도록 하려면 아래 설명된 대로 placeId 매개변수를 전달해야 합니다. 다음 예에서는 위도/경도 쌍이 세 개인 path 매개변수(path=60.170880,24.942795|60.170879,24.942796|60.170877,24.942796)를 보여줍니다.
placeId - 하나 이상의 도로 구간을 나타내는 장소 ID입니다.
각 장소 ID가 도로 구간을 참조하고 다른 유형의 장소를 참조하지 않는지 확인합니다. 요청당 최대 100개의 장소 ID를 전달할 수 있습니다. API는 제공된 장소 ID에 대해 도로 스냅을 실행하지 않습니다.
응답에는 요청에 있는 각 장소 ID의 제한 속도가 포함됩니다.
snapToRoads 또는 nearestRoads 요청을 보내 관련 장소 ID를 찾은 다음 speedLimits 요청에 입력으로 제공할 수 있습니다. 다음 예에서는 두 개의 장소 ID가 있는 placeId 매개변수를 보여줍니다. placeId=ChIJX12duJAwGQ0Ra0d4Oi4jOGE&placeId=ChIJLQcticc0GQ0RoiNZJVa5GxU
key - 애플리케이션의 API 키입니다. 애플리케이션은 각 요청에 API 키를 포함하여 Roads API에 요청을 보낼 때마다 자체적으로 식별해야 합니다.
키를 가져오는 방법을 알아보세요.
선택적 매개변수
units - 속도 제한을 킬로미터 또는 마일/시간 단위로 반환할지 여부입니다. KPH 또는 MPH로 설정할 수 있습니다. 기본값은 KPH입니다.
응답
speedLimits 응답에는 다음 요소가 있을 수 있습니다.
speedLimits - 도로 메타데이터의 배열입니다. 각 요소는 다음 필드로 구성됩니다.
placeId - 장소의 고유 식별자입니다. Roads API에서 반환하는 모든 장소 ID는 도로 세그먼트에 해당합니다.
speedLimit - 해당 도로 구간의 제한 속도입니다.
units - KPH 또는 MPH를 반환합니다.
snappedPoints - 스냅된 점의 배열입니다. 이 배열은 요청에 path 매개변수가 포함된 경우에만 표시됩니다. 각 포인트는 다음 필드로 구성됩니다.
location - latitude 및 longitude 값을 포함합니다.
originalIndex - 원래 요청의 해당 값을 나타내는 정수입니다. 요청의 각 값은 응답의 스냅된 값에 매핑되어야 합니다. 이러한 값은 0부터 색인이 지정되므로 originalIndex이 4인 점은 path 매개변수에 전달된 다섯 번째 위도/경도의 스냅된 값입니다.
placeId - 장소의 고유 식별자입니다. Roads API에서 반환하는 모든 장소 ID는 도로 세그먼트에 해당합니다.
placeId는 속도 제한 요청에 전달되어 해당 도로 구간의 속도 제한을 확인할 수 있습니다.
warning_message - 사용자에게 표시되는 경고가 포함된 문자열입니다.
경로를 사용하는 요청 예
이 요청은 포르투갈 리스본의 바스쿠 다 가마 다리를 건너는 경로에서 지정된 위도/경도 쌍에 가장 가까운 각 도로 구간의 속도 제한을 가져옵니다.
{
speedLimits:
[
{
placeId: "ChIJX12duJAwGQ0Ra0d4Oi4jOGE",
speedLimit: 105,
units: "KPH"
},
{
placeId: "ChIJLQcticc0GQ0RoiNZJVa5GxU",
speedLimit: 70,
units: "KPH"
},
{
placeId: "ChIJJ4vQRudkJA0RpednU70A-5M",
speedLimit: 55,
units: "KPH"
}
],
snappedPoints:
[
{
location:
{
latitude: 38.75807927603043,
longitude: -9.037417546438084
},
originalIndex: 0,
placeId: "ChIJX12duJAwGQ0Ra0d4Oi4jOGE"
},
{
location:
{
latitude: 38.689653701836896,
longitude: -9.177051486847693
},
originalIndex: 1,
placeId: "ChIJLQcticc0GQ0RoiNZJVa5GxU"
},
{
location:
{
latitude: 41.13993011767777,
longitude: -8.609400794783655
},
originalIndex: 2,
placeId: "ChIJJ4vQRudkJA0RpednU70A-5M"
}
],
warningMessage: "Input path is too sparse. You should provide a path where consecutive points are closer to each other. Refer to the 'path' parameter in Google Roads API documentation."
}
위의 대답에서 포인트 희소성에 관한 경고 메시지를 확인하세요. 임의의 지점에서 가장 가까운 도로 구간의 제한 속도를 요청하는 경우 nearestRoads 엔드포인트에서 가져온 장소 ID를 사용하여 speedLimits를 호출해야 합니다.
장소 ID를 사용하는 요청의 예
위도/경도 쌍을 사용하는 대신 도로 구간의 장소 ID를 전달할 수 있습니다. snapToRoads 또는 nearestRoads 요청을 사용하여 도로 구간의 장소 ID를 가져오는 것이 좋습니다. 장소 ID를 전달하면 API는 각 장소 ID로 표시되는 도로 구간의 규정 속도 제한을 반환합니다. API는 제공된 장소 ID에 도로 스냅을 적용하지 않습니다.
다음 예에서는 포르투갈 리스본의 바스코 다 가마 다리를 가로지르는 일부 도로 구간의 제한 속도를 요청합니다.
속도 제한 서비스에 대한 호출량을 최소화하려면 애셋의 위치를 5분~15분 간격으로 샘플링하는 것이 좋습니다 (정확한 값은 애셋의 이동 속도에 따라 달라짐). 애셋이 이동하지 않는 경우 단일 위치 샘플로도 충분합니다 (여러 번 호출할 필요가 없음).
전체 지연 시간을 최소화하려면 모바일 애셋의 위치가 수신될 때마다 API를
호출하는 대신 일부 데이터가 누적되면 속도 제한 서비스를 호출하는 것이
좋습니다.
일부/전체 속도 제한이 누락된 이유는 무엇인가요?
speedLimits이 누락되는 가장 일반적인 원인은 도로 구간이 아닌 장소의 제한 속도를 요청하는 것입니다.
위의 예에서는 바스쿠 다 가마 다리를 사용하여 개념을 설명합니다. 이 다리는 리우 테주를 가로지르는 E90 도로를 지원합니다. 다리 자체의 장소 ID는 ChIJUzt97ZEwGQ0RM1JzQfqoDtU입니다. 위 응답의 첫 번째 도로 세그먼트는 E90 도로의 일부이며 장소 ID는 ChIJX12duJAwGQ0Ra0d4Oi4jOGE입니다. 요청 예시에서 도로 장소 ID를 다리의 장소 ID로 바꾸면 다리의 장소 ID가 개별 도로 구간을 참조하지 않으므로 응답의 speedLimits 배열에 속도 제한이 두 개만 있습니다. 또한 장소 ID가 도로 구간에 해당하지 않으면 응답에 제한 속도가 포함되지 않습니다.
장소 ID를 사용하여 제한 속도 요청을 할 때는 각 장소 ID가 다른 유형의 장소가 아닌 도로 구간을 참조해야 합니다. 개별 도로 구간의 장소 ID는 snapToRoads 또는 nearestRoads 요청을 사용하여 검색하는 것이 가장 좋습니다. 이러한 요청은 단일 호출에서 여러 장소 ID를 반환할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe Roads API returns the posted speed limit for given road segments, but the accuracy of the data is not guaranteed and may not be real-time.\u003c/p\u003e\n"],["\u003cp\u003eYou can request speed limits by providing a path of latitude/longitude pairs or place IDs of road segments, using the \u003ccode\u003epath\u003c/code\u003e or \u003ccode\u003eplaceId\u003c/code\u003e parameters respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes the speed limit, units (KPH or MPH), and may include snapped points if a path was provided.\u003c/p\u003e\n"],["\u003cp\u003eSpeed limit data might be missing if the requested place ID is not a road segment; use \u003ccode\u003esnapToRoads\u003c/code\u003e or \u003ccode\u003enearestRoads\u003c/code\u003e to obtain place IDs for road segments.\u003c/p\u003e\n"],["\u003cp\u003eTo optimize usage, sample asset locations at intervals and batch speed limit requests for reduced latency and API calls.\u003c/p\u003e\n"]]],["The Speed Limit service, available with an Asset Tracking license, returns posted speed limits for road segments via the Roads API. Requests, sent via HTTPS, require either a `path` (latitude/longitude pairs) or `placeId` of road segments. The API can snap paths to roads or directly use road segment place IDs. Optional parameters include `units` (KPH/MPH). Responses provide speed limit, units, and place ID. Accuracy isn't guaranteed. Optimal use includes sampling locations every 5-15 minutes, and batching requests. Ensure PlaceIds refer to road segments.\n"],null,["# Speed limits\n\n| **Notice:** The Speed Limit service is available to all customers with an [Asset\n| Tracking](https://cloud.google.com/maps-platform/asset-tracking) license. For [Google Maps Platform Premium Plan](/maps/premium) customers who transitioned to pay-as-you-go pricing, the Speed Limit feature remains active on projects with Asset Tracking capabilities (projects with a project ID in the format maps-asset-xxx).\n\nThe Roads API returns the posted speed limit for a given road\nsegment. In the case of road segments with variable speed limits, the default\nspeed limit for the segment is returned.\n\nThe accuracy of speed limit data returned by the Roads API\ncannot be guaranteed. The speed limit data provided is not real-time, and may be\nestimated, inaccurate, incomplete, or outdated. See [coverage details](/maps/coverage)\nto see the regions where speed limit data is available.\n\nRequests\n--------\n\nSend requests for speed limits using HTTPS, in the following form: \n\n```scdoc\nhttps://roads.googleapis.com/v1/speedLimits?parameters&key=YOUR_API_KEY\n```\n\n\u003cbr /\u003e\n\n### Parameter usage\n\n**Required parameters**\n\n- Either a `path` or a `placeId` parameter.\n - `path` --- A list of up to 100 latitude/longitude pairs representing a path. Latitude and longitude values must be separated by commas. Latitude/longitude pairs must be separated by the pipe character: \"\\|\". When you supply the `path` parameter, the API first snaps the path to the most likely road traveled by a vehicle (as it does for the [`snapToRoads`](/maps/documentation/roads/snap) request), then determines the speed limit for the relevant road segment. If you don't want the API to snap the path, you must pass a `placeId` parameter as explained below. The following example shows the `path` parameter with three latitude/longitude pairs: `path=60.170880,24.942795|60.170879,24.942796|60.170877,24.942796`.\n - `placeId` --- The place ID(s) representing one or more road segments. Make sure each place ID refers to a road segment and not a different type of place. You can pass up to 100 place IDs with each request. The API does not perform road-snapping on the supplied place IDs. The response includes a speed limit for each place ID in the request. You can send a [`snapToRoads`](/maps/documentation/roads/snap) or [`nearestRoads`](/maps/documentation/roads/nearest) request to find the relevant place IDs then supply them as input to the `speedLimits` request. The following example shows the `placeId` parameter with two place IDs: `placeId=ChIJX12duJAwGQ0Ra0d4Oi4jOGE&placeId=ChIJLQcticc0GQ0RoiNZJVa5GxU`\n- `key` --- Your application's API key. Your application must identify itself every time it sends a request to the Roads API by including an API key with each request. Learn how to [get a key](/maps/documentation/roads/get-api-key).\n\n**Optional parameters**\n\n- `units` --- Whether to return speed limits in kilometers or miles per hour. This can be set to either `KPH` or `MPH`. Defaults to `KPH`.\n\nResponses\n---------\n\nThe following elements may be present in a `speedLimits` response:\n\n- `speedLimits` --- An array of road metadata. Each element consists of the following fields:\n - `placeId` --- A unique identifier for a place. All place IDs returned by the Roads API will correspond to road segments.\n - `speedLimit` --- The speed limit for that road segment.\n - `units` --- Returns either `KPH` or `MPH`.\n- `snappedPoints` --- an array of snapped points. This array is present only if the request contained a `path` parameter. Each point consists of the following fields:\n - `location` --- contains a `latitude` and `longitude` value.\n - `originalIndex` --- An integer that indicates the corresponding value in the original request. Each value in the request should map to a snapped value in the response. These values are indexed from `0`, so a point with an `originalIndex` of `4` will be the snapped value of the 5th latitude/longitude passed to the `path` parameter.\n - `placeId` --- A unique identifier for a place. All place IDs returned by the Roads API will correspond to road segments. The `placeId` can be passed in a speed limits request to determine the speed limit along that road segment.\n- `warning_message` --- A string containing a user-visible warning.\n\nExample request using a path\n----------------------------\n\nThis request gets the speed limit for each road segment nearest to the\nspecified latitude/longitude pairs in a path crossing the Vasco da Gama\nbridge in Lisbon, Portugal.\n\n**Request** \n\n```scdoc\nhttps://roads.googleapis.com/v1/speedLimits?path=38.75807927603043,-9.03741754643809|38.6896537,-9.1770515|41.1399289,-8.6094075&key=YOUR_API_KEY\n```\n\n**Response** \n\n```text\n{\n speedLimits:\n [\n {\n placeId: \"ChIJX12duJAwGQ0Ra0d4Oi4jOGE\",\n speedLimit: 105,\n units: \"KPH\"\n },\n {\n placeId: \"ChIJLQcticc0GQ0RoiNZJVa5GxU\",\n speedLimit: 70,\n units: \"KPH\"\n },\n {\n placeId: \"ChIJJ4vQRudkJA0RpednU70A-5M\",\n speedLimit: 55,\n units: \"KPH\"\n }\n ],\n snappedPoints:\n [\n {\n location:\n {\n latitude: 38.75807927603043,\n longitude: -9.037417546438084\n },\n originalIndex: 0,\n placeId: \"ChIJX12duJAwGQ0Ra0d4Oi4jOGE\"\n },\n {\n location:\n {\n latitude: 38.689653701836896,\n longitude: -9.177051486847693\n },\n originalIndex: 1,\n placeId: \"ChIJLQcticc0GQ0RoiNZJVa5GxU\"\n },\n {\n location:\n {\n latitude: 41.13993011767777,\n longitude: -8.609400794783655\n },\n originalIndex: 2,\n placeId: \"ChIJJ4vQRudkJA0RpednU70A-5M\"\n }\n ],\n warningMessage: \"Input path is too sparse. You should provide a path where consecutive points are closer to each other. Refer to the 'path' parameter in Google Roads API documentation.\"\n}\n```\n\nNotice the **warning message** for point sparsity in the above response. If you\nare requesting speed limits for the nearest road segments at arbitrary points,\nyou must call `speedLimits` with place IDs retrieved from the\n[`nearestRoads`](/maps/documentation/roads/nearest) endpoint instead.\n\nExample request using place IDs\n-------------------------------\n\nInstead of using latitude/longitude pairs, you can pass the place IDs of the\nroad segments. We recommend you obtain place IDs for road segments using\n`snapToRoads` or `nearestRoads` requests. When you pass place IDs, the API\nreturns the speed limit for the road segment represented by each place ID. The\nAPI does not apply any road-snapping to the place IDs supplied.\n\nThe following example requests the speed limits for some of the road segments\nthat cross the Vasco da Gama bridge in Lisbon, Portugal.\n\n**Request** \n\n```scdoc\nhttps://roads.googleapis.com/v1/speedLimits?placeId=ChIJX12duJAwGQ0Ra0d4Oi4jOGE&placeId=ChIJLQcticc0GQ0RoiNZJVa5GxU&placeId=ChIJJ4vQRudkJA0RpednU70A-5M&key=YOUR_API_KEY\n```\n\n**Response** \n\n```text\n{\n \"speedLimits\": [\n {\n placeId: \"ChIJX12duJAwGQ0Ra0d4Oi4jOGE\",\n speedLimit: 105,\n units: \"KPH\"\n },\n {\n placeId: \"ChIJLQcticc0GQ0RoiNZJVa5GxU\",\n speedLimit: 70,\n units: \"KPH\"\n },\n {\n placeId: \"ChIJJ4vQRudkJA0RpednU70A-5M\",\n speedLimit: 55,\n units: \"KPH\"\n }\n ]\n}\n```\n\nUsage recommendations\n---------------------\n\nTo minimize the volume of calls to the Speed Limit service, we recommend\nsampling the locations of your assets at 5 to 15 minute intervals (the exact\nvalue depends on the speed at which an asset is traveling). If an asset is\nstationary, a single location sample is sufficient (there is no need to make\nmultiple calls).\n\nTo minimize overall latency, we recommend calling the Speed Limit service\nonce you have accumulated some data, rather than calling the API every time the\nlocation of a mobile asset is received.\n\nWhy are some/all speed limits missing?\n--------------------------------------\n\nThe most common cause of missing `speedLimits` is requesting the speed limit\nof a place that is not a road segment.\n\nThe above example uses the Vasco da Gama bridge to illustrate concepts;\nthe bridge supports the road E90 crossing over the Rio Tejo. The bridge\nitself has a place ID of ChIJUzt97ZEwGQ0RM1JzQfqoDtU. The first road segment\nin the above response is part of the E90 road and has a place ID of\nChIJX12duJAwGQ0Ra0d4Oi4jOGE. In the example request, if you replace the road\nplace ID with the bridge's place ID, then in the response there will only be\ntwo speed limits in the `speedLimits` array because the bridge's place ID\ndoes not refer to an individual road segment. Furthermore, if none of the\nplace IDs are for road segments, then the response won't contain any\nspeed limits.\n\nWhen making speed limit requests using place IDs, make sure each place ID\nrefers to a road segment and not a different type of place. Place IDs for\nindividual road segments are best retrieved using `snapToRoads`\nor `nearestRoads` requests, either of which can return multiple place IDs from\na single call."]]