SHANGHAI METRO API
Shanghai Metro API Data Retrieval Script Documentation (上海地铁线API)
This API script is designed to retrieve information from the airport info database using provided parameters. The script constructs the appropriate URL based on the parameters provided and then fetches data from the API. Please follow the instructions below to use this script effectively
Usage
Making a HTTP request via a web browser or API Platform etc. Postman.
The following parameters are accepted:
Depending on the parameters provided, the script will construct a URL to fetch information from Shanghai-Metro API
Parameter Guidelines
departure_id
Parameter:If you provide a valid
departure_id
parameter of departure station etc. '0926', the script will retrieve information of selected departure station id.
destination_id
Parameter:If you provide a valid
destination_id
parameter of destination station etc. '0737', the script will retrieve information of selected destination station id.
ticket
Parameter:If you provide a valid
ticket
parameter as '0' or '1', the script will retrieve information of selected ticket.
day
Parameter:If you provide a valid
day
parameter as 'MONTOTHUR_0', 'FRIDAY_0', 'SATURDAY_0' or 'WEEKEND_0’, the script will retrieve information of selected day.
time
Parameter:If you provide a valid
time
parameter of entering or arriving metro etc. '82740', the script will retrieve information of selected time.
line
Parameter:If you provide a
line
parameter of metro line etc. '1', the script will retrieve information of selected line.
stat_id
Parameter:If you provide a
stat_id
parameter of station etc. '0926', the script will retrieve information of selected station id.
stat_name
Parameter:If you provide a valid
stat_name
parameter of station etc. 'JiuTing', the script will retrieve information of selected station name.
download
Parameter:If you want to download the JSON output of these parameters, define the download parameter with empty or any input will able you to auto download it.
Station ID
Refer this https://api.kosontechnology.com/json/station-ID.json to find your station ID.
Below is a sample how you will see station ID at 'key' value:
Find station name and you will see station ID at top column.
API
Retrieve all metro line number information: All Line Number
Retrieve all metro line timetable: All Line Timetable
Retrieve last line timetable: Last Line Timetable
Retrieve history based on metro line: Line History
Retrieve metro line colour: Line Colour
Retrieve all metro station information: All Station Information
Retrieve metro station based on metro line: Search Station With Line
Retrieve metro station based on station id: Search Station With Station ID
Retrieve metro station information based on station name: Search Station With Station Name
Retrieve last station timetable: Last Station Timetable
Estimate arrival time: Estimate Arrival Time
Check ticket price: Check Price
Check route: Check Route
Last updated