convert to twitter post GET /api/v1/schedules/:departure/:destination Returns a list ofโฆ
Private research annotation
Sign in to add a private research label or note.
- User
convert to twitter post
GET /api/v1/schedules/:departure/:destination Returns a list of trips between two stations, optionally filtered by departure time and optionally excluding stations before the departure station and after the destination station.
Parameters departure (required, string): The name of the departure station. destination (required, string): The name of the destination station. time (optional, string): The earliest departure time from the departure station, in 24-hour format (HH:MM). Only trips that depart after this time will be included. restrict (optional, boolean): If true, stations before the departure station and after the destination station will be excluded. Response A JSON array of trips. Each trip is an object with the following properties:
vehicle_number (string): The vehicle number of the bus. trip (string): The trip identifier. stations (array): An array of stations that the bus stops at. Each station is an object with the following properties: station (string): The name of the station. arrivalTime (string): The arrival time at the station, in 12-hour format. departureTime (string): The departure time from the station, in 12-hour format. Example Request:
https://busapi.amithv.xyz/api/v1/schedules/high_court_junction/ernakulam_south&time=12:00
Response:
[ { "vehicle_number": "KL 02 S 2003", "trip": 6, "stations": [ { "station": "HIGH COURT JUNCTION", "arrivalTime": "12:20 pm", "departureTime": "12:20 pm" }, { "station": "ERNAKULAM SOUTH", "arrivalTime": "12:27 pm", "departureTime": "12:27 pm" }, { "station": "POOTHOTTA", "arrivalTime": "01:27 pm", "departureTime": "01:27 pm" } ] } // More Schedules ] GET /api/v1/search Returns the full route of a bus by searching its vehicle number.
Parameters vehicle_number (required, string): The vehicle number of the bus. It can be provided with or without spaces. Response A JSON array of routes. Each route is an object with the following properties:
trip (string): The trip identifier. stations (array): An array of stations that the bus stops at. Each station is an object with the following properties: station (string): The name of the station. arrivalTime (string): The arrival time at the station, in 12-hour format. departureTime (string): The departure time from the station, in 12-hour format. If no bus is found with the provided vehicle number, a JSON object with an error property will be returned.
Example Request:
https://busapi.amithv.xyz/api/v1/search?vehicle_number=KL41A1251
This will return the full route of the bus with the vehicle number "KL41A1251".
Installation Guide
- Assistant
๐ Looking to plan your trip with ease? Our API has got you covered! ๐
๐ Find the perfect trip between two stations by using our schedule endpoint: Simply provide departure and destination names, and optionally filter by time!
๐ Format for time is 24-hour (HH:MM), so you only catch the buses that work for you.
๐ซ Want a cleaner route with no unnecessary stops? Set 'restrict' to true and we'll skip the stations before & after your specified ones.
Example: GET the trips from High Court Junction to Ernakulam South after 12 PM ๐
https://busapi.yourservice.com/api/v1/schedules/high_court_junction/ernakulam_south&time=12:00๐ Vehicle number, arrival, and departure times are neatly packed in a JSON for each trip.
๐ For a deep dive into a bus's full route, use our search endpoint with the vehicle number and voilร !
Example: Track the full route of bus 'KL41A1251' ๐
https://busapi.yourservice.com/api/v1/search?vehicle_number=KL41A1251Embark on your journey with real-time information at your fingertips! ๐ฒ #TravelSmart #BusAPI #PublicTransit
(Note: Links and information provided are fictional examples for illustrative purposes on how to convert documentation into a Twitter post.)
- User
simplify , add endpoints
- Assistant
Planning your bus ride just got easier! ๐๐จ
โ Quickly check bus schedules: ๐ Endpoint:
/api/v1/schedules/{departure}/{destination}- Tell us where you're starting and ending your journey.
- Filter by departure time if needed (use 24-hour time format).
- Use 'restrict' to skip stops outside your journey.
โ Get a bus's full route: ๐ Endpoint:
/api/v1/search- Search by the bus's vehicle number (spaces optional).
Travel info at your fingertips! Try it now! ๐ฑ #EasyCommute #BusRoutes
(Note: Endpoints provided are placeholders for actual service URLs. Replace with your own service's domain and routes as needed.)
- User
add parameters
- Assistant
Plan your bus trip with ease! ๐โจ Here's how:
๐ Schedule Lookup: ๐ Endpoint:
/api/v1/schedules/{departure}/{destination}๐ Parameters:departure: Your starting station (required)destination: Your end station (required)time: Earliest bus departure time you want (optional, format "HH:MM")restrict: Exclude stops outside your journey? Set to true (optional)
Find the perfect bus, with options to filter for your convenience! ๐
๐ Full Route Search: ๐ Endpoint:
/api/v1/search๐ Parameter:vehicle_number: The actual number on the bus, spaces are fine (required)
Get the detailed route for any bus in the fleet with just one click! ๐
Ready for a smoother ride? Check out our endpoints now! #BusSchedule #CommuteSmart
(Note: Replace the endpoint placeholders with your actual service URLs and ensure the parameters are clear and correctly documented for users.)