|
1 | 1 | 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 | + */ |
2 | 8 | 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 | + */ |
3 | 18 | 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 | + */ |
4 | 30 | async?: boolean; |
| 31 | + |
| 32 | + /** |
| 33 | + * Parameter defines the SerpApi private key to use. |
| 34 | + */ |
5 | 35 | api_key?: string | null; |
| 36 | + |
| 37 | + /** |
| 38 | + * Specify the client-side timeout of the request. In milliseconds. |
| 39 | + */ |
6 | 40 | timeout?: number; |
7 | 41 | }; |
8 | 42 | export type BaseResponse<P = Record<string | number | symbol, never>> = { |
|
0 commit comments