3.3.0 • Published 3 days ago

google-sr v3.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 days ago

google-sr 🔍

testing workflow npm downloads GitHub issues NPM npm version Discord CodeFactor

Simple & Fast Package for scraping Google search results without the need for an API key. 🚀

Features ✨

Install 📦

To get started, you can install google-sr using your preferred package manager:

# npm

npm install google-sr

# pnpm 

pnpm add google-sr

# yarn

yarn add google-sr

Usage

You can easily perform a single-page search like this:

import { search, ResultTypes } from 'google-sr';

// using await/async
const searchResults = await search({ 
    query: 'nodejs', 
    safeMode: false, 
    filterResults: [ResultTypes.SearchResult] 
});

// will return a []
console.log(searchResults);
// should log: true
console.log(searchResults[0].type === ResultTypes.SearchResult)
  • Read about the returned types here

  • More detailed examples & usage can be found here

By default only ResultTypes.SearchResult are returned, use the filterResults option to configure it

  • Additional examples can be found in tests and apps directory

Disclaimer

This is not sponsored, supported, or affiliated with Google Inc.

Unlike the conventional recommendation of using the Google API, this module scrapes the Google search result page (which might potentially infringe upon Google's terms of service).

The source code within this repository is intended solely for educational purposes.

The author (typicalninja) & contributors takes no responsibility for any issues that arise from misuse, such as IP blocking by Google. Your discretion in usage is advised.

Related projects 🥂

Tests

Tests are written using mocha and can be run by using the test script.

Weekly tests a executed using a github action to ensure compatibility

Project uses pnpm as its package manager

pnpm run test

Support & Bug Reporting 🛠️🐞

Make sure you are on the latest version before creating bug reports

Support and bug reporting both can be done on github issues

License

This repository and the code inside it is licensed under the Apache-2.0 License. Read LICENSE for more information.

3.3.0

3 days ago

3.2.1

8 months ago

3.2.0

8 months ago

3.1.0

9 months ago

3.0.1

9 months ago

3.0.0

9 months ago

2.0.0

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago