@@ -96,7 +96,7 @@ def search(
9696 LinkupInsufficientCreditError: If you have run out of credit.
9797 LinkupNoResultError: If the search query did not yield any result.
9898 """
99- params : dict [str , Union [str , bool , list [str ]]] = self ._get_search_params (
99+ params : dict [str , Union [str , bool , list [str ], None ]] = self ._get_search_params (
100100 query = query ,
101101 depth = depth ,
102102 output_type = output_type ,
@@ -172,7 +172,7 @@ async def async_search(
172172 LinkupAuthenticationError: If the Linkup API key is invalid, or there is no more credit
173173 available.
174174 """
175- params : dict [str , Union [str , bool , list [str ]]] = self ._get_search_params (
175+ params : dict [str , Union [str , bool , list [str ], None ]] = self ._get_search_params (
176176 query = query ,
177177 depth = depth ,
178178 output_type = output_type ,
@@ -316,7 +316,7 @@ def _get_search_params(
316316 include_domains : Union [list [str ], None ],
317317 from_date : Union [date , None ],
318318 to_date : Union [date , None ],
319- ) -> dict [str , Union [str , bool , list [str ]]]:
319+ ) -> dict [str , Union [str , bool , list [str ], None ]]:
320320 structured_output_schema_param : str = ""
321321 if structured_output_schema is not None :
322322 if isinstance (structured_output_schema , str ):
@@ -337,8 +337,8 @@ def _get_search_params(
337337 includeImages = include_images ,
338338 excludeDomains = exclude_domains or [],
339339 includeDomains = include_domains or [],
340- fromDate = from_date .isoformat () if from_date is not None else "" ,
341- toDate = to_date .isoformat () if to_date is not None else "" ,
340+ fromDate = from_date .isoformat () if from_date is not None else None ,
341+ toDate = to_date .isoformat () if to_date is not None else date . today (). isoformat () ,
342342 )
343343
344344 def _validate_search_response (
0 commit comments