Lyft APIlyft.com ↗
Retrieve Lyft service cities, ride price estimates, ETA data, and service area geometry via 4 structured endpoints. No Lyft developer account required.
What is the Lyft API?
The Lyft API exposes 4 endpoints covering city directories, service area geometry, ride price estimates, and real-time driver availability. get_cities returns every city where Lyft operates organized by country and state, while get_ride_estimates delivers min/max cost in cents and estimated duration for each ride type between two coordinate pairs — without requiring a Lyft developer account.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/facce547-0d6b-41b8-b5de-bc62f6833dd2/get_cities' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace lyft-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Lyft SDK — city lookup, ride pricing, availability."""
from parse_apis.lyft_public_api import Lyft, CityNotFound
client = Lyft()
# Browse the city directory to find available slugs
directory = client.cities.directory()
first_state = directory.US[0]
print(f"State: {first_state.name}, first city: {first_state.cities[0].name} ({first_state.cities[0].slug})")
# Fetch full details for a city by slug
city = client.cities.get(slug="los-angeles-ca")
print(f"{city.city_name} region={city.region_code}, center=({city.service_area.centerLat}, {city.service_area.centerLng})")
# Get ride price estimates between two points (LA downtown → Santa Monica)
for est in client.rideestimates.list(start_lat=34.0522, start_lng=-118.2437, end_lat=34.0195, end_lng=-118.4912, limit=5):
print(f"{est.display_name}: ${est.estimated_cost_cents_min / 100:.2f}-${est.estimated_cost_cents_max / 100:.2f}, {est.estimated_duration_seconds}s")
# Check ride availability at a location
for avail in client.rideavailabilities.check(lat=34.0522, lng=-118.2437, limit=5):
print(f"{avail.display_name}: available={avail.is_available}, {avail.min_cost_cents}-{avail.max_cost_cents} cents")
# Handle a not-found city gracefully
try:
client.cities.get(slug="nonexistent-city-xx")
except CityNotFound as exc:
print(f"City not found: {exc.slug}")
print("exercised: cities.directory / cities.get / rideestimates.list / rideavailabilities.check / CityNotFound")
Returns the complete directory of cities where Lyft operates, organized by country code (US, CA). Each country contains an array of states/provinces, each with an array of cities carrying a display name and a slug usable with get_city_details. The response is a single directory object, not a paginated list.
No input parameters required.
{
"type": "object",
"fields": {
"CA": "array of province objects, each with name (string) and cities (array of objects with name and slug)",
"US": "array of state objects, each with name (string) and cities (array of objects with name and slug)"
},
"sample": {
"data": {
"CA": [
{
"name": "Alberta",
"cities": [
{
"name": "Calgary",
"slug": "calgary-ab"
}
]
}
],
"US": [
{
"name": "Alabama",
"cities": [
{
"name": "Auburn",
"slug": "auburn-al"
},
{
"name": "Birmingham",
"slug": "birmingham-al"
}
]
}
]
},
"status": "success"
}
}About the Lyft API
City Directory and Service Area Data
get_cities returns the full directory of Lyft-served cities in the US and Canada, structured as country → state/province → city objects, each carrying a name and a slug. That slug feeds directly into get_city_details, which returns the city's region_code, a GeoJSON service_area geometry with centerLat, centerLng, and defaultZoom, the available_ride_types flags mapped by ride type key, and any extra_comfort_regions. The disclaimers field surfaces pricing or service notices for that city.
Ride Price Estimates
get_ride_estimates accepts start_lat, start_lng, end_lat, and end_lng and returns a cost_estimates array. Each element includes ride_type, display_name, estimated_cost_cents_min, estimated_cost_cents_max, currency, and an is_valid_estimate flag indicating whether the coordinates fall inside a serviced area. All cost values are in cents, so divide by 100 for dollar amounts.
Nearby Driver Availability
get_nearby_drivers takes a single lat/lng pair and returns an availability array. Each entry covers one ride type with eta_seconds (time to pickup), min_cost_cents, max_cost_cents, currency, display_name, and an is_available boolean. This endpoint is useful for checking which Lyft tiers — standard, XL, Extra Comfort, etc. — are actually operating at a given location right now.
The Lyft API is a managed, monitored endpoint for lyft.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when lyft.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official lyft.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a fare comparison tool that calls get_ride_estimates with origin and destination coordinates and displays cost ranges per ride type.
- Map Lyft service coverage by fetching GeoJSON geometry from get_city_details for each city slug in get_cities.
- Show real-time ETA and availability for each ride tier at a user's current location using get_nearby_drivers.
- Filter Lyft-served cities by state or province to populate a city-selector dropdown for a travel app.
- Determine which ride types (XL, Extra Comfort, etc.) are active in a target city before launching a regional service.
- Track extra_comfort_regions data to identify areas with premium ride availability for fleet analytics.
- Validate whether two coordinate pairs are inside a Lyft service area using is_valid_estimate from get_ride_estimates.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.