{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Transit Station Lines, Alerts & Departures",
    "description": "Export Google Maps transit stations by city and transit type, station name, or Maps URL/ID. Returns coordinates, address, agency, serving lines, accessibility, service alerts and live departures where published.",
    "version": "1.0",
    "x-build-id": "ACyxADinZzc51QM77"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlyth-forge~google-maps-transit-stations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlyth-forge-google-maps-transit-stations",
        "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/crawlyth-forge~google-maps-transit-stations/runs": {
      "post": {
        "operationId": "runs-sync-crawlyth-forge-google-maps-transit-stations",
        "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/crawlyth-forge~google-maps-transit-stations/run-sync": {
      "post": {
        "operationId": "run-sync-crawlyth-forge-google-maps-transit-stations",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "searchStations",
              "stationNames",
              "stationUrls",
              "departures",
              "monitorAlerts"
            ],
            "type": "string",
            "description": "What to collect. searchStations finds stations in a city; stationNames and stationUrls read named stations; departures returns the departure board; monitorAlerts returns only alerts that appeared or cleared since the previous run.",
            "default": "searchStations"
          },
          "city": {
            "title": "City or area",
            "type": "string",
            "description": "City, district or area to search, e.g. `New York`, `London`, `Berlin Mitte`. Used by mode=searchStations, and as a fallback in departures/monitorAlerts when no station names or URLs are given.",
            "default": "New York"
          },
          "transitTypes": {
            "title": "Transit types",
            "uniqueItems": true,
            "type": "array",
            "description": "Transit types to search for (mode=searchStations, and the fallback in departures/monitorAlerts). Each selected type is searched in the city.",
            "items": {
              "type": "string",
              "enum": [
                "subway",
                "train",
                "bus",
                "tram",
                "ferry"
              ],
              "enumTitles": [
                "Subway / metro",
                "Train / rail",
                "Bus",
                "Tram / light rail",
                "Ferry"
              ]
            },
            "default": [
              "subway"
            ]
          },
          "stationNames": {
            "title": "Station names",
            "type": "array",
            "description": "Station names to look up (mode=stationNames, departures, monitorAlerts), e.g. `Times Sq-42 St`, `Oxford Circus`, `Alexanderplatz`. Add a city inside the name when it is ambiguous.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "stationUrls": {
            "title": "Station URLs or IDs",
            "type": "array",
            "description": "Google Maps place URLs (including share links), `ChIJ...` place IDs, or `0x...:0x...` feature IDs (mode=stationUrls, departures, monitorAlerts).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeDepartures": {
            "title": "Include departure board",
            "type": "boolean",
            "description": "Attach the upcoming departures Google publishes for each station to its station record (mode=searchStations, stationNames, stationUrls). The separate departures mode always returns departure rows.",
            "default": false
          },
          "maxDeparturesPerLine": {
            "title": "Departures per line",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum upcoming departures kept per line in a station record and returned per line in the departures mode.",
            "default": 3
          },
          "maxLinesPerStation": {
            "title": "Lines per station",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum line entries kept per station. Large rail terminals can list hundreds of train numbers; raise this only when you need the full list.",
            "default": 100
          },
          "includeLineColors": {
            "title": "Line colours",
            "type": "boolean",
            "description": "Resolve each line badge colour (hex) from Google's public line icon. Adds one cached request per unique line icon.",
            "default": true
          },
          "includeClearedAlerts": {
            "title": "Include cleared alerts",
            "type": "boolean",
            "description": "In mode=monitorAlerts, also emit a row when an alert present in the previous run is no longer shown.",
            "default": true
          },
          "monitorStateKey": {
            "title": "Monitor state key",
            "type": "string",
            "description": "Separate saved alert state for mode=monitorAlerts, so different tasks can monitor the same station independently. Keep the same value on every scheduled run.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted dataset rows: stations in station modes, departure rows in departures mode, change rows in monitorAlerts mode.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}