@@ -21,7 +21,7 @@ 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.
@@ -30,17 +30,17 @@ export type TavilySearchParamsBase = {
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
111
* When {@link TavilySearchParams.include_images} 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 ?: false ;
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 ?: true ;
102
124
/**
103
125
* When {@link TavilySearchParams.include_images} 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
/**
@@ -297,9 +319,9 @@ export type TavilyExtractResult = {
297
319
/**
298
320
* The full content extracted from the page.
299
321
*/
300
- raw_content : string ;
322
+ rawContent : 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 [ ] ;
0 commit comments