Lyft
  1. Public
Lyft
  • 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

Cost estimates

GET
/cost
Public
Estimate the cost of taking a Lyft between two points.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.lyft.com/v1/cost?start_lat=&start_lng='
Response Response Example
200 - Example 1
{
  "cost_estimates": [
    {
      "cost_token": "EupdCgIzy17lJoRmiO5",
      "display_name": "Lyft",
      "estimated_cost_cents_max": 1080,
      "estimated_cost_cents_min": 1390,
      "estimated_distance_miles": 12.4,
      "estimated_duration_seconds": 540,
      "is_valid_estimate": true,
      "primetime_confirmation_token": "EupdCgIzy17lJoRmiO5",
      "primetime_percentage": "25%",
      "ride_type": "lyft"
    }
  ]
}

Request

Query Params
ride_type
string 
optional
ID of a ride type
start_lat
number 
required
Latitude of the starting location
start_lng
number 
required
Longitude of the starting location
end_lat
number 
optional
Latitude of the ending location
end_lng
number 
optional
Longitude of the ending location

Responses

🟢200An object with an array of cost estimates by ride type
application/json
Body
cost_estimates
array[object (CostEstimate) {11}] 
optional
cost_token
string 
optional
A token that confirms the user has accepted current Prime Time and/or fixed price charges. See 'Request a Lyft' for more details
currency
string 
optional
The ISO 4217 currency code for the amount (e.g. 'USD')
display_name
string 
optional
A human readable description of the ride type
estimated_cost_cents_max
integer <int32>
optional
Estimated upper bound for trip cost, in minor units (cents). Estimates are not guaranteed, and only provide a reasonable range based on current conditions.
estimated_cost_cents_min
integer <int32>
optional
Estimated lower bound for trip cost, in minor units (cents). Estimates are not guaranteed, and only provide a reasonable range based on current conditions.
estimated_distance_miles
number <double>
optional
Estimated distance for this trip
estimated_duration_seconds
integer <int32>
optional
Estimated time to get from the start location to the end.
is_valid_estimate
boolean 
optional
The validity of the cost estimate returned
primetime_confirmation_token
string 
optional
This token is needed when requesting rides. (Deprecated)
primetime_percentage
string 
optional
Current Prime Time Percentage. Prime Time adds a percentage to ride costs, prior to other applicable fees. When ride requests greatly outnumber available drivers, our system will automatically turn on Prime Time.
If Prime Time is inactive, the value returned will be '0%'.
Note: The returned estimate already has Prime Time factored in. The value is returned here for reference and to allow users to confirm/accept Prime Time prior to initiating a ride.
ride_type
enum<string> 
optional
The ID of the ride type
Allowed values:
lyftlyft_linelyft_pluslyft_premierlyft_luxlyft_luxsuv
🟠400The 'error' field will be one of the following: * `bad_parameter`: A validation error occurred * `no_service_in_area`: start location is not within a Lyft service area * `ridetype_unavailable_in_region`: ridetype not supported at this start location
Modified at 2023-08-15 05:38:33
Next
Available drivers nearby
Built with