{
  "ownerName": "Google",
  "rootUrl": "https://roads.googleapis.com/",
  "ownerDomain": "google.com",
  "schemas": {
    "ListTrafficSpeedsResponse": {
      "type": "object",
      "id": "ListTrafficSpeedsResponse",
      "description": "The response from the ListTrafficSpeeds method, returning a list of traffic speeds.",
      "properties": {
        "warningMessage": {
          "description": "User-visible warning message, if any, which can be shown alongside a valid result.",
          "type": "string"
        },
        "trafficSpeeds": {
          "items": {
            "$ref": "TrafficSpeeds"
          },
          "type": "array",
          "description": "A list of traffic speeds for each point."
        },
        "snappedPoints": {
          "description": "A list of snapped points (if a path was snapped as part of the process).",
          "items": {
            "$ref": "SnappedPoint"
          },
          "type": "array"
        }
      }
    },
    "SnapToRoadsResponse": {
      "type": "object",
      "description": "The response from the SnapToRoads method, returning a sequence of snapped points.",
      "properties": {
        "snappedPoints": {
          "items": {
            "$ref": "SnappedPoint"
          },
          "description": "A list of snapped points.",
          "type": "array"
        },
        "warningMessage": {
          "type": "string",
          "description": "User-visible warning message, if any, which can be shown alongside a valid result."
        }
      },
      "id": "SnapToRoadsResponse"
    },
    "SnappedPoint": {
      "id": "SnappedPoint",
      "description": "A snapped point object, representing the result of snapping.",
      "properties": {
        "originalIndex": {
          "format": "uint32",
          "description": "The index into the original path of the equivalent pre-snapped point. This allows for identification of points which have been interpolated if this index is missing.",
          "type": "integer"
        },
        "placeId": {
          "description": "The place ID for this snapped location (road segment). These are the same as are currently used by the Places API.",
          "type": "string"
        },
        "location": {
          "description": "The lat,lng of the snapped location.",
          "$ref": "LatLng"
        }
      },
      "type": "object"
    },
    "LatLng": {
      "properties": {
        "latitude": {
          "format": "double",
          "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
          "type": "number"
        },
        "longitude": {
          "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
          "type": "number",
          "format": "double"
        }
      },
      "type": "object",
      "id": "LatLng",
      "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges."
    },
    "SpeedLimit": {
      "id": "SpeedLimit",
      "type": "object",
      "properties": {
        "placeId": {
          "description": "The place ID of this road segment.",
          "type": "string"
        },
        "units": {
          "enum": [
            "SPEED_UNITS_UNSPECIFIED",
            "KPH",
            "MPH"
          ],
          "enumDescriptions": [
            "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
            "Kilometers per hour.",
            "Miles per hour."
          ],
          "description": "The units of the speed limit.",
          "type": "string"
        },
        "speedLimit": {
          "description": "The speed limit of this road segment.",
          "format": "float",
          "type": "number"
        }
      },
      "description": "A single speed limit."
    },
    "TrafficSpeeds": {
      "type": "object",
      "description": "A set of speeds for a given road.",
      "properties": {
        "placeId": {
          "type": "string",
          "description": "The place ID of this road segment."
        },
        "currentSpeed": {
          "type": "integer",
          "description": "The current speed of this road segment.",
          "format": "int32"
        },
        "openlrId": {
          "description": "The OpenLR location string for the road segment. Refer to LocationEncoding.OPENLR for details.",
          "type": "string"
        },
        "freeflowSpeed": {
          "description": "The speed without traffic of this road segment.",
          "format": "int32",
          "type": "integer"
        },
        "units": {
          "enum": [
            "SPEED_UNITS_UNSPECIFIED",
            "KPH",
            "MPH"
          ],
          "description": "The units of the speeds returned.",
          "enumDescriptions": [
            "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
            "Kilometers per hour.",
            "Miles per hour."
          ],
          "type": "string"
        }
      },
      "id": "TrafficSpeeds"
    },
    "ListTrafficSpeedsForTileResponse": {
      "properties": {
        "placeIds": {
          "items": {
            "type": "string"
          },
          "description": "The place ID of each road segment.",
          "type": "array"
        },
        "openlrIds": {
          "description": "The OpenLR location string for each road segment. Refer to LocationEncoding.OPENLR for details.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "currentSpeeds": {
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          },
          "description": "The current speed of each road segment."
        },
        "freeflowSpeeds": {
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "type": "array",
          "description": "The speed without traffic of each road segment."
        }
      },
      "id": "ListTrafficSpeedsForTileResponse",
      "type": "object",
      "description": "The response from the ListTrafficSpeedsForTile method, returning a list of traffic speeds for segments contained in the requested tile. The results are returned as a set of repeated fields, where the indices into each field line up. Only one of place_id and openlr can contain values. Only one of current_speed and freeflow_speed can contain values."
    },
    "ListNearestRoadsResponse": {
      "type": "object",
      "properties": {
        "snappedPoints": {
          "description": "A list of snapped points.",
          "type": "array",
          "items": {
            "$ref": "SnappedPoint"
          }
        }
      },
      "description": "The response from the ListNearestRoads method, returning a list of snapped points.",
      "id": "ListNearestRoadsResponse"
    },
    "ListSpeedLimitsResponse": {
      "properties": {
        "snappedPoints": {
          "type": "array",
          "items": {
            "$ref": "SnappedPoint"
          },
          "description": "A list of snapped points (if a path was snapped as part of the process)."
        },
        "speedLimits": {
          "type": "array",
          "description": "A list of speed limits for each point.",
          "items": {
            "$ref": "SpeedLimit"
          }
        },
        "warningMessage": {
          "type": "string",
          "description": "User-visible warning message, if any, which can be shown alongside a valid result."
        }
      },
      "id": "ListSpeedLimitsResponse",
      "type": "object",
      "description": "The response from the ListSpeedLimits method, returning a list of speed limits."
    }
  },
  "batchPath": "batch",
  "servicePath": "",
  "mtlsRootUrl": "https://roads.mtls.googleapis.com/",
  "description": "Fetch Google roads using a viewport, road ID, or latitude/longitude coordinates.",
  "baseUrl": "https://roads.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "parameters": {
    "quotaUser": {
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query",
      "type": "string"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "oauth_token": {
      "location": "query",
      "description": "OAuth 2.0 token for the current user.",
      "type": "string"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "location": "query",
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "type": "string",
      "default": "json"
    },
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "type": "string",
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "location": "query",
      "description": "Returns response with indentations and line breaks.",
      "default": "true"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    }
  },
  "resources": {
    "nearestRoads": {
      "methods": {
        "list": {
          "httpMethod": "GET",
          "flatPath": "v1/nearestRoads",
          "path": "v1/nearestRoads",
          "description": "This method takes a list of latitude,longitude points and snaps them each to their nearest road. Also returns a place ID for each snapped point.",
          "parameterOrder": [],
          "response": {
            "$ref": "ListNearestRoadsResponse"
          },
          "id": "roads.nearestRoads.list",
          "parameters": {
            "travelMode": {
              "location": "query",
              "enum": [
                "TRAVEL_MODE_UNSPECIFIED",
                "DRIVING",
                "CYCLING",
                "WALKING"
              ],
              "type": "string",
              "description": "The type of travel being tracked. This will constrain the roads we snap to.",
              "enumDescriptions": [
                "",
                "",
                "",
                ""
              ]
            },
            "points": {
              "type": "string",
              "location": "query",
              "description": "The points to be snapped as a series of lat, lng points. Specified as a string of the format: lat,lng|lat,lng|..."
            }
          }
        }
      }
    },
    "trafficSpeeds": {
      "methods": {
        "list": {
          "parameterOrder": [],
          "path": "v1/trafficSpeeds",
          "httpMethod": "GET",
          "flatPath": "v1/trafficSpeeds",
          "id": "roads.trafficSpeeds.list",
          "description": "This method takes a sequence of place IDs and a list of types of speeds and returns those speeds for each road segment. If a speed is not known for a given place ID, that speed is not returned. If no speeds are known for a road segment, nothing is returned for that road segment.",
          "parameters": {
            "units": {
              "location": "query",
              "enum": [
                "SPEED_UNITS_UNSPECIFIED",
                "KPH",
                "MPH"
              ],
              "description": "The units that speeds should be returned in. Default is KPH.",
              "type": "string",
              "enumDescriptions": [
                "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
                "Kilometers per hour.",
                "Miles per hour."
              ]
            },
            "type": {
              "description": "The types of speeds to return.",
              "repeated": true,
              "type": "string",
              "location": "query",
              "enumDescriptions": [
                "Unspecified",
                "Requests the current speed of traffic to be returned for the requested road segments.",
                "Requests the speed one expects vehicles to travel at on those road segments when unhindered by traffic."
              ],
              "enum": [
                "UNSPECIFIED",
                "CURRENT",
                "FREEFLOW"
              ]
            },
            "placeId": {
              "repeated": true,
              "type": "string",
              "location": "query",
              "description": "The list of place IDs to return speeds for."
            },
            "locationEncoding": {
              "description": "Encoding method to use for the response.",
              "location": "query",
              "enumDescriptions": [
                "Unspecified",
                "Place ID, as used across Google Maps APIs. See https://developers.google.com/places/place-id#id-overview",
                "OpenLR location string. OpenLR is an open standard which encodes road segments in a format that allows the road to be located unambiguously in any map. See http://openlr.org/data/docs/OpenLR-Whitepaper_v1.5.pdf"
              ],
              "type": "string",
              "enum": [
                "UNSPECIFIED",
                "PLACE_ID",
                "OPENLR"
              ]
            },
            "path": {
              "location": "query",
              "type": "string",
              "description": "The path to first snap and retrieve speed limits for."
            }
          },
          "response": {
            "$ref": "ListTrafficSpeedsResponse"
          }
        },
        "tile": {
          "flatPath": "v1/trafficSpeeds/tile",
          "description": "",
          "path": "v1/trafficSpeeds/tile",
          "httpMethod": "POST",
          "parameterOrder": [],
          "response": {
            "$ref": "ListTrafficSpeedsForTileResponse"
          },
          "id": "roads.trafficSpeeds.tile",
          "parameters": {
            "units": {
              "enum": [
                "SPEED_UNITS_UNSPECIFIED",
                "KPH",
                "MPH"
              ],
              "enumDescriptions": [
                "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
                "Kilometers per hour.",
                "Miles per hour."
              ],
              "type": "string",
              "description": "The units that speeds should be returned in. Default is KPH.",
              "location": "query"
            },
            "x": {
              "description": "x-value of the tile coordinate. Ranges from 0 to 2^zoom",
              "type": "integer",
              "location": "query",
              "format": "int32"
            },
            "y": {
              "location": "query",
              "description": "y-value of the tile coordinate. Ranges from 0 to 2^zoom",
              "type": "integer",
              "format": "int32"
            },
            "type": {
              "enum": [
                "UNSPECIFIED",
                "CURRENT",
                "FREEFLOW"
              ],
              "location": "query",
              "description": "The types of speeds to return.",
              "type": "string",
              "enumDescriptions": [
                "Unspecified",
                "Requests the current speed of traffic to be returned for the requested road segments.",
                "Requests the speed one expects vehicles to travel at on those road segments when unhindered by traffic."
              ]
            },
            "locationEncoding": {
              "enum": [
                "UNSPECIFIED",
                "PLACE_ID",
                "OPENLR"
              ],
              "enumDescriptions": [
                "Unspecified",
                "Place ID, as used across Google Maps APIs. See https://developers.google.com/places/place-id#id-overview",
                "OpenLR location string. OpenLR is an open standard which encodes road segments in a format that allows the road to be located unambiguously in any map. See http://openlr.org/data/docs/OpenLR-Whitepaper_v1.5.pdf"
              ],
              "description": "Encoding method to use for the response.",
              "location": "query",
              "type": "string"
            },
            "zoom": {
              "description": "Zoom level of the tile coordinate. The coordinate system is n*n tiles in size, where n = 2^zoom. Currently, only zoom level 8 is supported in this service.",
              "format": "int32",
              "location": "query",
              "type": "integer"
            }
          }
        }
      },
      "resources": {
        "tile": {
          "methods": {
            "list": {
              "httpMethod": "GET",
              "flatPath": "v1/trafficSpeeds/tile",
              "description": "",
              "parameterOrder": [],
              "id": "roads.trafficSpeeds.tile.list",
              "path": "v1/trafficSpeeds/tile",
              "parameters": {
                "zoom": {
                  "description": "Zoom level of the tile coordinate. The coordinate system is n*n tiles in size, where n = 2^zoom. Currently, only zoom level 8 is supported in this service.",
                  "location": "query",
                  "type": "integer",
                  "format": "int32"
                },
                "y": {
                  "format": "int32",
                  "description": "y-value of the tile coordinate. Ranges from 0 to 2^zoom",
                  "location": "query",
                  "type": "integer"
                },
                "x": {
                  "description": "x-value of the tile coordinate. Ranges from 0 to 2^zoom",
                  "format": "int32",
                  "type": "integer",
                  "location": "query"
                },
                "type": {
                  "enumDescriptions": [
                    "Unspecified",
                    "Requests the current speed of traffic to be returned for the requested road segments.",
                    "Requests the speed one expects vehicles to travel at on those road segments when unhindered by traffic."
                  ],
                  "description": "The types of speeds to return.",
                  "enum": [
                    "UNSPECIFIED",
                    "CURRENT",
                    "FREEFLOW"
                  ],
                  "location": "query",
                  "type": "string"
                },
                "locationEncoding": {
                  "enum": [
                    "UNSPECIFIED",
                    "PLACE_ID",
                    "OPENLR"
                  ],
                  "description": "Encoding method to use for the response.",
                  "location": "query",
                  "enumDescriptions": [
                    "Unspecified",
                    "Place ID, as used across Google Maps APIs. See https://developers.google.com/places/place-id#id-overview",
                    "OpenLR location string. OpenLR is an open standard which encodes road segments in a format that allows the road to be located unambiguously in any map. See http://openlr.org/data/docs/OpenLR-Whitepaper_v1.5.pdf"
                  ],
                  "type": "string"
                },
                "units": {
                  "description": "The units that speeds should be returned in. Default is KPH.",
                  "enum": [
                    "SPEED_UNITS_UNSPECIFIED",
                    "KPH",
                    "MPH"
                  ],
                  "enumDescriptions": [
                    "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
                    "Kilometers per hour.",
                    "Miles per hour."
                  ],
                  "type": "string",
                  "location": "query"
                }
              },
              "response": {
                "$ref": "ListTrafficSpeedsForTileResponse"
              }
            }
          }
        }
      }
    },
    "v1": {
      "methods": {
        "trafficSpeeds": {
          "httpMethod": "POST",
          "flatPath": "v1/trafficSpeeds",
          "parameterOrder": [],
          "path": "v1/trafficSpeeds",
          "description": "This method takes a sequence of place IDs and a list of types of speeds and returns those speeds for each road segment. If a speed is not known for a given place ID, that speed is not returned. If no speeds are known for a road segment, nothing is returned for that road segment.",
          "id": "roads.trafficSpeeds",
          "response": {
            "$ref": "ListTrafficSpeedsResponse"
          },
          "parameters": {
            "path": {
              "location": "query",
              "type": "string",
              "description": "The path to first snap and retrieve speed limits for."
            },
            "placeId": {
              "type": "string",
              "description": "The list of place IDs to return speeds for.",
              "location": "query",
              "repeated": true
            },
            "locationEncoding": {
              "location": "query",
              "type": "string",
              "description": "Encoding method to use for the response.",
              "enum": [
                "UNSPECIFIED",
                "PLACE_ID",
                "OPENLR"
              ],
              "enumDescriptions": [
                "Unspecified",
                "Place ID, as used across Google Maps APIs. See https://developers.google.com/places/place-id#id-overview",
                "OpenLR location string. OpenLR is an open standard which encodes road segments in a format that allows the road to be located unambiguously in any map. See http://openlr.org/data/docs/OpenLR-Whitepaper_v1.5.pdf"
              ]
            },
            "units": {
              "type": "string",
              "enumDescriptions": [
                "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
                "Kilometers per hour.",
                "Miles per hour."
              ],
              "location": "query",
              "enum": [
                "SPEED_UNITS_UNSPECIFIED",
                "KPH",
                "MPH"
              ],
              "description": "The units that speeds should be returned in. Default is KPH."
            },
            "type": {
              "enum": [
                "UNSPECIFIED",
                "CURRENT",
                "FREEFLOW"
              ],
              "location": "query",
              "description": "The types of speeds to return.",
              "enumDescriptions": [
                "Unspecified",
                "Requests the current speed of traffic to be returned for the requested road segments.",
                "Requests the speed one expects vehicles to travel at on those road segments when unhindered by traffic."
              ],
              "repeated": true,
              "type": "string"
            }
          }
        },
        "snapToRoads": {
          "response": {
            "$ref": "SnapToRoadsResponse"
          },
          "id": "roads.snapToRoads",
          "httpMethod": "GET",
          "flatPath": "v1/snapToRoads",
          "parameters": {
            "travelMode": {
              "description": "The type of travel being tracked. This will constrain the paths we snap to.",
              "enum": [
                "TRAVEL_MODE_UNSPECIFIED",
                "DRIVING",
                "CYCLING",
                "WALKING"
              ],
              "location": "query",
              "enumDescriptions": [
                "",
                "",
                "",
                ""
              ],
              "type": "string"
            },
            "interpolate": {
              "description": "Whether to interpolate the points to return full road geometry.",
              "type": "boolean",
              "location": "query"
            },
            "path": {
              "description": "The path to be snapped as a series of lat, lng points. Specified as a string of the format: lat,lng|lat,lng|...",
              "type": "string",
              "location": "query"
            },
            "assetId": {
              "type": "string",
              "location": "query",
              "description": "The asset ID of the asset to which this path relates. This is used for abuse detection purposes for clients with asset-based SKUs."
            }
          },
          "path": "v1/snapToRoads",
          "description": "This method takes a sequence of latitude,longitude points and snaps them to the most likely road segments. Optionally returns additional points giving the full road geometry. Also returns a place ID for each snapped point.",
          "parameterOrder": []
        },
        "nearestRoads": {
          "parameterOrder": [],
          "id": "roads.nearestRoads",
          "description": "This method takes a list of latitude,longitude points and snaps them each to their nearest road. Also returns a place ID for each snapped point.",
          "path": "v1/nearestRoads",
          "httpMethod": "POST",
          "response": {
            "$ref": "ListNearestRoadsResponse"
          },
          "parameters": {
            "points": {
              "description": "The points to be snapped as a series of lat, lng points. Specified as a string of the format: lat,lng|lat,lng|...",
              "type": "string",
              "location": "query"
            },
            "travelMode": {
              "location": "query",
              "type": "string",
              "enumDescriptions": [
                "",
                "",
                "",
                ""
              ],
              "enum": [
                "TRAVEL_MODE_UNSPECIFIED",
                "DRIVING",
                "CYCLING",
                "WALKING"
              ],
              "description": "The type of travel being tracked. This will constrain the roads we snap to."
            }
          },
          "flatPath": "v1/nearestRoads"
        },
        "speedLimits": {
          "id": "roads.speedLimits",
          "parameterOrder": [],
          "httpMethod": "POST",
          "path": "v1/speedLimits",
          "flatPath": "v1/speedLimits",
          "description": "This method takes a sequence of place IDs and returns the speed limit for each road segment. If no speed limit is known for a given place ID, nothing is returned.",
          "parameters": {
            "path": {
              "location": "query",
              "type": "string",
              "description": "The path to first snap and retrieve speed limits for."
            },
            "units": {
              "type": "string",
              "enumDescriptions": [
                "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
                "Kilometers per hour.",
                "Miles per hour."
              ],
              "description": "The units that speed limits should be returned in. Default is KPH.",
              "enum": [
                "SPEED_UNITS_UNSPECIFIED",
                "KPH",
                "MPH"
              ],
              "location": "query"
            },
            "placeId": {
              "type": "string",
              "repeated": true,
              "description": "The list of place IDs to return speed limits for.",
              "location": "query"
            }
          },
          "response": {
            "$ref": "ListSpeedLimitsResponse"
          }
        }
      }
    },
    "speedLimits": {
      "methods": {
        "list": {
          "httpMethod": "GET",
          "response": {
            "$ref": "ListSpeedLimitsResponse"
          },
          "id": "roads.speedLimits.list",
          "parameterOrder": [],
          "path": "v1/speedLimits",
          "parameters": {
            "units": {
              "enum": [
                "SPEED_UNITS_UNSPECIFIED",
                "KPH",
                "MPH"
              ],
              "enumDescriptions": [
                "Proto3 expects the zero value to be \"unspecified\", and ESF doesn't render zero values in JSON responses. See b/19267160 for context.",
                "Kilometers per hour.",
                "Miles per hour."
              ],
              "description": "The units that speed limits should be returned in. Default is KPH.",
              "location": "query",
              "type": "string"
            },
            "path": {
              "description": "The path to first snap and retrieve speed limits for.",
              "type": "string",
              "location": "query"
            },
            "placeId": {
              "description": "The list of place IDs to return speed limits for.",
              "type": "string",
              "location": "query",
              "repeated": true
            }
          },
          "description": "This method takes a sequence of place IDs and returns the speed limit for each road segment. If no speed limit is known for a given place ID, nothing is returned.",
          "flatPath": "v1/speedLimits"
        }
      }
    }
  },
  "title": "Roads API",
  "kind": "discovery#restDescription",
  "protocol": "rest",
  "version": "v1",
  "discoveryVersion": "v1",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "id": "roads:v1",
  "basePath": "",
  "revision": "20260831",
  "documentationLink": "https://developers.google.com/maps/documentation/roads/",
  "version_module": true,
  "name": "roads"
}
