{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Directions & Routes API | Multi-Stop Navigation",
    "description": "Extract driving, walking, cycling, and transit directions from Google Maps as structured data. Get multi-stop routes (2-10 stops), turn-by-turn instructions, distance, duration, traffic estimates, and Street View thumbnails. No API key needed. Supports departure/arrival times and route preferences.",
    "version": "0.0",
    "x-build-id": "rsFQw2wmXKNKDT0X4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zen-studio~google-maps-directions-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zen-studio-google-maps-directions-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zen-studio~google-maps-directions-api/runs": {
      "post": {
        "operationId": "runs-sync-zen-studio-google-maps-directions-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zen-studio~google-maps-directions-api/run-sync": {
      "post": {
        "operationId": "run-sync-zen-studio-google-maps-directions-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "stops"
        ],
        "properties": {
          "stops": {
            "title": "Stops",
            "minItems": 2,
            "maxItems": 10,
            "type": "array",
            "description": "Enter 2–10 locations in order. The first stop is the origin, the last is the destination, and any in between are intermediate stops.<br><br>Examples:<br>• <code>Berlin, Germany</code><br>• <code>Eiffel Tower, Paris</code><br>• <code>350 5th Ave, New York, NY</code>",
            "items": {
              "type": "string"
            }
          },
          "travelMode": {
            "title": "Travel Mode",
            "enum": [
              "driving",
              "transit",
              "walking",
              "cycling"
            ],
            "type": "string",
            "description": "Determines the type of route returned.<br><br>• <b>Driving</b> — car routes with traffic estimates<br>• <b>Transit</b> — public transport with line names and transfers<br>• <b>Walking</b> — pedestrian routes with street-level steps<br>• <b>Cycling</b> — bike-friendly routes",
            "default": "driving"
          },
          "timeOption": {
            "title": "Departure / Arrival Time",
            "enum": [
              "now",
              "depart_at",
              "arrive_by"
            ],
            "type": "string",
            "description": "When to travel.<br><br>• <b>Leave now</b> — current traffic conditions (default)<br>• <b>Depart at</b> — get directions for a specific departure time<br>• <b>Arrive by</b> — plan to arrive at a specific time (driving and transit only)",
            "default": "now"
          },
          "date": {
            "title": "Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Travel date in <code>YYYY-MM-DD</code> format. Required when using Depart at or Arrive by."
          },
          "time": {
            "title": "Time",
            "pattern": "^\\d{2}:\\d{2}$",
            "type": "string",
            "description": "Travel time in 24-hour <code>HH:MM</code> format (e.g. <code>14:30</code>). Required when using Depart at or Arrive by."
          },
          "avoidHighways": {
            "title": "Avoid Highways",
            "type": "boolean",
            "description": "Avoid highways and motorways where possible. Applies to driving mode.",
            "default": false
          },
          "avoidTolls": {
            "title": "Avoid Tolls",
            "type": "boolean",
            "description": "Avoid toll roads where possible. Applies to driving mode.",
            "default": false
          },
          "avoidFerries": {
            "title": "Avoid Ferries",
            "type": "boolean",
            "description": "Avoid ferries where possible. Applies to driving mode.",
            "default": false
          },
          "wheelchairAccessible": {
            "title": "Wheelchair Accessible",
            "type": "boolean",
            "description": "Prefer wheelchair-accessible routes. Applies to walking mode.",
            "default": false
          },
          "transitTypes": {
            "title": "Transit Types",
            "type": "array",
            "description": "Filter to specific transit types. Leave empty to include all. Applies to transit mode.<br><br>• <b>Bus</b><br>• <b>Subway</b><br>• <b>Train</b><br>• <b>Tram</b> (tram and light rail)",
            "items": {
              "type": "string",
              "enum": [
                "bus",
                "subway",
                "train",
                "tram"
              ]
            },
            "default": []
          },
          "transitRoutePreference": {
            "title": "Transit Route Preference",
            "enum": [
              "best_route",
              "fewer_transfers",
              "less_walking"
            ],
            "type": "string",
            "description": "How to optimize transit routes. Applies to transit mode.<br><br>• <b>Best route</b> — balanced optimization (default)<br>• <b>Fewer transfers</b> — minimize connections<br>• <b>Less walking</b> — minimize walking distance",
            "default": "best_route"
          },
          "detailLevel": {
            "title": "Detail Level",
            "enum": [
              "full",
              "overview"
            ],
            "type": "string",
            "description": "How much detail to include in the output.<br><br>• <b>Full</b> — turn-by-turn substeps, Street View thumbnails, emphasis markers, polyline tokens<br>• <b>Overview</b> — all stops and segment instructions, without turn-by-turn substeps or Street View. Much smaller output",
            "default": "full"
          },
          "distanceUnit": {
            "title": "Distance Unit",
            "enum": [
              "auto",
              "km",
              "miles"
            ],
            "type": "string",
            "description": "Unit for distance values in the response.<br><br>• <b>Auto</b> — uses the default for the region<br>• <b>Kilometers</b><br>• <b>Miles</b>",
            "default": "auto"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "nl",
              "pl",
              "ja",
              "ko",
              "zh",
              "ru",
              "tr",
              "ar",
              "cs",
              "da",
              "fi",
              "el",
              "hu",
              "no",
              "sv",
              "th",
              "vi",
              "uk",
              "ro",
              "sk",
              "bg",
              "hr",
              "sr",
              "sl"
            ],
            "type": "string",
            "description": "Language for street names and turn-by-turn instructions in the output.",
            "default": "en"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}