Interface SearchOptionsWithPages<R>

Search options for multiple pages search

interface SearchOptionsWithPages<R extends ResultSelector = ResultSelector> {
    delay?: number;
    pages: number | number[];
    query: string;
    requestConfig?: AxiosRequestConfig<any>;
    resultTypes?: R[];
    strictSelector?: boolean;
}

Type Parameters

Hierarchy (View Summary)

Properties

delay?: number

Delay between each request in milliseconds. helps to avoid rate limiting issues.

Default is 1000 ms (1 second). set to 0 to disable delay.

pages: number | number[]

Total number of pages to search or an array of specific pages to search

google search uses cursor-based pagination.

Specific page numbers are incremented by 10 starting from 0 (page 1)

If total number of pages is provided, cursor will be created according to: start = page * 10

query: string

Search query

requestConfig?: AxiosRequestConfig<any>

Custom request configuration to be sent with the request

resultTypes?: R[]

Control the type of results returned (can have a significant performance impact)

strictSelector?: boolean

when true, will only return resultNodes that do not contain any undefined/empty properties