node package manager


Provides access to various MapQuest APIs

mapquest-api ============ Provides access to the various Open MapQuest Web Services and APIs.

$ npm install mapquest-api

To make use of the Open MapQuest APIs, you will need to an API key. Which can be obtained by signing up for an account at

You can then specify the key, using one of the following methods:

  • Set the environment variable MAPQUEST_API_KEY; or
  • Pass as the key property in any options.

Get straight to work:

var mq = require('mapquest-api');

Geocoding Web Service | API Documentation

If you only want to use this part, you can:

var geocoder = require('mapquest-api').geocoder;

Pass a location in, as either a string, or a more structured, object via the options object. Pass all: true in the options object to receive an array of all the locations retrieved.

//  String Search
geocoder.geocode({location: '1 Infinite Loop, Cupertino, CA'}, function(err, location) {

//  Object Search
geocoder.geocode({location: {street: "1 Infinite Loop", city: "Cupertino", postalCode: "95014"}}, function(err, location) {