outscraper
Version:
The library provides convenient access to the Outscraper API. Allows using Outscraper's services from your code. See https://outscraper.com for details.
37 lines (28 loc) • 899 B
Markdown
Returns directions between two points from Google Maps. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Google/paths/~1maps~1directions/get).
Install the package with:
```bash
npm install outscraper --save
yarn add outscraper
```
[](https://www.npmjs.com/package/outscraper)
```js
const Outscraper = require('outscraper');
// Or using ES modules:
import Outscraper from 'outscraper';
let client = new Outscraper('SECRET_API_KEY');
```
[](https://app.outscraper.com/profile)
```js
// Returns directions:
client.googleMapsDirections([
['29.696596, 76.994928', '30.715966244353, 76.8053887016268'],
['29.696596, 76.994928', '30.723065, 76.770169']
]).then(response => {
console.log(response);
});;
```