{
  "openapi": "3.0.1",
  "info": {
    "title": "Busbud Scraper: Bus, Train & Ferry Fares, Routes, Schedules",
    "description": "Export every bookable Busbud departure for a route and date: live fares split into base and fees, operators, transfers, seats, amenities and ISO times across buses, trains and ferries. Filter by price, transfers, time, operator or amenity, or track the cheapest fare per route daily.",
    "version": "0.1",
    "x-build-id": "WdRUbhgeSQK0eqAdJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~busbud-fares-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-busbud-fares-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/getascraper~busbud-fares-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-busbud-fares-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/getascraper~busbud-fares-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-busbud-fares-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": "Busbud route, results or deeplink URLs. The two city geohashes are read straight from the URL path, so any valid Busbud route link works. Leave the default to scrape the Boston to New York corridor.",
            "default": [
              {
                "url": "https://www.busbud.com/en/bus-schedules-results/drt2yz/dr5reg/boston-new-york"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "routeQueries": {
            "title": "Route Queries (Origin > Destination)",
            "type": "array",
            "description": "Routes written as \"Origin > Destination\", for example \"Mexico City > Oaxaca\". Each side is resolved to a Busbud city. Use this when you do not have a route URL to hand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "departureDates": {
            "title": "Travel Dates",
            "type": "array",
            "description": "Exact travel dates in YYYY-MM-DD form. Past dates and dates beyond Busbud's roughly 330-day horizon are dropped with a log message. Leave empty to use Days Ahead instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "daysAhead": {
            "title": "Days Ahead",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "When no exact dates are given, search this many consecutive days starting tomorrow. Keep it small: each day is a separate fare search.",
            "default": 1
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code Busbud should quote fares in. Always sent explicitly so a run does not silently inherit a currency guessed from the proxy IP.",
            "default": "USD"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult passengers the fare is priced for. The price field is the total for the whole party.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of child passengers to price. Competing Busbud scrapers price adults only, so this exposes the family and group fares they cannot quote.",
            "default": 0
          },
          "seniors": {
            "title": "Seniors",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Number of senior passengers to price, where the operator offers a senior fare. Priced alongside adults and children in one search.",
            "default": 0
          },
          "directOnly": {
            "title": "Direct Departures Only",
            "type": "boolean",
            "description": "Keep only non-stop departures with zero transfers.",
            "default": false
          },
          "maxTransfers": {
            "title": "Max Transfers",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only departures with at most this many transfers. A numeric ceiling other Busbud scrapers do not offer: they stop at a simple direct-only toggle, so a 1-change itinerary cannot be kept while dropping 3-change ones. Leave empty for any."
          },
          "departAfter": {
            "title": "Depart At Or After (HH:MM)",
            "type": "string",
            "description": "Keep only departures leaving at or after this local time, 24-hour HH:MM. Useful for filtering out overnight or very early services."
          },
          "departBefore": {
            "title": "Depart At Or Before (HH:MM)",
            "type": "string",
            "description": "Keep only departures leaving at or before this local time, 24-hour HH:MM. Combine with Depart At Or After to keep a daytime window."
          },
          "maxPrice": {
            "title": "Max Price",
            "minimum": 0,
            "type": "number",
            "description": "Fare ceiling: keep only departures whose total price is at or below this value, in the chosen currency. A budget filter the incumbent scrapers leave to post-processing."
          },
          "operators": {
            "title": "Operators Filter",
            "type": "array",
            "description": "Keep only departures run by a carrier whose name contains one of these, for example \"FlixBus\" or \"Amtrak\". Case-insensitive. Leave empty to keep every operator.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "requiredAmenities": {
            "title": "Required Amenities",
            "type": "array",
            "description": "Keep only departures that publish all of these amenities, for example \"Wifi\" and \"Power outlets\". Lets you shop by onboard comfort, which the incumbent scrapers only return as raw text.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "vehicleTypes": {
            "title": "Vehicle Types",
            "type": "array",
            "description": "Keep only these vehicle types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "bus",
                "train",
                "ferry",
                "shuttle",
                "van",
                "carpool"
              ],
              "enumTitles": [
                "Bus",
                "Train",
                "Ferry",
                "Shuttle",
                "Van",
                "Carpool"
              ]
            },
            "default": []
          },
          "lang": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter interface language Busbud answers in, for example en, es, fr. Affects city and station names.",
            "default": "en"
          },
          "lowestFareOnly": {
            "title": "Lowest Fare Only (Monitor Mode)",
            "type": "boolean",
            "description": "Return only the single cheapest bookable departure per route and date. Purpose-built for daily price monitoring: schedule the run, keep one row per day, and you have a clean fare curve without post-processing. Off by default.",
            "default": false
          },
          "maxItems": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of departure rows to write across all routes and dates. Keep it modest while testing; raise it for a full timetable export.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Busbud answers plain datacentre addresses with an empty search, so residential proxy is on by default and strongly recommended. Changing this is a paid-feature setting.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "debug": {
            "title": "Debug Logging",
            "type": "boolean",
            "description": "Log the raw backend status and payload shape for troubleshooting. Leave off for normal runs.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}