Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

livescraper

livescraper444MIT1.1.2

The library provides convenient access to the livescraper API. Allows using livescraper's services from your code. See https://livescraper.com for details.

livescraper, google maps, google maps reviews api, google maps scraper, google maps scraper, google maps api, google maps reviews, email scraper, email api, scraper, serpapi, serp api, google

readme

Livescraper Node Library

The library provides convenient access to the Livescraper API from applications written in server-side JavaScript. Allows using Livescraper services from your code.

Installation

Install the package with:

npm install livescraper --save
# Or
yarn add livescraper

Link to the NPM package page

Initialization

const livescraper = require('livescraper');
// Or using ES modules:
import livescraper from 'livescraper';

let client = new livescraper('SECRET_API_KEY');

Link to the profile page to create the API key

Usage

// Search for businesses in specific locations:
client.googleMapsSearch(['restaurants brooklyn usa'], language='en', region='us').then(response => {
    console.log(response);
});

// Or using ES modules and async/await:
(async () => {
  const response = await client.googleMapsSearch(['restaurants brooklyn usa'],language='en', region='us');
  console.log(response);
})();

// Search for businesses in specific locations:
client.googleMapsSearch('["Restaurants in Alakanuk, AK, United States"]', { dropduplicates: 'True', language: 'en', region: 'US', enrichment: 'False', fields: '["business_website"]' }).then(response => {
    console.log(response);
});

// Get reviews of businesses in specific locations:
client.googleReviewSearch('["real estate agents in Los Angeles, CA"]', { dropduplicates: 'True', language: 'en', region: 'US', enrichment: 'False', fields: '["query","business_name"]' }).then(response => {
    console.log(response);
});

// Search contacts from website
client.googleEmailSearch('["https://en.wikipedia.org/wiki/SA"]', { dropduplicates: 'True', language: 'en', region: 'US', enrichment: 'False', fields: '["serial","org_link","domain_status","email_2"]' }).then(response => {
    console.log(response);
});