npm install node-lyft

Start your V8 engines, we’ve got a Node SDK

Lyft’s node example, GIF’d

Continuing our initiative to put “SDK Support in the Fast Lane” — starting with Go — we are proud to announce the general release of our Node SDK, available everywhere npm is installed. To start using Javascript to interact with Lyft’s API, it’s as simple as invoking the headline of this post:

npm install node-lyft

Just like our Go SDK, this was generated using our Open API spec, available here:

We’ve updated our Reference Documentation to include Node SDK examples for all of our endpoints. For example, let’s say you wanted to get availability about ride types near you. After installing node-lyft into your project, just follow the code path below:

import lyft from ‘node-lyft’;
let defaultClient = lyft.ApiClient.instance;
// Configure OAuth2 access token for authorization: Client Authentication
let clientAuth = defaultClient.authentications[‘Client Authentication’];
clientAuth.accessToken = ‘YOUR ACCESS TOKEN’;
let apiInstance = new lyft.PublicApi();
apiInstance.getRideTypes(37.7763, -122.3918).then((data) => {
console.log(‘API called successfully. Returned data: ‘ + data);
}, (error) => {

For a beefier example (which includes the GIF featured here), check out the included example directory featuring code by Jordan Patton, adapted to use the new SDK by Andrew Martin:

If you find any bugs with the SDK, please let us know via GitHub Issues on the repo — or even better, suggest a PR for a fix: .

Have any questions about the SDK, or anything Lyft API related? Let us know on our new developer community site, powered by Discourse:

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.