Google Maps Driving Directions

FREE
By montanaflynn
Updated 5 months ago
7.7/10
Popularity Score
507ms
Latency
-
Success Rate

Google Maps Driving Directions API Documentation

Unofficial barebones wrapper of the google maps API provides basic driving directions between two points.

View API Details
GETDirections
GETDirections

Step by step directions between any two addresses

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
endingSTRING
REQUIREDDestination address
startingSTRING
REQUIREDBeginning address
Code Snippet
unirest.get("https://montanaflynn-mapit.p.rapidapi.com/directions?ending=New+York%2C+NY%2C+USA&starting=Orange+County%2C+CA")
.header("X-RapidAPI-Host", "montanaflynn-mapit.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://montanaflynn-mapit.p.rapidapi.com/directions
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://montanaflynn-mapit.p.rapidapi.com/directions?ending=New+York%2C+NY%2C+USA&starting=Orange+County%2C+CA")
.header("X-RapidAPI-Host", "montanaflynn-mapit.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication