2/location/line/bus route/en

Jump to: navigation, search

location/line/bus_route

Return bus route information by starting point and terminal point.

URL

https://api.weibo.com/2/location/line/bus_route.json

Supported Formats

JSON

HTTP Request Method

GET

Requires Login

true
See the Login and Authorization Mechanism Statement for login and authorization details.

Requests Count Limitation

Level:Normal
Count Limitation:true
See the Interface Access Rights Statement for the request count limitation details.

Request Parameters

  Requires Type and Range Description
source false string This parameter is not needed when using OAuth.The value of this parameter is the AppKey.
access_token false string This parameter is required when using OAuth.You will get the access_token after oauth authorization.
begin_pid false string POI ID of starting point.Parameter 'begin_pid' or parameter 'begin_coordinate' must be provided.'begin_pid' is priority selection.
begin_coordinate false string Coordinate of starting point.Longitude and latitude are separated by comma.Parameter 'begin_pid' or parameter 'begin_coordinate' must be provided.'begin_pid' is priority selection.
end_pid false string POI ID of terminal point.Parameter 'end_pid' or parameter 'end_coordinate' must be provided.'end_pid' is priority selection.
end_coordinate false string Coordinate of terminal point.Longitude and latitude are separated by comma.Parameter 'end_pid' or parameter 'end_coordinate' must be provided.'end_pid' is priority selection.
type false int Return the datas by the type.0:The fastest; 1:The most economical; 2:The least transfer; 3:Minimum walking; 4:The most comfortable; Default is 0.

Notes

None

Response

JSON Example

{
    "type": "0",
    "city": "0010",
    "begin_pid": "P010A00CHR9",
    "begin_coordinate": "116.22106,39.90652",
    "end_pid": "P010A00CWWJ",
    "end_coordinate": "116.27505,40.00236",
    "extension_info": "0",
    "transfers": [
        {
            "result_id": "1",
            "distance": "18534米",
            "expense": "0",
            "before_len": "160米",
            "after_len": "820米",
            "nav_count": "2",
            "drive_coordinates": "116.22106,39.90652|116.22106,39.90594",
            "lines": [
                {
                    "seg_id": "1",
                    "name": "598路",
                    "distance": "4470米",
                    "after_len": "160米",
                    "stations_num": "7",
                    "stations": [
                        {
                            "name": "西直门",
                            "longitude": "116.21946",
                            "latitude": "116.21946",
                            "district": "110102",
                            "station_info": "地铁4号线(公益西桥-安河桥北)",
                            "address": "北京西直门",
                            "telephone": ""
                        },
                        ...
                    ]
                },
                ...
            ]
        },
        ...
    ],
    "total_number": 6
}

See the Error Code Description for the error information details.

Field Description

None

Others

None



Language: [[{{{2/uri}}}|中文]]


文档更新时间: 30 January 2012