1.0.2 • Published 6 months ago

livescraper v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

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);
});