{
  "openapi": "3.0.1",
  "info": {
    "title": "Busbud Routes Scraper",
    "description": "Scrape Busbud bus, train and ferry departures for any route and date: live fares with fees, times with timezones, operators, seats left, amenities and transfers. 30 currencies. Export JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "gGXd5H67Ni6J3mqLQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~busbud-routes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-busbud-routes-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/parsebird~busbud-routes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-busbud-routes-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/parsebird~busbud-routes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-busbud-routes-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": {
          "startUrls": {
            "title": "Busbud route URLs",
            "type": "array",
            "description": "Add route pages copied from busbud.com, for example https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg. Station and airport pages (…/i/…), search results URLs (…/bus-schedules-results/…) and deeplinks work too. A search results URL with an outbound_date is searched on that date unless you set travel dates below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "routeQueries": {
            "title": "City pairs",
            "type": "array",
            "description": "Type routes as \"Origin > Destination\", for example \"Mexico City > Oaxaca\" or \"Johannesburg > Cape Town\". Each name is looked up in Busbud's own place index, the same one behind its search box. When a name fits several cities, the route Busbud has the most traveller reviews for is used; add a region or country after a comma to choose, for example \"Portland, Maine > Boston\". Station and airport names work too.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max departures",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after saving this many departures across all routes and dates. You pay only for departures saved.",
            "default": 100
          },
          "departureDates": {
            "title": "Travel dates",
            "type": "array",
            "description": "Search these exact departure dates, in YYYY-MM-DD, for example 2026-12-24. Leave empty to use Days ahead instead. Past dates and dates more than 365 days ahead are skipped.",
            "items": {
              "type": "string"
            }
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Used only when no travel dates are set: search each of the next N days (up to 365), starting tomorrow (UTC). Each day is one search per route.",
            "default": 1
          },
          "currency": {
            "title": "Fare currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "NZD",
              "MXN",
              "BRL",
              "ARS",
              "CLP",
              "COP",
              "PEN",
              "ZAR",
              "MAD",
              "TRY",
              "CHF",
              "CZK",
              "DKK",
              "NOK",
              "SEK",
              "PLN",
              "RUB",
              "ILS",
              "INR",
              "CNY",
              "HKD",
              "JPY",
              "KRW",
              "SGD",
              "THB"
            ],
            "type": "string",
            "description": "Currency Busbud quotes fares in. Busbud converts from the operator's own currency, so amounts follow its exchange rate.",
            "default": "USD"
          },
          "adults": {
            "title": "Adult passengers",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult seats priced in each search. The price is the total for the whole group, so 2 adults is about double.",
            "default": 1
          },
          "directOnly": {
            "title": "Direct departures only",
            "type": "boolean",
            "description": "Keep only departures with no change. Leave off to also get connecting trips with their transfer stations.",
            "default": false
          },
          "vehicleTypes": {
            "title": "Vehicle types",
            "type": "array",
            "description": "Keep only departures where every leg uses one of these vehicle types. Leave empty to keep all.",
            "items": {
              "type": "string",
              "enum": [
                "bus",
                "train",
                "ferry",
                "shuttle",
                "van",
                "carpool"
              ],
              "enumTitles": [
                "Bus",
                "Train",
                "Ferry",
                "Shuttle",
                "Van",
                "Carpool"
              ]
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy settings for reaching Busbud. The default works for most runs.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}