Performs a Google search and returns parsed results from a single page.
This is the main search function for single-page searches. It accepts various parsers to extract different types of results (organic results, news, translations, etc.).
Configuration options for the search
Promise that resolves to an array of parsed search results
import { search, OrganicResult } from 'google-sr';const results = await search({ query: 'nodejs tutorial', // Configure the parsers you want parsers: [OrganicResult], noPartialResults: true}); Copy
import { search, OrganicResult } from 'google-sr';const results = await search({ query: 'nodejs tutorial', // Configure the parsers you want parsers: [OrganicResult], noPartialResults: true});
When searchOptions is not provided or is invalid
Performs a Google search and returns parsed results from a single page.
This is the main search function for single-page searches. It accepts various parsers to extract different types of results (organic results, news, translations, etc.).