@@ -57,6 +57,7 @@ def search(
57
57
to_date : Optional [date ] = None ,
58
58
exclude_domains : Optional [list [str ]] = None ,
59
59
include_domains : Optional [list [str ]] = None ,
60
+ include_inline_citations : Optional [bool ] = None ,
60
61
) -> Any :
61
62
"""Perform a web search using the Linkup API `search` endpoint.
62
63
@@ -82,6 +83,8 @@ def search(
82
83
search results will not be filtered by date.
83
84
exclude_domains: If you want to exclude specific domains from your search.
84
85
include_domains: If you want the search to only return results from certain domains.
86
+ include_inline_citations: If output_type is "sourcedAnswer", indicate whether the
87
+ answer should include inline citations.
85
88
86
89
Returns:
87
90
The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -109,6 +112,7 @@ def search(
109
112
to_date = to_date ,
110
113
exclude_domains = exclude_domains ,
111
114
include_domains = include_domains ,
115
+ include_inline_citations = include_inline_citations ,
112
116
)
113
117
114
118
response : httpx .Response = self ._request (
@@ -137,6 +141,7 @@ async def async_search(
137
141
to_date : Optional [date ] = None ,
138
142
exclude_domains : Optional [list [str ]] = None ,
139
143
include_domains : Optional [list [str ]] = None ,
144
+ include_inline_citations : Optional [bool ] = None ,
140
145
) -> Any :
141
146
"""Asynchronously perform a web search using the Linkup API `search` endpoint.
142
147
@@ -162,6 +167,8 @@ async def async_search(
162
167
search results will not be filtered by date.
163
168
exclude_domains: If you want to exclude specific domains from your search.
164
169
include_domains: If you want the search to only return results from certain domains.
170
+ include_inline_citations: If output_type is "sourcedAnswer", indicate whether the
171
+ answer should include inline citations.
165
172
166
173
Returns:
167
174
The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -189,6 +196,7 @@ async def async_search(
189
196
to_date = to_date ,
190
197
exclude_domains = exclude_domains ,
191
198
include_domains = include_domains ,
199
+ include_inline_citations = include_inline_citations ,
192
200
)
193
201
194
202
response : httpx .Response = await self ._async_request (
@@ -410,6 +418,7 @@ def _get_search_params(
410
418
to_date : Optional [date ],
411
419
exclude_domains : Optional [list [str ]],
412
420
include_domains : Optional [list [str ]],
421
+ include_inline_citations : Optional [bool ],
413
422
) -> dict [str , Union [str , bool , list [str ]]]:
414
423
params : dict [str , Union [str , bool , list [str ]]] = dict (
415
424
q = query ,
@@ -437,6 +446,8 @@ def _get_search_params(
437
446
params ["excludeDomains" ] = exclude_domains
438
447
if include_domains is not None :
439
448
params ["includeDomains" ] = include_domains
449
+ if include_inline_citations is not None :
450
+ params ["includeInlineCitations" ] = include_inline_citations
440
451
441
452
return params
442
453
0 commit comments