{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Directions & Distance Matrix Scraper",
    "description": "Scrape Google Maps directions and a distance matrix: driving, transit, walking and bicycling routes between addresses, places or coordinates, with distance, travel time in traffic, typical range, via roads, alternatives, steps, transit times and fares. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "qNX4VXVP1aUwSH7dA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~google-maps-directions-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-google-maps-directions-scraper",
        "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/steadyscrape~google-maps-directions-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-google-maps-directions-scraper",
        "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/steadyscrape~google-maps-directions-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-google-maps-directions-scraper",
        "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",
        "properties": {
          "trips": {
            "title": "Trips",
            "maxItems": 500,
            "type": "array",
            "description": "One trip per line, its stops separated by <code>-&gt;</code>: <code>Austin, TX -&gt; Dallas, TX</code>. A stop is an address, a place's name, a city or coordinates (<code>30.2672,-97.7431</code>). Add stops in between for a multi-stop trip: <code>Austin, TX -&gt; Waco, TX -&gt; Dallas, TX</code> (up to 10 stops). Up to 500 trips.",
            "items": {
              "type": "string"
            }
          },
          "origins": {
            "title": "Distance matrix: origins",
            "maxItems": 50,
            "type": "array",
            "description": "For a distance matrix: the places trips start from, one per line. Every origin is paired with every destination below (5 origins × 4 destinations = 20 routes). Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "Distance matrix: destinations",
            "maxItems": 50,
            "type": "array",
            "description": "For a distance matrix: the places trips end at, one per line. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "travelModes": {
            "title": "Travel modes",
            "type": "array",
            "description": "Each trip is asked once per mode chosen; each answer is one route.",
            "items": {
              "type": "string",
              "enum": [
                "driving",
                "transit",
                "walking",
                "bicycling"
              ],
              "enumTitles": [
                "Driving",
                "Public transit",
                "Walking",
                "Bicycling"
              ]
            },
            "default": [
              "driving"
            ]
          },
          "routesPerTrip": {
            "title": "Routes per trip",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Google's best route first, then the alternatives it offers (up to 3 for driving, 6 for transit). Alternatives are included in the price of the trip.",
            "default": 3
          },
          "includeSteps": {
            "title": "Include turn-by-turn steps",
            "type": "boolean",
            "description": "Every instruction of every route (\"Turn left onto Brazos St\", 0.1 mi, 1 min), and for transit each ride's line, stops and times. Charged as a route with steps.",
            "default": false
          },
          "departInHours": {
            "title": "Depart in N hours",
            "minimum": 0,
            "maximum": 336,
            "type": "integer",
            "description": "Plan the trips as leaving N hours after the run starts: traffic and transit timetables at that hour. 0 leaves now. Works with schedules: <code>12</code> always asks for half a day later.",
            "default": 0
          },
          "departAt": {
            "title": "Depart at (local time)",
            "pattern": "^\\s*(\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])[ T]([01]\\d|2[0-3]):[0-5]\\d)?\\s*$",
            "type": "string",
            "description": "A date and time at the first stop, as <code>YYYY-MM-DD HH:MM</code> (<code>2026-11-20 08:00</code> for 8 AM there). When set, it replaces \"Depart in N hours\". Transit needs a date from today on: Google has no timetables for past dates.",
            "default": ""
          },
          "avoidTolls": {
            "title": "Avoid tolls",
            "type": "boolean",
            "description": "Driving routes that avoid toll roads when Google finds one.",
            "default": false
          },
          "avoidHighways": {
            "title": "Avoid highways",
            "type": "boolean",
            "description": "Driving routes that avoid highways.",
            "default": false
          },
          "avoidFerries": {
            "title": "Avoid ferries",
            "type": "boolean",
            "description": "Routes that avoid ferries.",
            "default": false
          },
          "language": {
            "title": "Language",
            "pattern": "^\\s*[a-z]{2}(-[A-Za-z]{2})?\\s*$",
            "type": "string",
            "description": "Language of Google's texts (\"2 hr 58 min\", the steps, road names), as a code: <code>en</code>, <code>es</code>, <code>de</code>, <code>pt-BR</code>. Distances and durations are also given in metres and seconds.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "pattern": "^\\s*[A-Za-z]{2}\\s*$",
            "type": "string",
            "description": "Two-letter country code Google answers for (<code>us</code>, <code>gb</code>, <code>de</code>). It decides which \"Springfield\" a bare name means: use the trips' country.",
            "default": "us"
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}