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,10 @@ 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 caller-defined tags for tracking this request. Tags are recorded on the
73+ request's usage log and can be used to filter usage on the dashboard usage page.
74+ Up to 20 tags, each 1-50 characters.
75+
7176 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
7277 than this value, it will be aborted with a 408 status code. Maximum allowed
7378 value is 300000ms (5 minutes).
@@ -86,6 +91,7 @@ def extract_product(
8691 {
8792 "url" : url ,
8893 "max_age_ms" : max_age_ms ,
94+ "tags" : tags ,
8995 "timeout_ms" : timeout_ms ,
9096 },
9197 ai_extract_product_params .AIExtractProductParams ,
@@ -103,6 +109,7 @@ def extract_products(
103109 domain : str ,
104110 max_age_ms : int | Omit = omit ,
105111 max_products : int | Omit = omit ,
112+ tags : SequenceNotStr [str ] | Omit = omit ,
106113 timeout_ms : int | Omit = omit ,
107114 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108115 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -126,6 +133,10 @@ def extract_products(
126133
127134 max_products: Maximum number of products to extract.
128135
136+ tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
137+ request's usage log and can be used to filter usage on the dashboard usage page.
138+ Up to 20 tags, each 1-50 characters.
139+
129140 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
130141 than this value, it will be aborted with a 408 status code. Maximum allowed
131142 value is 300000ms (5 minutes).
@@ -147,6 +158,7 @@ def extract_products(
147158 direct_url : str ,
148159 max_age_ms : int | Omit = omit ,
149160 max_products : int | Omit = omit ,
161+ tags : SequenceNotStr [str ] | Omit = omit ,
150162 timeout_ms : int | Omit = omit ,
151163 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
152164 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -171,6 +183,10 @@ def extract_products(
171183
172184 max_products: Maximum number of products to extract.
173185
186+ tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
187+ request's usage log and can be used to filter usage on the dashboard usage page.
188+ Up to 20 tags, each 1-50 characters.
189+
174190 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
175191 than this value, it will be aborted with a 408 status code. Maximum allowed
176192 value is 300000ms (5 minutes).
@@ -192,6 +208,7 @@ def extract_products(
192208 domain : str | Omit = omit ,
193209 max_age_ms : int | Omit = omit ,
194210 max_products : int | Omit = omit ,
211+ tags : SequenceNotStr [str ] | Omit = omit ,
195212 timeout_ms : int | Omit = omit ,
196213 direct_url : str | Omit = omit ,
197214 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -208,6 +225,7 @@ def extract_products(
208225 "domain" : domain ,
209226 "max_age_ms" : max_age_ms ,
210227 "max_products" : max_products ,
228+ "tags" : tags ,
211229 "timeout_ms" : timeout_ms ,
212230 "direct_url" : direct_url ,
213231 },
@@ -245,6 +263,7 @@ async def extract_product(
245263 * ,
246264 url : str ,
247265 max_age_ms : int | Omit = omit ,
266+ tags : SequenceNotStr [str ] | Omit = omit ,
248267 timeout_ms : int | Omit = omit ,
249268 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
250269 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -264,6 +283,10 @@ async def extract_product(
264283 younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
265284 omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
266285
286+ tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
287+ request's usage log and can be used to filter usage on the dashboard usage page.
288+ Up to 20 tags, each 1-50 characters.
289+
267290 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
268291 than this value, it will be aborted with a 408 status code. Maximum allowed
269292 value is 300000ms (5 minutes).
@@ -282,6 +305,7 @@ async def extract_product(
282305 {
283306 "url" : url ,
284307 "max_age_ms" : max_age_ms ,
308+ "tags" : tags ,
285309 "timeout_ms" : timeout_ms ,
286310 },
287311 ai_extract_product_params .AIExtractProductParams ,
@@ -299,6 +323,7 @@ async def extract_products(
299323 domain : str ,
300324 max_age_ms : int | Omit = omit ,
301325 max_products : int | Omit = omit ,
326+ tags : SequenceNotStr [str ] | Omit = omit ,
302327 timeout_ms : int | Omit = omit ,
303328 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304329 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -322,6 +347,10 @@ async def extract_products(
322347
323348 max_products: Maximum number of products to extract.
324349
350+ tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
351+ request's usage log and can be used to filter usage on the dashboard usage page.
352+ Up to 20 tags, each 1-50 characters.
353+
325354 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
326355 than this value, it will be aborted with a 408 status code. Maximum allowed
327356 value is 300000ms (5 minutes).
@@ -343,6 +372,7 @@ async def extract_products(
343372 direct_url : str ,
344373 max_age_ms : int | Omit = omit ,
345374 max_products : int | Omit = omit ,
375+ tags : SequenceNotStr [str ] | Omit = omit ,
346376 timeout_ms : int | Omit = omit ,
347377 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
348378 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -367,6 +397,10 @@ async def extract_products(
367397
368398 max_products: Maximum number of products to extract.
369399
400+ tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
401+ request's usage log and can be used to filter usage on the dashboard usage page.
402+ Up to 20 tags, each 1-50 characters.
403+
370404 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
371405 than this value, it will be aborted with a 408 status code. Maximum allowed
372406 value is 300000ms (5 minutes).
@@ -388,6 +422,7 @@ async def extract_products(
388422 domain : str | Omit = omit ,
389423 max_age_ms : int | Omit = omit ,
390424 max_products : int | Omit = omit ,
425+ tags : SequenceNotStr [str ] | Omit = omit ,
391426 timeout_ms : int | Omit = omit ,
392427 direct_url : str | Omit = omit ,
393428 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -404,6 +439,7 @@ async def extract_products(
404439 "domain" : domain ,
405440 "max_age_ms" : max_age_ms ,
406441 "max_products" : max_products ,
442+ "tags" : tags ,
407443 "timeout_ms" : timeout_ms ,
408444 "direct_url" : direct_url ,
409445 },
0 commit comments