Lyft API
  1. Public
Lyft API
  • Restricted
  • Public
    • Cost estimates
      GET
    • Available drivers nearby
      GET
    • Pickup ETAs
      GET
    • Types of rides
      GET
  • User
    • The user's general info
      GET
    • List rides
      GET
    • Request a Lyft
      POST
    • Get the ride detail of a given ride ID
      GET
    • Cancel a ongoing requested ride
      POST
    • Update the destination of the ride
      PUT
    • Add the passenger's rating, feedback, and tip
      PUT
    • Get the receipt of the rides.
      GET
  • Sandbox
    • Preset Prime Time percentage
      PUT
    • Propagate ride through ride status
      PUT
    • Preset types of rides for sandbox
      PUT
    • Driver availability for processing ride request
      PUT
  1. Public

Available drivers nearby

GET
/drivers
Public
The drivers endpoint returns a list of nearby drivers' lat and lng at a given location.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.lyft.com/drivers?lat&lng'
响应示例响应示例
200 - 示例 1
{
    "nearby_drivers": [
        {
            "drivers": [
                {
                    "locations": [
                        {
                            "lat": 36.9442175,
                            "lng": -123.8679133
                        }
                    ]
                }
            ],
            "ride_type": "string"
        }
    ]
}

请求参数

Query 参数
lat
number <double>
必需
Latitude of a location
lng
number <double>
必需
Longitude of a location

返回响应

🟢200成功
application/json
An object with an array of available drivers sorted by eta for the given location
Body
nearby_drivers
array[object (NearbyDriversByRideType) {2}] 
可选
drivers
array[object (NearbyDriver) {1}] 
可选
list of nearby drivers group by ride type sorted by eta
ride_type
string 
可选
driver's ride type. if driver is eligable for several ride types, he will be duplicated.
🟠400请求有误

【Lyft】API开发者 微信交流群

用微信扫右侧二维码,加入【Lyft】API开发者 交流群,互助沟通

扫码加入交流群
上一页
Cost estimates
下一页
Pickup ETAs
Built with