Google Maps Platform · Schema
Leg
A leg of a route, representing the journey between two waypoints or the origin/destination.
EnvironmentGeocodingGeolocationMapsNavigationPlacesRoutingSolar
Properties
| Name | Type | Description |
|---|---|---|
| steps | array | Array of steps representing each instruction along the leg |
| distance | object | |
| duration | object | |
| duration_in_traffic | object | |
| start_location | object | |
| end_location | object | |
| start_address | string | The human-readable address of the leg's starting point |
| end_address | string | The human-readable address of the leg's ending point |
| arrival_time | object | |
| departure_time | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/Leg",
"title": "Leg",
"type": "object",
"description": "A leg of a route, representing the journey between two waypoints or the origin/destination.",
"properties": {
"steps": {
"type": "array",
"description": "Array of steps representing each instruction along the leg",
"items": {
"$ref": "#/components/schemas/Step"
},
"example": []
},
"distance": {
"$ref": "#/components/schemas/TextValuePair"
},
"duration": {
"$ref": "#/components/schemas/TextValuePair"
},
"duration_in_traffic": {
"$ref": "#/components/schemas/TextValuePair"
},
"start_location": {
"$ref": "#/components/schemas/LatLng"
},
"end_location": {
"$ref": "#/components/schemas/LatLng"
},
"start_address": {
"type": "string",
"description": "The human-readable address of the leg's starting point",
"example": "Toronto, ON, Canada"
},
"end_address": {
"type": "string",
"description": "The human-readable address of the leg's ending point",
"example": "Montreal, QC, Canada"
},
"arrival_time": {
"$ref": "#/components/schemas/TimeZoneTextValue"
},
"departure_time": {
"$ref": "#/components/schemas/TimeZoneTextValue"
}
},
"required": [
"steps",
"distance",
"duration",
"start_location",
"end_location",
"start_address",
"end_address"
]
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/google-maps-leg"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.