https://github.com/outscraper/outscraper-node
The library provides convenient access to the Outscraper API from applications written in server-side JavaScript. Allows using Outscraper's services from your code.
https://github.com/outscraper/outscraper-node
google-maps-api google-rating-api google-reviews-api google-scraping google-serp-api scraping scraping-websites serp-api
Last synced: 3 months ago
JSON representation
The library provides convenient access to the Outscraper API from applications written in server-side JavaScript. Allows using Outscraper's services from your code.
- Host: GitHub
- URL: https://github.com/outscraper/outscraper-node
- Owner: outscraper
- License: mit
- Created: 2022-07-22T15:02:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T00:15:29.000Z (3 months ago)
- Last Synced: 2025-04-02T00:27:23.635Z (3 months ago)
- Topics: google-maps-api, google-rating-api, google-reviews-api, google-scraping, google-serp-api, scraping, scraping-websites, serp-api
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Outscraper Node Library
The library provides convenient access to the [Outscraper API](https://app.outscraper.com/api-docs) from applications written in server-side JavaScript. Allows using [Outscraper's services](https://outscraper.com/services/) from your code.

## Installation
Install the package with:
```bash
npm install outscraper --save
# Or
yarn add outscraper
```[Link to the NPM package page](https://www.npmjs.com/package/outscraper)
## Initialization
```js
const Outscraper = require('outscraper');
// Or using ES modules:
import Outscraper from 'outscraper';let client = new Outscraper('SECRET_API_KEY');
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)## Usage
```js
// Search for businesses in specific locations:
client.googleMapsSearch(['restaurants brooklyn usa'], limit=20, 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'], limit=20, language='en', region='us');
console.log(response);
})();// Get data of the specific place by id
client.googleMapsSearch(['rChIJrc9T9fpYwokRdvjYRHT8nI4'], language='en').then(response => {
console.log(response);
});// Get reviews of the specific place by id
client.googleMapsReviews(['rChIJrc9T9fpYwokRdvjYRHT8nI4'], reviewsLimit=20, language='en').then(response => {
console.log(response);
});// Get reviews of the specific place by id using async mode
client.googleMapsReviews(
['rChIJrc9T9fpYwokRdvjYRHT8nI4'],
reviewsLimit=20,
limit=1,
sort='most_relevant',
skip=0,
start=null,
cutoff=null,
cutoffRating=null,
ignoreEmpty=false,
language='en',
region=null,
reviewsQuery=null,
lastPaginationId=null,
asyncRequest=true // Enable async mode
).then(response => {
console.log('Request ID:', response.requestId);
// You can use the requestId to check the status of the request later
client.getRequestArchive(response.requestId).then(status => {
console.log('Request Status:', status);
});
});// Search contacts from website
client.emailsAndContacts(['outscraper.com']).then(response => {
console.log(response);
});
```[More examples](https://github.com/outscraper/outscraper-node/tree/master/examples)
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/outscraper/outscraper-node.