Discover/megabus.com API
live

megabus.com APImegabus.com

Search Megabus UK coach trips, compare fares, check seat availability, and retrieve stop lists and price calendars via a structured REST API.

Endpoints
5
Updated
10d ago
Try it
Number of passengers.
Origin Distribusion city code (e.g. GBLON for London, GBMAN for Manchester, GBEDIN for Edi
Destination Distribusion city code (e.g. GBLON for London, GBMAN for Manchester, GBEDIN fo
Departure date in YYYY-MM-DD format. Must be a current or future date.
api.parse.bot/scraper/7adc06ab-d9ba-4cbc-b019-293f47442dc3/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/7adc06ab-d9ba-4cbc-b019-293f47442dc3/search_trips?pax=1&origin=GBLON&destination=GBMAN&departure_date=2026-05-01' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 5 totalclick to expand

Search for available coach trips between two cities on a specific date. Returns detailed trip info including times, duration, prices, and seat availability. Uses Distribusion city codes (e.g. GBLON, GBMAN) which differ from the numeric stop codes returned by get_stops_list.

Input
ParamTypeDescription
paxintegerNumber of passengers.
originrequiredstringOrigin Distribusion city code (e.g. GBLON for London, GBMAN for Manchester, GBEDIN for Edinburgh). These are NOT the numeric codes from get_stops_list.
destinationrequiredstringDestination Distribusion city code (e.g. GBLON for London, GBMAN for Manchester, GBEDIN for Edinburgh). These are NOT the numeric codes from get_stops_list.
departure_daterequiredstringDeparture date in YYYY-MM-DD format. Must be a current or future date.
Response
{
  "type": "object",
  "fields": {
    "data": "array of trip objects with id, departure_time, arrival_time, duration_seconds, total_seats_left, booked_out, cheapest_price_pence, fares, and carrier_name"
  },
  "sample": {
    "data": [
      {
        "id": "NEXP-GBLONGGE-GBMANAIR-2026-05-01T04:10-2026-05-01T12:10",
        "fares": [
          {
            "id": "NEXP-GBLONGGE-GBMANAIR-2026-05-01T04:10-2026-05-01T12:10-FARE-1",
            "fare_class": {
              "code": "FARE-1",
              "name": "Standard Fare",
              "journey_type": "single",
              "iata_category": null
            },
            "price_pence": 3510
          }
        ],
        "booked_out": false,
        "arrival_time": "2026-05-01T12:10",
        "departure_time": "2026-05-01T04:10",
        "duration_seconds": 28800,
        "total_seats_left": 22,
        "cheapest_price_pence": 3510
      }
    ],
    "status": "success"
  }
}

About the megabus.com API

The Megabus UK API covers 5 endpoints for querying coach trips, stop data, route guides, fare calendars, and seat vacancy across the Megabus UK network. The search_trips endpoint returns trip-level detail including departure and arrival times, duration in seconds, seats remaining, and cheapest price in pence — all keyed by Distribusion city codes such as GBLON and GBMAN.

Trip Search and Fare Data

The search_trips endpoint accepts an origin and destination as Distribusion city codes (e.g. GBLON for London, GBEDIN for Edinburgh), a departure_date in YYYY-MM-DD format, and an optional pax count. It returns an array of trip objects, each carrying departure_time, arrival_time, duration_seconds, total_seats_left, a booked_out flag, and cheapest_price_pence. This is the primary endpoint for building trip search or fare comparison tools.

Price Calendars and Vacancy Checks

get_cheapest_prices_calendar accepts the same origin/destination city codes and a JSON array of dates, returning only dates that have service — dates with no trips are omitted entirely. Each returned date maps to a price object with fractional (price in pence) and currency. For deeper fare inspection, get_trip_vacancy checks a specific connection by departure and arrival station codes (e.g. GBLONVSA, GBMANCBS), date, time, and carrier code. It returns a vacancy response including vacant, total_price, and original_price attributes, and optionally filters by fare class (FARE-1 Standard, FARE-2 Restricted, FARE-3 Fully Flexible).

Stops and Route Guides

get_stops_list returns the full catalogue of UK Megabus stops with name, friendlyName, code, longitude, latitude, information, stopGroupExtFlag, and ssrs fields. Note that these numeric stop codes are distinct from the Distribusion city codes used in trip search — they apply specifically to the get_trip_vacancy station parameters. get_route_guides returns all published route guides, including title, services, departures, destinations, timetableUrl, and seasonal timetableTabs data, making it useful for building timetable browsers or route discovery features.

Common use cases
  • Build a coach fare comparison tool using cheapest_price_pence from search_trips across multiple routes
  • Display a monthly price calendar for a London–Edinburgh route using get_cheapest_prices_calendar
  • Check real-time seat availability and fare class pricing for a specific departure via get_trip_vacancy
  • Render an interactive stop map using latitude/longitude coordinates from get_stops_list
  • Generate a timetable directory from route guides including service numbers and timetableUrl links
  • Alert users when low-cost seats appear on a route by polling search_trips for total_seats_left
  • Cross-reference Distribusion station codes with stop metadata before submitting a vacancy query
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Megabus have an official public developer API?+
Megabus does not publish a documented public developer API. Their booking system runs on the Distribusion platform, but no official API is offered to third-party developers directly.
What is the difference between the city codes used in search_trips and the station codes used in get_trip_vacancy?+
search_trips uses Distribusion city-level codes like GBLON or GBMAN, which represent broader city areas. get_trip_vacancy uses station-level codes like GBLONVSA (London Victoria) or GBMANCBS (Manchester Coach Station). The stop codes returned by get_stops_list correspond to the station-level codes for vacancy checks, not to the city codes for trip search.
Does the API cover return journeys or multi-leg itineraries?+
Not currently. The API covers single-leg outbound trip search, price calendars, vacancy checks, and stop/route metadata. You can fork it on Parse and revise to add a return-journey search endpoint that calls search_trips with origin and destination swapped for a return date.
What happens when get_cheapest_prices_calendar has no service on a requested date?+
Dates without available trips are omitted from the response entirely. The returned object only contains keys for dates where service exists, each mapping to a price object with fractional (in pence) and currency fields.
Does the API cover Megabus routes outside the UK, such as US or European services?+
Not currently. The API is scoped to Megabus UK routes and uses UK Distribusion city codes (GB-prefixed). You can fork it on Parse and revise to add endpoints targeting other regional Megabus markets.
Page content last updated . Spec covers 5 endpoints from megabus.com.
Related APIs in TravelSee all →
opentable.ca API
Search and discover restaurants on OpenTable, view detailed information like menus and reviews, and check real-time dining availability across metro areas. Find top-rated restaurants in your location and instantly see which tables are open for your preferred date and time.
fandango.com API
Search for movies and retrieve nearby theater listings with showtimes by ZIP code and date, plus showtimes for a specific movie at nearby theaters.
data.lime.bike API
Access real-time availability data for Lime bikes and scooters, including station locations, vehicle status, system alerts, and geofencing zones across multiple cities. Monitor micromobility inventory and service information to find nearby vehicles or plan your trips effectively.
turo.com API
Search for peer-to-peer car rentals across Turo by location and dates to browse available vehicles with pricing, specifications, and real-time availability. Get detailed information on specific cars to compare features and make rental decisions.
reservation.pc.gc.ca API
Access real-time campground availability and reservation data from the Parks Canada booking system. Search locations, retrieve available campsites and cabins, filter by equipment type, and review operating date schedules across the national park network. Includes detailed resource metadata and map-based availability overviews.
bahn.com API
Search German train schedules and stations, find connections between destinations, and compare ticket prices across Deutsche Bahn routes. Get real-time station information and transit association details to plan your train journey efficiently.
united.com API
Search United Airlines flights, check real-time flight status, and view detailed seat maps to plan your perfect trip. Compare fare options and use airport autocomplete to quickly find your departure and arrival cities.
thetrainline.com API
Search UK train stations and find the cheapest fares across date ranges, then generate direct booking links to complete your purchase on Trainline.com. Get real-time journey information to compare prices and book your tickets in seconds.