@browserbasehq/sdk 2.27.0 → 2.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/resources/search.d.ts +195 -9
- package/resources/search.d.ts.map +1 -1
- package/src/resources/search.ts +231 -9
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.28.0](https://github.com/browserbase/sdk-node/compare/v2.27.0...v2.28.0) (2026-11-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** api-types: stop rejecting valid URLs on /v1/fetch ([8bbd54a](https://github.com/browserbase/sdk-node/commit/8bbd54a00630d54a18cdb3cc4d4871aa6f5ba42e))
|
|
9
|
+
* **api:** Publish search filter params in SDK and docs specs ([0b24196](https://github.com/browserbase/sdk-node/commit/0b2419676bf08b48353ae726f4f2f60fb5f6ee02))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** resolve node-fetch to the SDK shim in resource tests ([#236](https://github.com/browserbase/sdk-node/issues/236)) ([666694e](https://github.com/browserbase/sdk-node/commit/666694e507ac6088d79d39ffd513a5ecd74e5e78))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
* Add copy and link for new search api params ([4069e84](https://github.com/browserbase/sdk-node/commit/4069e84f86eee9b62b4be1992d4cf4af9d09b86a))
|
|
20
|
+
|
|
3
21
|
## [2.27.0](https://github.com/browserbase/sdk-node/compare/v2.26.0...v2.27.0) (2026-11-13)
|
|
4
22
|
|
|
5
23
|
|
package/package.json
CHANGED
package/resources/search.d.ts
CHANGED
|
@@ -19,6 +19,15 @@ export interface SearchWebResponse {
|
|
|
19
19
|
* List of search results
|
|
20
20
|
*/
|
|
21
21
|
results: Array<SearchWebResponse.Result>;
|
|
22
|
+
/**
|
|
23
|
+
* The search mode that served the request.
|
|
24
|
+
*/
|
|
25
|
+
mode?: 'fast' | 'advanced' | 'deep-lite' | 'deep';
|
|
26
|
+
/**
|
|
27
|
+
* The search provider that served the request. Can differ from the documented
|
|
28
|
+
* default when the project or the filters select another provider.
|
|
29
|
+
*/
|
|
30
|
+
provider?: 'parallel' | 'exa';
|
|
22
31
|
}
|
|
23
32
|
export declare namespace SearchWebResponse {
|
|
24
33
|
interface Result {
|
|
@@ -38,6 +47,11 @@ export declare namespace SearchWebResponse {
|
|
|
38
47
|
* Author of the content if available
|
|
39
48
|
*/
|
|
40
49
|
author?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Passages from the page most relevant to the query. Only set when the request
|
|
52
|
+
* asks for excerpts.
|
|
53
|
+
*/
|
|
54
|
+
excerpts?: Array<string>;
|
|
41
55
|
/**
|
|
42
56
|
* Favicon URL
|
|
43
57
|
*/
|
|
@@ -52,18 +66,53 @@ export declare namespace SearchWebResponse {
|
|
|
52
66
|
publishedDate?: string;
|
|
53
67
|
}
|
|
54
68
|
}
|
|
55
|
-
export type SearchWebParams = SearchWebParams.
|
|
69
|
+
export type SearchWebParams = SearchWebParams.ProviderParallel | SearchWebParams.ProviderExa | SearchWebParams.DefaultProvider;
|
|
56
70
|
export declare namespace SearchWebParams {
|
|
57
|
-
interface
|
|
71
|
+
interface ProviderParallel {
|
|
58
72
|
/**
|
|
59
73
|
* Search provider to serve this request. Defaults to `parallel`, which uses
|
|
60
|
-
* `advanced` mode unless `mode` is set.
|
|
74
|
+
* `advanced` mode unless `mode` is set. If you omit it and `parallel` can't apply
|
|
75
|
+
* one of your filters, `exa` serves the request at `exa` pricing. The response
|
|
76
|
+
* `provider` field shows which one served it.
|
|
61
77
|
*/
|
|
62
78
|
provider: 'parallel';
|
|
63
79
|
/**
|
|
64
80
|
* The search query string
|
|
65
81
|
*/
|
|
66
82
|
query: string;
|
|
83
|
+
/**
|
|
84
|
+
* Focus the search on a category of content. Only the `exa` provider supports this
|
|
85
|
+
* filter.
|
|
86
|
+
*/
|
|
87
|
+
category?: 'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people';
|
|
88
|
+
/**
|
|
89
|
+
* Only return results published before this date-time (RFC 3339, for example
|
|
90
|
+
* 2026-01-01T00:00:00Z). Only the `exa` provider supports this filter. Not
|
|
91
|
+
* supported with the company or people categories.
|
|
92
|
+
*/
|
|
93
|
+
endPublishedDate?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Return the passages of each page most relevant to the query. Defaults to false.
|
|
96
|
+
*/
|
|
97
|
+
excerpts?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Never return results from these domains. Accepts the same entry formats as
|
|
100
|
+
* includeDomains. Not supported with the people category.
|
|
101
|
+
*/
|
|
102
|
+
excludeDomains?: Array<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Only return results from these domains. Entries can be a hostname (example.com),
|
|
105
|
+
* a hostname with a path prefix (example.com/docs), or a wildcard subdomain
|
|
106
|
+
* (\*.example.com). The `parallel` provider allows one list, not both, with at
|
|
107
|
+
* most 200 domains and no scheme, port, query string, or fragment.
|
|
108
|
+
*/
|
|
109
|
+
includeDomains?: Array<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Refetch a page when the cached copy is older than this many hours. Omit to use
|
|
112
|
+
* the provider default. A provider can return an older cached copy when a live
|
|
113
|
+
* fetch fails.
|
|
114
|
+
*/
|
|
115
|
+
maxAgeHours?: number;
|
|
67
116
|
/**
|
|
68
117
|
* The search mode used by the underlying provider. Defaults to `advanced` for
|
|
69
118
|
* `parallel` and `fast` for `exa`. See the
|
|
@@ -72,20 +121,78 @@ export declare namespace SearchWebParams {
|
|
|
72
121
|
*/
|
|
73
122
|
mode?: 'fast' | 'advanced';
|
|
74
123
|
/**
|
|
75
|
-
*
|
|
124
|
+
* Filter unsafe content from the results. Defaults to `false`. Only the `exa`
|
|
125
|
+
* provider supports `true`.
|
|
126
|
+
*/
|
|
127
|
+
moderation?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Number of results to return
|
|
76
130
|
*/
|
|
77
131
|
numResults?: number;
|
|
132
|
+
/**
|
|
133
|
+
* The task intent and soft preferences for the search, in natural language. Adds
|
|
134
|
+
* context to query without replacing it.
|
|
135
|
+
*/
|
|
136
|
+
objective?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Only return results published after this date-time (RFC 3339, for example
|
|
139
|
+
* 2026-01-01T00:00:00Z). The `parallel` provider rounds it up to a whole UTC day.
|
|
140
|
+
* Not supported with the company or people categories.
|
|
141
|
+
*/
|
|
142
|
+
startPublishedDate?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Two-letter ISO 3166-1 country code of the end user. Localizes ranking without
|
|
145
|
+
* restricting results to sources from that country. The `parallel` provider
|
|
146
|
+
* supports only
|
|
147
|
+
* [some countries](https://docs.browserbase.com/platform/search/overview#appendix-supported-countries).
|
|
148
|
+
*/
|
|
149
|
+
userLocation?: string;
|
|
78
150
|
}
|
|
79
|
-
interface
|
|
151
|
+
interface ProviderExa {
|
|
80
152
|
/**
|
|
81
153
|
* Search provider to serve this request. Defaults to `parallel`, which uses
|
|
82
|
-
* `advanced` mode unless `mode` is set.
|
|
154
|
+
* `advanced` mode unless `mode` is set. If you omit it and `parallel` can't apply
|
|
155
|
+
* one of your filters, `exa` serves the request at `exa` pricing. The response
|
|
156
|
+
* `provider` field shows which one served it.
|
|
83
157
|
*/
|
|
84
158
|
provider: 'exa';
|
|
85
159
|
/**
|
|
86
160
|
* The search query string
|
|
87
161
|
*/
|
|
88
162
|
query: string;
|
|
163
|
+
/**
|
|
164
|
+
* Focus the search on a category of content. Only the `exa` provider supports this
|
|
165
|
+
* filter.
|
|
166
|
+
*/
|
|
167
|
+
category?: 'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people';
|
|
168
|
+
/**
|
|
169
|
+
* Only return results published before this date-time (RFC 3339, for example
|
|
170
|
+
* 2026-01-01T00:00:00Z). Only the `exa` provider supports this filter. Not
|
|
171
|
+
* supported with the company or people categories.
|
|
172
|
+
*/
|
|
173
|
+
endPublishedDate?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Return the passages of each page most relevant to the query. Defaults to false.
|
|
176
|
+
*/
|
|
177
|
+
excerpts?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Never return results from these domains. Accepts the same entry formats as
|
|
180
|
+
* includeDomains. Not supported with the people category.
|
|
181
|
+
*/
|
|
182
|
+
excludeDomains?: Array<string>;
|
|
183
|
+
/**
|
|
184
|
+
* Only return results from these domains. Entries can be a hostname (example.com),
|
|
185
|
+
* a hostname with a path prefix (example.com/docs), or a wildcard subdomain
|
|
186
|
+
* (\*.example.com). The `parallel` provider allows one list, not both, with at
|
|
187
|
+
* most 200 domains and no scheme, port, query string, or fragment.
|
|
188
|
+
*/
|
|
189
|
+
includeDomains?: Array<string>;
|
|
190
|
+
/**
|
|
191
|
+
* Refetch a page when the cached copy is older than this many hours. Omit to use
|
|
192
|
+
* the provider default. A provider can return an older cached copy when a live
|
|
193
|
+
* fetch fails.
|
|
194
|
+
*/
|
|
195
|
+
maxAgeHours?: number;
|
|
89
196
|
/**
|
|
90
197
|
* The search mode used by the underlying provider. Defaults to `advanced` for
|
|
91
198
|
* `parallel` and `fast` for `exa`. See the
|
|
@@ -94,19 +201,98 @@ export declare namespace SearchWebParams {
|
|
|
94
201
|
*/
|
|
95
202
|
mode?: 'fast' | 'deep-lite' | 'deep';
|
|
96
203
|
/**
|
|
97
|
-
*
|
|
204
|
+
* Filter unsafe content from the results. Defaults to `false`. Only the `exa`
|
|
205
|
+
* provider supports `true`.
|
|
206
|
+
*/
|
|
207
|
+
moderation?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Number of results to return
|
|
98
210
|
*/
|
|
99
211
|
numResults?: number;
|
|
212
|
+
/**
|
|
213
|
+
* The task intent and soft preferences for the search, in natural language. Adds
|
|
214
|
+
* context to query without replacing it.
|
|
215
|
+
*/
|
|
216
|
+
objective?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Only return results published after this date-time (RFC 3339, for example
|
|
219
|
+
* 2026-01-01T00:00:00Z). The `parallel` provider rounds it up to a whole UTC day.
|
|
220
|
+
* Not supported with the company or people categories.
|
|
221
|
+
*/
|
|
222
|
+
startPublishedDate?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Two-letter ISO 3166-1 country code of the end user. Localizes ranking without
|
|
225
|
+
* restricting results to sources from that country. The `parallel` provider
|
|
226
|
+
* supports only
|
|
227
|
+
* [some countries](https://docs.browserbase.com/platform/search/overview#appendix-supported-countries).
|
|
228
|
+
*/
|
|
229
|
+
userLocation?: string;
|
|
100
230
|
}
|
|
101
|
-
interface
|
|
231
|
+
interface DefaultProvider {
|
|
102
232
|
/**
|
|
103
233
|
* The search query string
|
|
104
234
|
*/
|
|
105
235
|
query: string;
|
|
106
236
|
/**
|
|
107
|
-
*
|
|
237
|
+
* Focus the search on a category of content. Only the `exa` provider supports this
|
|
238
|
+
* filter.
|
|
239
|
+
*/
|
|
240
|
+
category?: 'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people';
|
|
241
|
+
/**
|
|
242
|
+
* Only return results published before this date-time (RFC 3339, for example
|
|
243
|
+
* 2026-01-01T00:00:00Z). Only the `exa` provider supports this filter. Not
|
|
244
|
+
* supported with the company or people categories.
|
|
245
|
+
*/
|
|
246
|
+
endPublishedDate?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Return the passages of each page most relevant to the query. Defaults to false.
|
|
249
|
+
*/
|
|
250
|
+
excerpts?: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Never return results from these domains. Accepts the same entry formats as
|
|
253
|
+
* includeDomains. Not supported with the people category.
|
|
254
|
+
*/
|
|
255
|
+
excludeDomains?: Array<string>;
|
|
256
|
+
/**
|
|
257
|
+
* Only return results from these domains. Entries can be a hostname (example.com),
|
|
258
|
+
* a hostname with a path prefix (example.com/docs), or a wildcard subdomain
|
|
259
|
+
* (\*.example.com). The `parallel` provider allows one list, not both, with at
|
|
260
|
+
* most 200 domains and no scheme, port, query string, or fragment.
|
|
261
|
+
*/
|
|
262
|
+
includeDomains?: Array<string>;
|
|
263
|
+
/**
|
|
264
|
+
* Refetch a page when the cached copy is older than this many hours. Omit to use
|
|
265
|
+
* the provider default. A provider can return an older cached copy when a live
|
|
266
|
+
* fetch fails.
|
|
267
|
+
*/
|
|
268
|
+
maxAgeHours?: number;
|
|
269
|
+
/**
|
|
270
|
+
* Filter unsafe content from the results. Defaults to `false`. Only the `exa`
|
|
271
|
+
* provider supports `true`.
|
|
272
|
+
*/
|
|
273
|
+
moderation?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Number of results to return
|
|
108
276
|
*/
|
|
109
277
|
numResults?: number;
|
|
278
|
+
/**
|
|
279
|
+
* The task intent and soft preferences for the search, in natural language. Adds
|
|
280
|
+
* context to query without replacing it.
|
|
281
|
+
*/
|
|
282
|
+
objective?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Only return results published after this date-time (RFC 3339, for example
|
|
285
|
+
* 2026-01-01T00:00:00Z). The `parallel` provider rounds it up to a whole UTC day.
|
|
286
|
+
* Not supported with the company or people categories.
|
|
287
|
+
*/
|
|
288
|
+
startPublishedDate?: string;
|
|
289
|
+
/**
|
|
290
|
+
* Two-letter ISO 3166-1 country code of the end user. Localizes ranking without
|
|
291
|
+
* restricting results to sources from that country. The `parallel` provider
|
|
292
|
+
* supports only
|
|
293
|
+
* [some countries](https://docs.browserbase.com/platform/search/overview#appendix-supported-countries).
|
|
294
|
+
*/
|
|
295
|
+
userLocation?: string;
|
|
110
296
|
}
|
|
111
297
|
}
|
|
112
298
|
export declare namespace Search {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/resources/search.ts"],"names":[],"mappings":"AAEA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AAE,OAAO,CAAC;QAEnB;;;WAGG;QACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAE/B;;;;;WAKG;QACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAE/B;;;;WAIG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;WAIG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAE5B;;;;;WAKG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
package/src/resources/search.ts
CHANGED
|
@@ -27,6 +27,17 @@ export interface SearchWebResponse {
|
|
|
27
27
|
* List of search results
|
|
28
28
|
*/
|
|
29
29
|
results: Array<SearchWebResponse.Result>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The search mode that served the request.
|
|
33
|
+
*/
|
|
34
|
+
mode?: 'fast' | 'advanced' | 'deep-lite' | 'deep';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The search provider that served the request. Can differ from the documented
|
|
38
|
+
* default when the project or the filters select another provider.
|
|
39
|
+
*/
|
|
40
|
+
provider?: 'parallel' | 'exa';
|
|
30
41
|
}
|
|
31
42
|
|
|
32
43
|
export namespace SearchWebResponse {
|
|
@@ -51,6 +62,12 @@ export namespace SearchWebResponse {
|
|
|
51
62
|
*/
|
|
52
63
|
author?: string;
|
|
53
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Passages from the page most relevant to the query. Only set when the request
|
|
67
|
+
* asks for excerpts.
|
|
68
|
+
*/
|
|
69
|
+
excerpts?: Array<string>;
|
|
70
|
+
|
|
54
71
|
/**
|
|
55
72
|
* Favicon URL
|
|
56
73
|
*/
|
|
@@ -68,13 +85,18 @@ export namespace SearchWebResponse {
|
|
|
68
85
|
}
|
|
69
86
|
}
|
|
70
87
|
|
|
71
|
-
export type SearchWebParams =
|
|
88
|
+
export type SearchWebParams =
|
|
89
|
+
| SearchWebParams.ProviderParallel
|
|
90
|
+
| SearchWebParams.ProviderExa
|
|
91
|
+
| SearchWebParams.DefaultProvider;
|
|
72
92
|
|
|
73
93
|
export declare namespace SearchWebParams {
|
|
74
|
-
export interface
|
|
94
|
+
export interface ProviderParallel {
|
|
75
95
|
/**
|
|
76
96
|
* Search provider to serve this request. Defaults to `parallel`, which uses
|
|
77
|
-
* `advanced` mode unless `mode` is set.
|
|
97
|
+
* `advanced` mode unless `mode` is set. If you omit it and `parallel` can't apply
|
|
98
|
+
* one of your filters, `exa` serves the request at `exa` pricing. The response
|
|
99
|
+
* `provider` field shows which one served it.
|
|
78
100
|
*/
|
|
79
101
|
provider: 'parallel';
|
|
80
102
|
|
|
@@ -83,6 +105,45 @@ export declare namespace SearchWebParams {
|
|
|
83
105
|
*/
|
|
84
106
|
query: string;
|
|
85
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Focus the search on a category of content. Only the `exa` provider supports this
|
|
110
|
+
* filter.
|
|
111
|
+
*/
|
|
112
|
+
category?: 'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people';
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Only return results published before this date-time (RFC 3339, for example
|
|
116
|
+
* 2026-01-01T00:00:00Z). Only the `exa` provider supports this filter. Not
|
|
117
|
+
* supported with the company or people categories.
|
|
118
|
+
*/
|
|
119
|
+
endPublishedDate?: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Return the passages of each page most relevant to the query. Defaults to false.
|
|
123
|
+
*/
|
|
124
|
+
excerpts?: boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Never return results from these domains. Accepts the same entry formats as
|
|
128
|
+
* includeDomains. Not supported with the people category.
|
|
129
|
+
*/
|
|
130
|
+
excludeDomains?: Array<string>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Only return results from these domains. Entries can be a hostname (example.com),
|
|
134
|
+
* a hostname with a path prefix (example.com/docs), or a wildcard subdomain
|
|
135
|
+
* (\*.example.com). The `parallel` provider allows one list, not both, with at
|
|
136
|
+
* most 200 domains and no scheme, port, query string, or fragment.
|
|
137
|
+
*/
|
|
138
|
+
includeDomains?: Array<string>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Refetch a page when the cached copy is older than this many hours. Omit to use
|
|
142
|
+
* the provider default. A provider can return an older cached copy when a live
|
|
143
|
+
* fetch fails.
|
|
144
|
+
*/
|
|
145
|
+
maxAgeHours?: number;
|
|
146
|
+
|
|
86
147
|
/**
|
|
87
148
|
* The search mode used by the underlying provider. Defaults to `advanced` for
|
|
88
149
|
* `parallel` and `fast` for `exa`. See the
|
|
@@ -92,15 +153,44 @@ export declare namespace SearchWebParams {
|
|
|
92
153
|
mode?: 'fast' | 'advanced';
|
|
93
154
|
|
|
94
155
|
/**
|
|
95
|
-
*
|
|
156
|
+
* Filter unsafe content from the results. Defaults to `false`. Only the `exa`
|
|
157
|
+
* provider supports `true`.
|
|
158
|
+
*/
|
|
159
|
+
moderation?: boolean;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Number of results to return
|
|
96
163
|
*/
|
|
97
164
|
numResults?: number;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The task intent and soft preferences for the search, in natural language. Adds
|
|
168
|
+
* context to query without replacing it.
|
|
169
|
+
*/
|
|
170
|
+
objective?: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Only return results published after this date-time (RFC 3339, for example
|
|
174
|
+
* 2026-01-01T00:00:00Z). The `parallel` provider rounds it up to a whole UTC day.
|
|
175
|
+
* Not supported with the company or people categories.
|
|
176
|
+
*/
|
|
177
|
+
startPublishedDate?: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Two-letter ISO 3166-1 country code of the end user. Localizes ranking without
|
|
181
|
+
* restricting results to sources from that country. The `parallel` provider
|
|
182
|
+
* supports only
|
|
183
|
+
* [some countries](https://docs.browserbase.com/platform/search/overview#appendix-supported-countries).
|
|
184
|
+
*/
|
|
185
|
+
userLocation?: string;
|
|
98
186
|
}
|
|
99
187
|
|
|
100
|
-
export interface
|
|
188
|
+
export interface ProviderExa {
|
|
101
189
|
/**
|
|
102
190
|
* Search provider to serve this request. Defaults to `parallel`, which uses
|
|
103
|
-
* `advanced` mode unless `mode` is set.
|
|
191
|
+
* `advanced` mode unless `mode` is set. If you omit it and `parallel` can't apply
|
|
192
|
+
* one of your filters, `exa` serves the request at `exa` pricing. The response
|
|
193
|
+
* `provider` field shows which one served it.
|
|
104
194
|
*/
|
|
105
195
|
provider: 'exa';
|
|
106
196
|
|
|
@@ -109,6 +199,45 @@ export declare namespace SearchWebParams {
|
|
|
109
199
|
*/
|
|
110
200
|
query: string;
|
|
111
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Focus the search on a category of content. Only the `exa` provider supports this
|
|
204
|
+
* filter.
|
|
205
|
+
*/
|
|
206
|
+
category?: 'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people';
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Only return results published before this date-time (RFC 3339, for example
|
|
210
|
+
* 2026-01-01T00:00:00Z). Only the `exa` provider supports this filter. Not
|
|
211
|
+
* supported with the company or people categories.
|
|
212
|
+
*/
|
|
213
|
+
endPublishedDate?: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Return the passages of each page most relevant to the query. Defaults to false.
|
|
217
|
+
*/
|
|
218
|
+
excerpts?: boolean;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Never return results from these domains. Accepts the same entry formats as
|
|
222
|
+
* includeDomains. Not supported with the people category.
|
|
223
|
+
*/
|
|
224
|
+
excludeDomains?: Array<string>;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Only return results from these domains. Entries can be a hostname (example.com),
|
|
228
|
+
* a hostname with a path prefix (example.com/docs), or a wildcard subdomain
|
|
229
|
+
* (\*.example.com). The `parallel` provider allows one list, not both, with at
|
|
230
|
+
* most 200 domains and no scheme, port, query string, or fragment.
|
|
231
|
+
*/
|
|
232
|
+
includeDomains?: Array<string>;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Refetch a page when the cached copy is older than this many hours. Omit to use
|
|
236
|
+
* the provider default. A provider can return an older cached copy when a live
|
|
237
|
+
* fetch fails.
|
|
238
|
+
*/
|
|
239
|
+
maxAgeHours?: number;
|
|
240
|
+
|
|
112
241
|
/**
|
|
113
242
|
* The search mode used by the underlying provider. Defaults to `advanced` for
|
|
114
243
|
* `parallel` and `fast` for `exa`. See the
|
|
@@ -118,21 +247,114 @@ export declare namespace SearchWebParams {
|
|
|
118
247
|
mode?: 'fast' | 'deep-lite' | 'deep';
|
|
119
248
|
|
|
120
249
|
/**
|
|
121
|
-
*
|
|
250
|
+
* Filter unsafe content from the results. Defaults to `false`. Only the `exa`
|
|
251
|
+
* provider supports `true`.
|
|
252
|
+
*/
|
|
253
|
+
moderation?: boolean;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Number of results to return
|
|
122
257
|
*/
|
|
123
258
|
numResults?: number;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The task intent and soft preferences for the search, in natural language. Adds
|
|
262
|
+
* context to query without replacing it.
|
|
263
|
+
*/
|
|
264
|
+
objective?: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Only return results published after this date-time (RFC 3339, for example
|
|
268
|
+
* 2026-01-01T00:00:00Z). The `parallel` provider rounds it up to a whole UTC day.
|
|
269
|
+
* Not supported with the company or people categories.
|
|
270
|
+
*/
|
|
271
|
+
startPublishedDate?: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Two-letter ISO 3166-1 country code of the end user. Localizes ranking without
|
|
275
|
+
* restricting results to sources from that country. The `parallel` provider
|
|
276
|
+
* supports only
|
|
277
|
+
* [some countries](https://docs.browserbase.com/platform/search/overview#appendix-supported-countries).
|
|
278
|
+
*/
|
|
279
|
+
userLocation?: string;
|
|
124
280
|
}
|
|
125
281
|
|
|
126
|
-
export interface
|
|
282
|
+
export interface DefaultProvider {
|
|
127
283
|
/**
|
|
128
284
|
* The search query string
|
|
129
285
|
*/
|
|
130
286
|
query: string;
|
|
131
287
|
|
|
132
288
|
/**
|
|
133
|
-
*
|
|
289
|
+
* Focus the search on a category of content. Only the `exa` provider supports this
|
|
290
|
+
* filter.
|
|
291
|
+
*/
|
|
292
|
+
category?: 'company' | 'publication' | 'news' | 'personal site' | 'financial report' | 'people';
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Only return results published before this date-time (RFC 3339, for example
|
|
296
|
+
* 2026-01-01T00:00:00Z). Only the `exa` provider supports this filter. Not
|
|
297
|
+
* supported with the company or people categories.
|
|
298
|
+
*/
|
|
299
|
+
endPublishedDate?: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Return the passages of each page most relevant to the query. Defaults to false.
|
|
303
|
+
*/
|
|
304
|
+
excerpts?: boolean;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Never return results from these domains. Accepts the same entry formats as
|
|
308
|
+
* includeDomains. Not supported with the people category.
|
|
309
|
+
*/
|
|
310
|
+
excludeDomains?: Array<string>;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Only return results from these domains. Entries can be a hostname (example.com),
|
|
314
|
+
* a hostname with a path prefix (example.com/docs), or a wildcard subdomain
|
|
315
|
+
* (\*.example.com). The `parallel` provider allows one list, not both, with at
|
|
316
|
+
* most 200 domains and no scheme, port, query string, or fragment.
|
|
317
|
+
*/
|
|
318
|
+
includeDomains?: Array<string>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Refetch a page when the cached copy is older than this many hours. Omit to use
|
|
322
|
+
* the provider default. A provider can return an older cached copy when a live
|
|
323
|
+
* fetch fails.
|
|
324
|
+
*/
|
|
325
|
+
maxAgeHours?: number;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Filter unsafe content from the results. Defaults to `false`. Only the `exa`
|
|
329
|
+
* provider supports `true`.
|
|
330
|
+
*/
|
|
331
|
+
moderation?: boolean;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Number of results to return
|
|
134
335
|
*/
|
|
135
336
|
numResults?: number;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The task intent and soft preferences for the search, in natural language. Adds
|
|
340
|
+
* context to query without replacing it.
|
|
341
|
+
*/
|
|
342
|
+
objective?: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Only return results published after this date-time (RFC 3339, for example
|
|
346
|
+
* 2026-01-01T00:00:00Z). The `parallel` provider rounds it up to a whole UTC day.
|
|
347
|
+
* Not supported with the company or people categories.
|
|
348
|
+
*/
|
|
349
|
+
startPublishedDate?: string;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Two-letter ISO 3166-1 country code of the end user. Localizes ranking without
|
|
353
|
+
* restricting results to sources from that country. The `parallel` provider
|
|
354
|
+
* supports only
|
|
355
|
+
* [some countries](https://docs.browserbase.com/platform/search/overview#appendix-supported-countries).
|
|
356
|
+
*/
|
|
357
|
+
userLocation?: string;
|
|
136
358
|
}
|
|
137
359
|
}
|
|
138
360
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.28.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.28.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.28.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|