@@ -21,26 +21,26 @@ export type TavilySearchParamsBase = {
21
21
*
22
22
* @default "basic"
23
23
*/
24
- search_depth ?: "basic" | "advanced" ;
24
+ searchDepth ?: "basic" | "advanced" ;
25
25
26
26
/**
27
27
* The number of {@link TavilySearchResult.content} chunks to retrieve from each source.
28
28
* Each chunk's length is maximum 500 characters. Available only when
29
- * {@link TavilySearchParams.search_depth } is advanced.
29
+ * {@link TavilySearchParams.searchDepth } is advanced.
30
30
*
31
31
* @default 3
32
32
*/
33
- chunks_per_source ?: number ;
33
+ chunksPerSource ?: number ;
34
34
/**
35
35
* The maximum number of search results to return.
36
36
*
37
37
* @default 5
38
38
*/
39
- max_results ?: number ;
39
+ maxResults ?: number ;
40
40
/**
41
41
* The time range of the search.
42
42
*/
43
- time_range ?: "day" | "week" | "month" | "year" ;
43
+ timeRange ?: "day" | "week" | "month" | "year" ;
44
44
/**
45
45
* Number of days back from the current date to include. Available only if topic is news.
46
46
*/
@@ -51,7 +51,7 @@ export type TavilySearchParamsBase = {
51
51
*
52
52
* @default false
53
53
*/
54
- include_answer ?: boolean | "basic" | "advanced" ;
54
+ includeAnswer ?: boolean | "basic" | "advanced" ;
55
55
/**
56
56
* Include the cleaned and parsed HTML content of each search result.
57
57
* "markdown" returns search result content in markdown format.
@@ -60,22 +60,44 @@ export type TavilySearchParamsBase = {
60
60
*
61
61
* @default false
62
62
*/
63
- include_raw_content ?: boolean | "markdown" | "text" ;
63
+ includeRawContent ?: boolean | "markdown" | "text" ;
64
64
/**
65
65
* A list of domains to specifically include in the search results.
66
66
*/
67
- include_domains ?: string [ ] ;
67
+ includeDomains ?: string [ ] ;
68
68
/**
69
69
* A list of domains to specifically exclude from the search results.
70
70
*/
71
- exclude_domains ?: string [ ] ;
71
+ excludeDomains ?: string [ ] ;
72
72
73
73
/**
74
74
* Whether to include the favicon URL for each result.
75
75
*
76
76
* @default false
77
77
*/
78
- include_favicon ?: boolean ;
78
+ includeFavicon ?: boolean ;
79
+
80
+ /**
81
+ * The country to search in. MUST be the full country name in lowercase
82
+ * like "united states" or "united kingdom".
83
+ *
84
+ * @default undefined
85
+ */
86
+ country ?: string ;
87
+
88
+ /**
89
+ * The start date of the search.
90
+ *
91
+ * @default undefined
92
+ */
93
+ startDate ?: string ;
94
+
95
+ /**
96
+ * The end date of the search.
97
+ *
98
+ * @default undefined
99
+ */
100
+ endDate ?: string ;
79
101
} & Record < string , unknown > ;
80
102
81
103
export type TavilySearchParamsWithSimpleImages = TavilySearchParamsBase & {
@@ -84,26 +106,26 @@ export type TavilySearchParamsWithSimpleImages = TavilySearchParamsBase & {
84
106
*
85
107
* @default false
86
108
*/
87
- include_images ?: boolean ;
109
+ includeImages ?: boolean ;
88
110
/**
89
- * When {@link TavilySearchParams.include_images } is true, also add a descriptive text for each
111
+ * When {@link TavilySearchParams.includeImages } is true, also add a descriptive text for each
90
112
* image.
91
113
*
92
114
* @default false
93
115
*/
94
- include_image_descriptions ?: false ;
116
+ includeImageDescriptions ?: boolean ;
95
117
} ;
96
118
97
119
export type TavilySearchParamsWithImageDescriptions = TavilySearchParamsBase & {
98
120
/**
99
121
* Also perform an image search and include the results in the response.
100
122
*/
101
- include_images ?: true ;
123
+ includeImages ?: boolean ;
102
124
/**
103
- * When {@link TavilySearchParams.include_images } is true, also add a descriptive text for each
125
+ * When {@link TavilySearchParams.includeImages } is true, also add a descriptive text for each
104
126
* image.
105
127
*/
106
- include_image_descriptions ?: true ;
128
+ includeImageDescriptions ?: true ;
107
129
} ;
108
130
109
131
export type TavilySearchParams =
@@ -126,22 +148,22 @@ export type TavilyExtractParams = {
126
148
*
127
149
* @default false
128
150
*/
129
- include_images ?: boolean ;
151
+ includeImages ?: boolean ;
130
152
/**
131
153
* The depth of the extraction process. `"advanced"` extraction retrieves more data, including
132
154
* tables and embedded content, with higher success but may increase latency. The cost for
133
155
* `"advanced"` extraction requests may be higher than `"basic"` extraction.
134
156
*
135
157
* @default "basic"
136
158
*/
137
- extract_depth ?: "basic" | "advanced" ;
159
+ extractDepth ?: "basic" | "advanced" ;
138
160
139
161
/**
140
162
* Whether to include the favicon URL for each result.
141
163
*
142
164
* @default false
143
165
*/
144
- include_favicon ?: boolean ;
166
+ includeFavicon ?: boolean ;
145
167
146
168
/**
147
169
* The format of the extracted web page content.
@@ -283,7 +305,7 @@ export type TavilyCrawlParams = {
283
305
*
284
306
* @default false
285
307
*/
286
- include_favicon ?: boolean ;
308
+ includeFavicon ?: boolean ;
287
309
} & Record < string , unknown > ;
288
310
289
311
/**
@@ -299,7 +321,7 @@ export type TavilyExtractResult = {
299
321
*/
300
322
raw_content : string ;
301
323
/**
302
- * This is only available if {@link TavilyExtractParams.include_images } is set to `true`. A list
324
+ * This is only available if {@link TavilyExtractParams.includeImages } is set to `true`. A list
303
325
* of image URLs extracted from the page.
304
326
*/
305
327
images : string [ ] ;
@@ -374,7 +396,7 @@ export type TavilyBaseSearchResponse = {
374
396
query : string ;
375
397
/**
376
398
* A short answer to the user's query, generated by an LLM. Included in the response only if
377
- * {@link TavilySearchParams.include_answer } is requested (i.e., set to `true`, `"basic"`, or
399
+ * {@link TavilySearchParams.includeAnswer } is requested (i.e., set to `true`, `"basic"`, or
378
400
* `"advanced"`).
379
401
*/
380
402
answer ?: string ;
@@ -391,12 +413,12 @@ export type TavilyBaseSearchResponse = {
391
413
392
414
/**
393
415
* The shape of the response from the Tavily Search API when
394
- * {@link TavilySearchParams.include_image_descriptions } is true.
416
+ * {@link TavilySearchParams.includeImageDescriptions } is true.
395
417
*/
396
418
export type TavilySearchResponseWithImageDescriptions =
397
419
TavilyBaseSearchResponse & {
398
420
/**
399
- * List of query-related images. If {@link TavilySearchParams.include_image_descriptions } is
421
+ * List of query-related images. If {@link TavilySearchParams.includeImageDescriptions } is
400
422
* `true`, each item will be an object with `url` and `description` properties. Otherwise, each
401
423
* item will be a string containing the URL of the image.
402
424
*/
@@ -414,11 +436,11 @@ export type TavilySearchResponseWithImageDescriptions =
414
436
415
437
/**
416
438
* The shape of the response from the Tavily Search API when
417
- * {@link TavilySearchParams.include_image_descriptions } is `false` or unspecified.
439
+ * {@link TavilySearchParams.includeImageDescriptions } is `false` or unspecified.
418
440
*/
419
441
export type TavilySearchResponseWithSimpleImages = TavilyBaseSearchResponse & {
420
442
/**
421
- * List of query-related images. If {@link TavilySearchParams.include_image_descriptions } is
443
+ * List of query-related images. If {@link TavilySearchParams.includeImageDescriptions } is
422
444
* `true`, each item will be an object with `url` and `description` properties. Otherwise, each
423
445
* item will be a string containing the URL of the image.
424
446
*/
0 commit comments