@@ -57,6 +57,7 @@ def search(
5757 to_date : Optional [date ] = None ,
5858 exclude_domains : Optional [list [str ]] = None ,
5959 include_domains : Optional [list [str ]] = None ,
60+ include_inline_citations : Optional [bool ] = None ,
6061 ) -> Any :
6162 """Perform a web search using the Linkup API `search` endpoint.
6263
@@ -82,6 +83,8 @@ def search(
8283 search results will not be filtered by date.
8384 exclude_domains: If you want to exclude specific domains from your search.
8485 include_domains: If you want the search to only return results from certain domains.
86+ include_inline_citations: If output_type is "sourcedAnswer", indicates whether the
87+ answer should include inline citations.
8588
8689 Returns:
8790 The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -109,6 +112,7 @@ def search(
109112 to_date = to_date ,
110113 exclude_domains = exclude_domains ,
111114 include_domains = include_domains ,
115+ include_inline_citations = include_inline_citations ,
112116 )
113117
114118 response : httpx .Response = self ._request (
@@ -137,6 +141,7 @@ async def async_search(
137141 to_date : Optional [date ] = None ,
138142 exclude_domains : Optional [list [str ]] = None ,
139143 include_domains : Optional [list [str ]] = None ,
144+ include_inline_citations : Optional [bool ] = None ,
140145 ) -> Any :
141146 """Asynchronously perform a web search using the Linkup API `search` endpoint.
142147
@@ -162,6 +167,8 @@ async def async_search(
162167 search results will not be filtered by date.
163168 exclude_domains: If you want to exclude specific domains from your search.
164169 include_domains: If you want the search to only return results from certain domains.
170+ include_inline_citations: If output_type is "sourcedAnswer", indicates whether the
171+ answer should include inline citations.
165172
166173 Returns:
167174 The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -189,6 +196,7 @@ async def async_search(
189196 to_date = to_date ,
190197 exclude_domains = exclude_domains ,
191198 include_domains = include_domains ,
199+ include_inline_citations = include_inline_citations ,
192200 )
193201
194202 response : httpx .Response = await self ._async_request (
@@ -410,6 +418,7 @@ def _get_search_params(
410418 to_date : Optional [date ],
411419 exclude_domains : Optional [list [str ]],
412420 include_domains : Optional [list [str ]],
421+ include_inline_citations : Optional [bool ],
413422 ) -> dict [str , Union [str , bool , list [str ]]]:
414423 params : dict [str , Union [str , bool , list [str ]]] = dict (
415424 q = query ,
@@ -437,6 +446,8 @@ def _get_search_params(
437446 params ["excludeDomains" ] = exclude_domains
438447 if include_domains is not None :
439448 params ["includeDomains" ] = include_domains
449+ if include_inline_citations is not None :
450+ params ["includeInlineCitations" ] = include_inline_citations
440451
441452 return params
442453
0 commit comments