@@ -90,12 +90,12 @@ def extract(
9090 self ,
9191 * ,
9292 urls : SequenceNotStr [str ],
93+ betas : List [ParallelBetaParam ],
9394 excerpts : beta_extract_params .Excerpts | Omit = omit ,
9495 fetch_policy : Optional [FetchPolicyParam ] | Omit = omit ,
9596 full_content : beta_extract_params .FullContent | Omit = omit ,
9697 objective : Optional [str ] | Omit = omit ,
9798 search_queries : Optional [SequenceNotStr [str ]] | Omit = omit ,
98- betas : List [ParallelBetaParam ] | Omit = omit ,
9999 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
100100 # The extra values given here take precedence over values defined on the client or passed to this method.
101101 extra_headers : Headers | None = None ,
@@ -110,6 +110,8 @@ def extract(
110110 `search-extract-2025-10-10`.
111111
112112 Args:
113+ betas: Optional header to specify the beta version(s) to enable.
114+
113115 excerpts: Include excerpts from each URL relevant to the search objective and queries.
114116 Note that if neither objective nor search_queries is provided, excerpts are
115117 redundant with full content.
@@ -123,8 +125,6 @@ def extract(
123125
124126 search_queries: If provided, focuses extracted content on the specified keyword search queries.
125127
126- betas: Optional header to specify the beta version(s) to enable.
127-
128128 extra_headers: Send extra headers
129129
130130 extra_query: Add additional query parameters to the request
@@ -134,16 +134,10 @@ def extract(
134134 timeout: Override the client-level default timeout for this request, in seconds
135135 """
136136 extra_headers = {
137- ** strip_not_given (
138- {
139- "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ]))
140- if is_given (betas )
141- else not_given
142- }
143- ),
137+ "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ])),
144138 ** (extra_headers or {}),
145139 }
146- extra_headers = {"parallel-beta" : "search-extract-2025-10-10" , ** ( extra_headers or {})}
140+ extra_headers . update ( {"parallel-beta" : "search-extract-2025-10-10" })
147141 return self ._post (
148142 "/v1beta/extract" ,
149143 body = maybe_transform (
@@ -190,7 +184,7 @@ def search(
190184 `search-extract-2025-10-10`.
191185
192186 Args:
193- excerpts: Optional settings for returning relevant excerpts .
187+ excerpts: Optional settings to configure excerpt generation .
194188
195189 fetch_policy: Policy for live fetching web results.
196190
@@ -298,12 +292,12 @@ async def extract(
298292 self ,
299293 * ,
300294 urls : SequenceNotStr [str ],
295+ betas : List [ParallelBetaParam ],
301296 excerpts : beta_extract_params .Excerpts | Omit = omit ,
302297 fetch_policy : Optional [FetchPolicyParam ] | Omit = omit ,
303298 full_content : beta_extract_params .FullContent | Omit = omit ,
304299 objective : Optional [str ] | Omit = omit ,
305300 search_queries : Optional [SequenceNotStr [str ]] | Omit = omit ,
306- betas : List [ParallelBetaParam ] | Omit = omit ,
307301 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
308302 # The extra values given here take precedence over values defined on the client or passed to this method.
309303 extra_headers : Headers | None = None ,
@@ -318,6 +312,8 @@ async def extract(
318312 `search-extract-2025-10-10`.
319313
320314 Args:
315+ betas: Optional header to specify the beta version(s) to enable.
316+
321317 excerpts: Include excerpts from each URL relevant to the search objective and queries.
322318 Note that if neither objective nor search_queries is provided, excerpts are
323319 redundant with full content.
@@ -331,8 +327,6 @@ async def extract(
331327
332328 search_queries: If provided, focuses extracted content on the specified keyword search queries.
333329
334- betas: Optional header to specify the beta version(s) to enable.
335-
336330 extra_headers: Send extra headers
337331
338332 extra_query: Add additional query parameters to the request
@@ -342,16 +336,10 @@ async def extract(
342336 timeout: Override the client-level default timeout for this request, in seconds
343337 """
344338 extra_headers = {
345- ** strip_not_given (
346- {
347- "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ]))
348- if is_given (betas )
349- else not_given
350- }
351- ),
339+ "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ])),
352340 ** (extra_headers or {}),
353341 }
354- extra_headers = {"parallel-beta" : "search-extract-2025-10-10" , ** ( extra_headers or {})}
342+ extra_headers . update ( {"parallel-beta" : "search-extract-2025-10-10" })
355343 return await self ._post (
356344 "/v1beta/extract" ,
357345 body = await async_maybe_transform (
@@ -398,7 +386,7 @@ async def search(
398386 `search-extract-2025-10-10`.
399387
400388 Args:
401- excerpts: Optional settings for returning relevant excerpts .
389+ excerpts: Optional settings to configure excerpt generation .
402390
403391 fetch_policy: Policy for live fetching web results.
404392
0 commit comments