@@ -106,6 +106,7 @@ def extract_product(
106106 self ,
107107 * ,
108108 url : str ,
109+ max_age_ms : int | Omit = omit ,
109110 timeout_ms : int | Omit = omit ,
110111 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
111112 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -121,6 +122,10 @@ def extract_product(
121122 Args:
122123 url: The product page URL to extract product data from.
123124
125+ max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
126+ younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
127+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
128+
124129 timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
125130 300000ms (5 minutes).
126131
@@ -137,6 +142,7 @@ def extract_product(
137142 body = maybe_transform (
138143 {
139144 "url" : url ,
145+ "max_age_ms" : max_age_ms ,
140146 "timeout_ms" : timeout_ms ,
141147 },
142148 ai_extract_product_params .AIExtractProductParams ,
@@ -152,6 +158,7 @@ def extract_products(
152158 self ,
153159 * ,
154160 domain : str ,
161+ max_age_ms : int | Omit = omit ,
155162 max_products : int | Omit = omit ,
156163 timeout_ms : int | Omit = omit ,
157164 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -170,6 +177,10 @@ def extract_products(
170177 Args:
171178 domain: The domain name to analyze.
172179
180+ max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
181+ younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
182+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
183+
173184 max_products: Maximum number of products to extract.
174185
175186 timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
@@ -190,6 +201,7 @@ def extract_products(
190201 self ,
191202 * ,
192203 direct_url : str ,
204+ max_age_ms : int | Omit = omit ,
193205 max_products : int | Omit = omit ,
194206 timeout_ms : int | Omit = omit ,
195207 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -209,6 +221,10 @@ def extract_products(
209221 direct_url: A specific URL to use directly as the starting point for extraction without
210222 domain resolution.
211223
224+ max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
225+ younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
226+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
227+
212228 max_products: Maximum number of products to extract.
213229
214230 timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
@@ -229,6 +245,7 @@ def extract_products(
229245 self ,
230246 * ,
231247 domain : str | Omit = omit ,
248+ max_age_ms : int | Omit = omit ,
232249 max_products : int | Omit = omit ,
233250 timeout_ms : int | Omit = omit ,
234251 direct_url : str | Omit = omit ,
@@ -244,6 +261,7 @@ def extract_products(
244261 body = maybe_transform (
245262 {
246263 "domain" : domain ,
264+ "max_age_ms" : max_age_ms ,
247265 "max_products" : max_products ,
248266 "timeout_ms" : timeout_ms ,
249267 "direct_url" : direct_url ,
@@ -337,6 +355,7 @@ async def extract_product(
337355 self ,
338356 * ,
339357 url : str ,
358+ max_age_ms : int | Omit = omit ,
340359 timeout_ms : int | Omit = omit ,
341360 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
342361 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -352,6 +371,10 @@ async def extract_product(
352371 Args:
353372 url: The product page URL to extract product data from.
354373
374+ max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
375+ younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
376+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
377+
355378 timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
356379 300000ms (5 minutes).
357380
@@ -368,6 +391,7 @@ async def extract_product(
368391 body = await async_maybe_transform (
369392 {
370393 "url" : url ,
394+ "max_age_ms" : max_age_ms ,
371395 "timeout_ms" : timeout_ms ,
372396 },
373397 ai_extract_product_params .AIExtractProductParams ,
@@ -383,6 +407,7 @@ async def extract_products(
383407 self ,
384408 * ,
385409 domain : str ,
410+ max_age_ms : int | Omit = omit ,
386411 max_products : int | Omit = omit ,
387412 timeout_ms : int | Omit = omit ,
388413 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -401,6 +426,10 @@ async def extract_products(
401426 Args:
402427 domain: The domain name to analyze.
403428
429+ max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
430+ younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
431+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
432+
404433 max_products: Maximum number of products to extract.
405434
406435 timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
@@ -421,6 +450,7 @@ async def extract_products(
421450 self ,
422451 * ,
423452 direct_url : str ,
453+ max_age_ms : int | Omit = omit ,
424454 max_products : int | Omit = omit ,
425455 timeout_ms : int | Omit = omit ,
426456 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -440,6 +470,10 @@ async def extract_products(
440470 direct_url: A specific URL to use directly as the starting point for extraction without
441471 domain resolution.
442472
473+ max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
474+ younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
475+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
476+
443477 max_products: Maximum number of products to extract.
444478
445479 timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
@@ -460,6 +494,7 @@ async def extract_products(
460494 self ,
461495 * ,
462496 domain : str | Omit = omit ,
497+ max_age_ms : int | Omit = omit ,
463498 max_products : int | Omit = omit ,
464499 timeout_ms : int | Omit = omit ,
465500 direct_url : str | Omit = omit ,
@@ -475,6 +510,7 @@ async def extract_products(
475510 body = await async_maybe_transform (
476511 {
477512 "domain" : domain ,
513+ "max_age_ms" : max_age_ms ,
478514 "max_products" : max_products ,
479515 "timeout_ms" : timeout_ms ,
480516 "direct_url" : direct_url ,
0 commit comments