Skip to content

Commit fba0250

Browse files
committed
Add descriptions for base parameters
1 parent b33548b commit fba0250

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

src/types.d.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,42 @@
11
export type BaseParameters = {
2+
/**
3+
* Parameter defines the device to use to get the results. It can be set to
4+
* `desktop` (default) to use a regular browser, `tablet` to use a tablet browser
5+
* (currently using iPads), or `mobile` to use a mobile browser (currently
6+
* using iPhones).
7+
*/
28
device?: "desktop" | "tablet" | "mobile";
9+
10+
/**
11+
* Parameter will force SerpApi to fetch the Google results even if a cached
12+
* version is already present. A cache is served only if the query and all
13+
* parameters are exactly the same. Cache expires after 1h. Cached searches
14+
* are free, and are not counted towards your searches per month. It can be set
15+
* to `false` (default) to allow results from the cache, or `true` to disallow
16+
* results from the cache. `no_cache` and `async` parameters should not be used together.
17+
*/
318
no_cache?: boolean;
19+
20+
/**
21+
* Parameter defines the way you want to submit your search to SerpApi. It can
22+
* be set to `false` (default) to open an HTTP connection and keep it open until
23+
* you got your search results, or `true` to just submit your search to SerpApi
24+
* and retrieve them later. In this case, you'll need to use our
25+
* [Searches Archive API](https://serpapi.com/search-archive-api) to retrieve
26+
* your results. `async` and `no_cache` parameters should not be used together.
27+
* `async` should not be used on accounts with
28+
* [Ludicrous Speed](https://serpapi.com/plan) enabled.
29+
*/
430
async?: boolean;
31+
32+
/**
33+
* Parameter defines the SerpApi private key to use.
34+
*/
535
api_key?: string | null;
36+
37+
/**
38+
* Specify the client-side timeout of the request. In milliseconds.
39+
*/
640
timeout?: number;
741
};
842
export type BaseResponse<P = Record<string | number | symbol, never>> = {

0 commit comments

Comments
 (0)