@@ -57,6 +57,7 @@ def search(
5757 include_domains : Union [list [str ], None ] = None ,
5858 from_date : Union [date , None ] = None ,
5959 to_date : Union [date , None ] = None ,
60+ include_inline_citations : bool = False ,
6061 ) -> Any :
6162 """
6263 Search for a query in the Linkup API.
@@ -79,6 +80,8 @@ def search(
7980 search results will not be filtered by date.
8081 to_date: The date until which the search results should be considered. If None, the
8182 search results will not be filtered by date.
83+ include_inline_citations: If output_type is "sourcedAnswer", indicates whether the
84+ answer should include inline citations.
8285
8386 Returns:
8487 The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -106,6 +109,7 @@ def search(
106109 include_domains = include_domains ,
107110 from_date = from_date ,
108111 to_date = to_date ,
112+ include_inline_citations = include_inline_citations ,
109113 )
110114
111115 response : httpx .Response = self ._request (
@@ -134,6 +138,7 @@ async def async_search(
134138 include_domains : Union [list [str ], None ] = None ,
135139 from_date : Union [date , None ] = None ,
136140 to_date : Union [date , None ] = None ,
141+ include_inline_citations : bool = False ,
137142 ) -> Any :
138143 """
139144 Asynchronously search for a query in the Linkup API.
@@ -156,6 +161,8 @@ async def async_search(
156161 search results will not be filtered by date.
157162 to_date: The date until which the search results should be considered. If None, the
158163 search results will not be filtered by date.
164+ include_inline_citations: If output_type is "sourcedAnswer", indicates whether the
165+ answer should include inline citations.
159166
160167 Returns:
161168 The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -182,6 +189,7 @@ async def async_search(
182189 include_domains = include_domains ,
183190 from_date = from_date ,
184191 to_date = to_date ,
192+ include_inline_citations = include_inline_citations ,
185193 )
186194
187195 response : httpx .Response = await self ._async_request (
@@ -316,6 +324,7 @@ def _get_search_params(
316324 include_domains : Union [list [str ], None ],
317325 from_date : Union [date , None ],
318326 to_date : Union [date , None ],
327+ include_inline_citations : bool ,
319328 ) -> dict [str , Union [str , bool , list [str ]]]:
320329 structured_output_schema_param : str = ""
321330 if structured_output_schema is not None :
@@ -339,6 +348,7 @@ def _get_search_params(
339348 includeDomains = include_domains or [],
340349 fromDate = from_date .isoformat () if from_date is not None else "" ,
341350 toDate = to_date .isoformat () if to_date is not None else "" ,
351+ includeInlineCitations = include_inline_citations ,
342352 )
343353
344354 def _validate_search_response (
0 commit comments