77import httpx
88
99from ..types import ai_extract_product_params , ai_extract_products_params
10- from .._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
10+ from .._types import Body , Omit , Query , Headers , NotGiven , SequenceNotStr , omit , not_given
1111from .._utils import required_args , maybe_transform , async_maybe_transform
1212from .._compat import cached_property
1313from .._resource import SyncAPIResource , AsyncAPIResource
@@ -49,6 +49,7 @@ def extract_product(
4949 * ,
5050 url : str ,
5151 max_age_ms : int | Omit = omit ,
52+ tags : SequenceNotStr [str ] | Omit = omit ,
5253 timeout_ms : int | Omit = omit ,
5354 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5455 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -68,6 +69,8 @@ def extract_product(
6869 younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
6970 omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
7071
72+ tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
73+
7174 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
7275 than this value, it will be aborted with a 408 status code. Maximum allowed
7376 value is 300000ms (5 minutes).
@@ -86,6 +89,7 @@ def extract_product(
8689 {
8790 "url" : url ,
8891 "max_age_ms" : max_age_ms ,
92+ "tags" : tags ,
8993 "timeout_ms" : timeout_ms ,
9094 },
9195 ai_extract_product_params .AIExtractProductParams ,
@@ -103,6 +107,7 @@ def extract_products(
103107 domain : str ,
104108 max_age_ms : int | Omit = omit ,
105109 max_products : int | Omit = omit ,
110+ tags : SequenceNotStr [str ] | Omit = omit ,
106111 timeout_ms : int | Omit = omit ,
107112 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108113 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -126,6 +131,8 @@ def extract_products(
126131
127132 max_products: Maximum number of products to extract.
128133
134+ tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
135+
129136 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
130137 than this value, it will be aborted with a 408 status code. Maximum allowed
131138 value is 300000ms (5 minutes).
@@ -147,6 +154,7 @@ def extract_products(
147154 direct_url : str ,
148155 max_age_ms : int | Omit = omit ,
149156 max_products : int | Omit = omit ,
157+ tags : SequenceNotStr [str ] | Omit = omit ,
150158 timeout_ms : int | Omit = omit ,
151159 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
152160 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -171,6 +179,8 @@ def extract_products(
171179
172180 max_products: Maximum number of products to extract.
173181
182+ tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
183+
174184 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
175185 than this value, it will be aborted with a 408 status code. Maximum allowed
176186 value is 300000ms (5 minutes).
@@ -192,6 +202,7 @@ def extract_products(
192202 domain : str | Omit = omit ,
193203 max_age_ms : int | Omit = omit ,
194204 max_products : int | Omit = omit ,
205+ tags : SequenceNotStr [str ] | Omit = omit ,
195206 timeout_ms : int | Omit = omit ,
196207 direct_url : str | Omit = omit ,
197208 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -208,6 +219,7 @@ def extract_products(
208219 "domain" : domain ,
209220 "max_age_ms" : max_age_ms ,
210221 "max_products" : max_products ,
222+ "tags" : tags ,
211223 "timeout_ms" : timeout_ms ,
212224 "direct_url" : direct_url ,
213225 },
@@ -245,6 +257,7 @@ async def extract_product(
245257 * ,
246258 url : str ,
247259 max_age_ms : int | Omit = omit ,
260+ tags : SequenceNotStr [str ] | Omit = omit ,
248261 timeout_ms : int | Omit = omit ,
249262 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
250263 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -264,6 +277,8 @@ async def extract_product(
264277 younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
265278 omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
266279
280+ tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
281+
267282 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
268283 than this value, it will be aborted with a 408 status code. Maximum allowed
269284 value is 300000ms (5 minutes).
@@ -282,6 +297,7 @@ async def extract_product(
282297 {
283298 "url" : url ,
284299 "max_age_ms" : max_age_ms ,
300+ "tags" : tags ,
285301 "timeout_ms" : timeout_ms ,
286302 },
287303 ai_extract_product_params .AIExtractProductParams ,
@@ -299,6 +315,7 @@ async def extract_products(
299315 domain : str ,
300316 max_age_ms : int | Omit = omit ,
301317 max_products : int | Omit = omit ,
318+ tags : SequenceNotStr [str ] | Omit = omit ,
302319 timeout_ms : int | Omit = omit ,
303320 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304321 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -322,6 +339,8 @@ async def extract_products(
322339
323340 max_products: Maximum number of products to extract.
324341
342+ tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
343+
325344 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
326345 than this value, it will be aborted with a 408 status code. Maximum allowed
327346 value is 300000ms (5 minutes).
@@ -343,6 +362,7 @@ async def extract_products(
343362 direct_url : str ,
344363 max_age_ms : int | Omit = omit ,
345364 max_products : int | Omit = omit ,
365+ tags : SequenceNotStr [str ] | Omit = omit ,
346366 timeout_ms : int | Omit = omit ,
347367 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
348368 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -367,6 +387,8 @@ async def extract_products(
367387
368388 max_products: Maximum number of products to extract.
369389
390+ tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
391+
370392 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
371393 than this value, it will be aborted with a 408 status code. Maximum allowed
372394 value is 300000ms (5 minutes).
@@ -388,6 +410,7 @@ async def extract_products(
388410 domain : str | Omit = omit ,
389411 max_age_ms : int | Omit = omit ,
390412 max_products : int | Omit = omit ,
413+ tags : SequenceNotStr [str ] | Omit = omit ,
391414 timeout_ms : int | Omit = omit ,
392415 direct_url : str | Omit = omit ,
393416 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -404,6 +427,7 @@ async def extract_products(
404427 "domain" : domain ,
405428 "max_age_ms" : max_age_ms ,
406429 "max_products" : max_products ,
430+ "tags" : tags ,
407431 "timeout_ms" : timeout_ms ,
408432 "direct_url" : direct_url ,
409433 },
0 commit comments