{
  "openapi": "3.0.1",
  "info": {
    "title": "Busbud Routes Scraper",
    "description": "Scrape Busbud intercity bus and train departures: operators, times, duration, transfers, live fares, seats and booking links. Export to CSV, Excel, JSON or XML.",
    "version": "0.1",
    "x-build-id": "Dbbww2ZIG2wynhqi4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~busbud-routes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-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/parseforge~busbud-routes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-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/parseforge~busbud-routes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-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": "Route pages copied from Busbud, for example https://www.busbud.com/en/bus-boston-new-york-city/r/drt2yz-dr5reg. Airport and city-pair pages (/i/), search result URLs (/bus-schedules-results/) and deeplinks all work too.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "routeQueries": {
            "title": "🗺 City pairs",
            "type": "array",
            "description": "Routes written as \"Origin > Destination\", for example \"Mexico City > Oaxaca\" or \"Johannesburg > Cape Town\". Each name is resolved against Busbud's own city index.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "departureDates": {
            "title": "📅 Travel dates",
            "type": "array",
            "description": "Exact departure dates in YYYY-MM-DD, for example 2026-12-24. Leave empty to use the rolling window below instead. Dates more than 330 days ahead are dropped because Busbud has no schedule for them.",
            "items": {
              "type": "string"
            }
          },
          "daysAhead": {
            "title": "🗓 Days ahead",
            "minimum": 1,
            "maximum": 330,
            "type": "integer",
            "description": "Used only when no exact travel dates are given: search the next N days starting tomorrow. One search per route per day.",
            "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 the fares in. Busbud converts from the operator's own currency, so the number changes with this setting.",
            "default": "USD"
          },
          "adults": {
            "title": "👥 Adult passengers",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult seats priced in each search. The fare is the total for the whole party, so 2 adults roughly doubles it.",
            "default": 1
          },
          "directOnly": {
            "title": "🚏 Direct departures only",
            "type": "boolean",
            "description": "Keep only departures with no transfer. Leave off to also collect connecting itineraries with their transfer stations.",
            "default": false
          },
          "vehicleTypes": {
            "title": "🚌 Vehicle types",
            "type": "array",
            "description": "Keep only these vehicle types. Busbud sells coaches alongside trains and ferries on many corridors. Leave empty for everything.",
            "items": {
              "type": "string",
              "enum": [
                "bus",
                "train",
                "ferry",
                "shuttle",
                "van",
                "carpool"
              ],
              "enumTitles": [
                "Bus / coach",
                "Train",
                "Ferry",
                "Shuttle",
                "Van",
                "Carpool"
              ]
            }
          },
          "proxyConfiguration": {
            "title": "🛡 Proxy",
            "type": "object",
            "description": "Apify proxy settings. Required: without it Busbud returns zero departures to runs on the Apify platform.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}