@nimble-way/nimble-js 0.20.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +10 -10
  3. package/client.d.mts +10 -39
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +10 -39
  6. package/client.d.ts.map +1 -1
  7. package/client.js +8 -43
  8. package/client.js.map +1 -1
  9. package/client.mjs +8 -43
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/{task-agent/task-agent.d.mts → agents/agents.d.mts} +51 -213
  13. package/resources/agents/agents.d.mts.map +1 -0
  14. package/resources/{task-agent/task-agent.d.ts → agents/agents.d.ts} +51 -213
  15. package/resources/agents/agents.d.ts.map +1 -0
  16. package/resources/agents/agents.js +67 -0
  17. package/resources/agents/agents.js.map +1 -0
  18. package/resources/agents/agents.mjs +62 -0
  19. package/resources/agents/agents.mjs.map +1 -0
  20. package/resources/agents/index.d.mts +4 -0
  21. package/resources/agents/index.d.mts.map +1 -0
  22. package/resources/agents/index.d.ts +4 -0
  23. package/resources/agents/index.d.ts.map +1 -0
  24. package/resources/{task-agent → agents}/index.js +3 -3
  25. package/resources/agents/index.js.map +1 -0
  26. package/resources/{task-agent → agents}/index.mjs +1 -1
  27. package/resources/agents/index.mjs.map +1 -0
  28. package/resources/{task-agent → agents}/runs.d.mts +192 -43
  29. package/resources/agents/runs.d.mts.map +1 -0
  30. package/resources/{task-agent → agents}/runs.d.ts +192 -43
  31. package/resources/agents/runs.d.ts.map +1 -0
  32. package/resources/agents/runs.js +63 -0
  33. package/resources/agents/runs.js.map +1 -0
  34. package/resources/agents/runs.mjs +59 -0
  35. package/resources/agents/runs.mjs.map +1 -0
  36. package/resources/{task-agent → agents}/templates.d.mts +3 -6
  37. package/resources/agents/templates.d.mts.map +1 -0
  38. package/resources/{task-agent → agents}/templates.d.ts +3 -6
  39. package/resources/agents/templates.d.ts.map +1 -0
  40. package/resources/{task-agent → agents}/templates.js +5 -8
  41. package/resources/agents/templates.js.map +1 -0
  42. package/resources/agents/templates.mjs +19 -0
  43. package/resources/agents/templates.mjs.map +1 -0
  44. package/resources/agents.d.mts +2 -0
  45. package/resources/agents.d.mts.map +1 -0
  46. package/resources/agents.d.ts +2 -0
  47. package/resources/agents.d.ts.map +1 -0
  48. package/resources/{task-agent.js → agents.js} +2 -2
  49. package/resources/agents.js.map +1 -0
  50. package/resources/{task-agent.mjs → agents.mjs} +2 -2
  51. package/resources/agents.mjs.map +1 -0
  52. package/resources/batches.js +3 -3
  53. package/resources/batches.mjs +3 -3
  54. package/resources/crawl.js +4 -4
  55. package/resources/crawl.mjs +4 -4
  56. package/resources/domain-knowledge.js +1 -1
  57. package/resources/domain-knowledge.mjs +1 -1
  58. package/resources/extract/extract.d.mts +1243 -0
  59. package/resources/extract/extract.d.mts.map +1 -0
  60. package/resources/extract/extract.d.ts +1243 -0
  61. package/resources/extract/extract.d.ts.map +1 -0
  62. package/resources/extract/extract.js +52 -0
  63. package/resources/extract/extract.js.map +1 -0
  64. package/resources/extract/extract.mjs +47 -0
  65. package/resources/extract/extract.mjs.map +1 -0
  66. package/resources/extract/index.d.mts +3 -0
  67. package/resources/extract/index.d.mts.map +1 -0
  68. package/resources/extract/index.d.ts +3 -0
  69. package/resources/extract/index.d.ts.map +1 -0
  70. package/resources/extract/index.js +9 -0
  71. package/resources/extract/index.js.map +1 -0
  72. package/resources/extract/index.mjs +4 -0
  73. package/resources/extract/index.mjs.map +1 -0
  74. package/resources/extract/templates/generations.d.mts +364 -0
  75. package/resources/extract/templates/generations.d.mts.map +1 -0
  76. package/resources/extract/templates/generations.d.ts +364 -0
  77. package/resources/extract/templates/generations.d.ts.map +1 -0
  78. package/resources/extract/templates/generations.js +39 -0
  79. package/resources/extract/templates/generations.js.map +1 -0
  80. package/resources/extract/templates/generations.mjs +35 -0
  81. package/resources/extract/templates/generations.mjs.map +1 -0
  82. package/resources/extract/templates/index.d.mts +4 -0
  83. package/resources/extract/templates/index.d.mts.map +1 -0
  84. package/resources/extract/templates/index.d.ts +4 -0
  85. package/resources/extract/templates/index.d.ts.map +1 -0
  86. package/resources/extract/templates/index.js +11 -0
  87. package/resources/extract/templates/index.js.map +1 -0
  88. package/resources/extract/templates/index.mjs +5 -0
  89. package/resources/extract/templates/index.mjs.map +1 -0
  90. package/resources/extract/templates/templates.d.mts +870 -0
  91. package/resources/extract/templates/templates.d.mts.map +1 -0
  92. package/resources/extract/templates/templates.d.ts +870 -0
  93. package/resources/extract/templates/templates.d.ts.map +1 -0
  94. package/resources/extract/templates/templates.js +120 -0
  95. package/resources/extract/templates/templates.js.map +1 -0
  96. package/resources/extract/templates/templates.mjs +115 -0
  97. package/resources/extract/templates/templates.mjs.map +1 -0
  98. package/resources/extract/templates/versions.d.mts +226 -0
  99. package/resources/extract/templates/versions.d.mts.map +1 -0
  100. package/resources/extract/templates/versions.d.ts +226 -0
  101. package/resources/extract/templates/versions.d.ts.map +1 -0
  102. package/resources/extract/templates/versions.js +42 -0
  103. package/resources/extract/templates/versions.js.map +1 -0
  104. package/resources/extract/templates/versions.mjs +38 -0
  105. package/resources/extract/templates/versions.mjs.map +1 -0
  106. package/resources/extract/templates.d.mts +2 -0
  107. package/resources/extract/templates.d.mts.map +1 -0
  108. package/resources/extract/templates.d.ts +2 -0
  109. package/resources/extract/templates.d.ts.map +1 -0
  110. package/resources/extract/templates.js +6 -0
  111. package/resources/extract/templates.js.map +1 -0
  112. package/resources/extract/templates.mjs +3 -0
  113. package/resources/extract/templates.mjs.map +1 -0
  114. package/resources/extract.d.mts +2 -0
  115. package/resources/extract.d.mts.map +1 -0
  116. package/resources/extract.d.ts +2 -0
  117. package/resources/extract.d.ts.map +1 -0
  118. package/resources/extract.js +6 -0
  119. package/resources/extract.js.map +1 -0
  120. package/resources/extract.mjs +3 -0
  121. package/resources/extract.mjs.map +1 -0
  122. package/resources/fast-serp.js +1 -1
  123. package/resources/fast-serp.mjs +1 -1
  124. package/resources/index.d.mts +4 -4
  125. package/resources/index.d.mts.map +1 -1
  126. package/resources/index.d.ts +4 -4
  127. package/resources/index.d.ts.map +1 -1
  128. package/resources/index.js +5 -5
  129. package/resources/index.js.map +1 -1
  130. package/resources/index.mjs +2 -2
  131. package/resources/index.mjs.map +1 -1
  132. package/resources/jobs/index.d.mts +2 -2
  133. package/resources/jobs/index.d.mts.map +1 -1
  134. package/resources/jobs/index.d.ts +2 -2
  135. package/resources/jobs/index.d.ts.map +1 -1
  136. package/resources/jobs/index.js.map +1 -1
  137. package/resources/jobs/index.mjs.map +1 -1
  138. package/resources/jobs/jobs.d.mts +35 -103
  139. package/resources/jobs/jobs.d.mts.map +1 -1
  140. package/resources/jobs/jobs.d.ts +35 -103
  141. package/resources/jobs/jobs.d.ts.map +1 -1
  142. package/resources/jobs/jobs.js +10 -28
  143. package/resources/jobs/jobs.js.map +1 -1
  144. package/resources/jobs/jobs.mjs +11 -29
  145. package/resources/jobs/jobs.mjs.map +1 -1
  146. package/resources/jobs/runs/artifacts.d.mts +4 -12
  147. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  148. package/resources/jobs/runs/artifacts.d.ts +4 -12
  149. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  150. package/resources/jobs/runs/artifacts.js +8 -16
  151. package/resources/jobs/runs/artifacts.js.map +1 -1
  152. package/resources/jobs/runs/artifacts.mjs +8 -16
  153. package/resources/jobs/runs/artifacts.mjs.map +1 -1
  154. package/resources/jobs/runs/index.d.mts +1 -1
  155. package/resources/jobs/runs/index.d.mts.map +1 -1
  156. package/resources/jobs/runs/index.d.ts +1 -1
  157. package/resources/jobs/runs/index.d.ts.map +1 -1
  158. package/resources/jobs/runs/index.js.map +1 -1
  159. package/resources/jobs/runs/index.mjs.map +1 -1
  160. package/resources/jobs/runs/runs.d.mts +60 -28
  161. package/resources/jobs/runs/runs.d.mts.map +1 -1
  162. package/resources/jobs/runs/runs.d.ts +60 -28
  163. package/resources/jobs/runs/runs.d.ts.map +1 -1
  164. package/resources/jobs/runs/runs.js +12 -12
  165. package/resources/jobs/runs/runs.js.map +1 -1
  166. package/resources/jobs/runs/runs.mjs +12 -12
  167. package/resources/jobs/runs/runs.mjs.map +1 -1
  168. package/resources/media.js +2 -2
  169. package/resources/media.mjs +2 -2
  170. package/resources/serp.js +3 -3
  171. package/resources/serp.mjs +3 -3
  172. package/resources/tasks.js +3 -3
  173. package/resources/tasks.mjs +3 -3
  174. package/resources/top-level.d.mts +1 -1202
  175. package/resources/top-level.d.mts.map +1 -1
  176. package/resources/top-level.d.ts +1 -1202
  177. package/resources/top-level.d.ts.map +1 -1
  178. package/src/client.ts +41 -123
  179. package/src/resources/{task-agent/task-agent.ts → agents/agents.ts} +71 -258
  180. package/src/resources/{task-agent → agents}/index.ts +14 -14
  181. package/src/resources/{task-agent → agents}/runs.ts +228 -54
  182. package/src/resources/{task-agent → agents}/templates.ts +5 -8
  183. package/src/resources/{task-agent.ts → agents.ts} +1 -1
  184. package/src/resources/batches.ts +3 -3
  185. package/src/resources/crawl.ts +4 -4
  186. package/src/resources/domain-knowledge.ts +1 -1
  187. package/src/resources/extract/extract.ts +5182 -0
  188. package/src/resources/extract/index.ts +25 -0
  189. package/src/resources/extract/templates/generations.ts +435 -0
  190. package/src/resources/extract/templates/index.ts +29 -0
  191. package/src/resources/extract/templates/templates.ts +1176 -0
  192. package/src/resources/extract/templates/versions.ts +284 -0
  193. package/src/resources/extract/templates.ts +3 -0
  194. package/src/resources/extract.ts +3 -0
  195. package/src/resources/fast-serp.ts +1 -1
  196. package/src/resources/index.ts +16 -36
  197. package/src/resources/jobs/index.ts +1 -1
  198. package/src/resources/jobs/jobs.ts +50 -125
  199. package/src/resources/jobs/runs/artifacts.ts +8 -16
  200. package/src/resources/jobs/runs/index.ts +1 -0
  201. package/src/resources/jobs/runs/runs.ts +75 -31
  202. package/src/resources/media.ts +2 -2
  203. package/src/resources/serp.ts +3 -3
  204. package/src/resources/tasks.ts +3 -3
  205. package/src/resources/top-level.ts +72 -5171
  206. package/src/version.ts +1 -1
  207. package/version.d.mts +1 -1
  208. package/version.d.mts.map +1 -1
  209. package/version.d.ts +1 -1
  210. package/version.d.ts.map +1 -1
  211. package/version.js +1 -1
  212. package/version.js.map +1 -1
  213. package/version.mjs +1 -1
  214. package/version.mjs.map +1 -1
  215. package/resources/agent.d.mts +0 -641
  216. package/resources/agent.d.mts.map +0 -1
  217. package/resources/agent.d.ts +0 -641
  218. package/resources/agent.d.ts.map +0 -1
  219. package/resources/agent.js +0 -84
  220. package/resources/agent.js.map +0 -1
  221. package/resources/agent.mjs +0 -80
  222. package/resources/agent.mjs.map +0 -1
  223. package/resources/task-agent/index.d.mts +0 -4
  224. package/resources/task-agent/index.d.mts.map +0 -1
  225. package/resources/task-agent/index.d.ts +0 -4
  226. package/resources/task-agent/index.d.ts.map +0 -1
  227. package/resources/task-agent/index.js.map +0 -1
  228. package/resources/task-agent/index.mjs.map +0 -1
  229. package/resources/task-agent/runs.d.mts.map +0 -1
  230. package/resources/task-agent/runs.d.ts.map +0 -1
  231. package/resources/task-agent/runs.js +0 -63
  232. package/resources/task-agent/runs.js.map +0 -1
  233. package/resources/task-agent/runs.mjs +0 -59
  234. package/resources/task-agent/runs.mjs.map +0 -1
  235. package/resources/task-agent/task-agent.d.mts.map +0 -1
  236. package/resources/task-agent/task-agent.d.ts.map +0 -1
  237. package/resources/task-agent/task-agent.js +0 -80
  238. package/resources/task-agent/task-agent.js.map +0 -1
  239. package/resources/task-agent/task-agent.mjs +0 -75
  240. package/resources/task-agent/task-agent.mjs.map +0 -1
  241. package/resources/task-agent/templates.d.mts.map +0 -1
  242. package/resources/task-agent/templates.d.ts.map +0 -1
  243. package/resources/task-agent/templates.js.map +0 -1
  244. package/resources/task-agent/templates.mjs +0 -22
  245. package/resources/task-agent/templates.mjs.map +0 -1
  246. package/resources/task-agent.d.mts +0 -2
  247. package/resources/task-agent.d.mts.map +0 -1
  248. package/resources/task-agent.d.ts +0 -2
  249. package/resources/task-agent.d.ts.map +0 -1
  250. package/resources/task-agent.js.map +0 -1
  251. package/resources/task-agent.mjs.map +0 -1
  252. package/src/resources/agent.ts +0 -935
@@ -0,0 +1,1243 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as Shared from "../shared.mjs";
3
+ import * as TemplatesAPI from "./templates/templates.mjs";
4
+ import { TemplateAsyncParams, TemplateAsyncResponse, TemplateBatchParams, TemplateBatchResponse, TemplateGetResponse, TemplateListParams, TemplateListResponse, TemplateRunParams, TemplateRunResponse, TemplateUpdateParams, TemplateUpdateResponse, Templates } from "./templates/templates.mjs";
5
+ import { APIPromise } from "../../core/api-promise.mjs";
6
+ import { RequestOptions } from "../../internal/request-options.mjs";
7
+ export declare class Extract extends APIResource {
8
+ templates: TemplatesAPI.Templates;
9
+ /**
10
+ * Extract Async Endpoint
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const response = await client.extract.async({ url: 'url' });
15
+ * ```
16
+ */
17
+ async(body: ExtractAsyncParams, options?: RequestOptions): APIPromise<ExtractAsyncResponse>;
18
+ /**
19
+ * Extract Batch Endpoint
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const response = await client.extract.batch({
24
+ * inputs: [{}],
25
+ * });
26
+ * ```
27
+ */
28
+ batch(body: ExtractBatchParams, options?: RequestOptions): APIPromise<ExtractBatchResponse>;
29
+ /**
30
+ * Extract
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const response = await client.extract.run({ url: 'url' });
35
+ * ```
36
+ */
37
+ run(body: ExtractRunParams, options?: RequestOptions): APIPromise<ExtractRunResponse>;
38
+ }
39
+ /**
40
+ * Response when an async extract task is created successfully.
41
+ */
42
+ export interface ExtractAsyncResponse {
43
+ /**
44
+ * Status indicating the async task was created successfully.
45
+ */
46
+ status: 'success';
47
+ /**
48
+ * The created async task details.
49
+ */
50
+ task: ExtractAsyncResponse.Task;
51
+ }
52
+ export declare namespace ExtractAsyncResponse {
53
+ /**
54
+ * The created async task details.
55
+ */
56
+ interface Task {
57
+ /**
58
+ * Unique task identifier.
59
+ */
60
+ id: string;
61
+ _query: unknown;
62
+ /**
63
+ * Timestamp when the task was created.
64
+ */
65
+ created_at: string;
66
+ /**
67
+ * Original input data for the task.
68
+ */
69
+ input: unknown;
70
+ /**
71
+ * Current state of the task.
72
+ */
73
+ state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
74
+ /**
75
+ * URL for checking the task status.
76
+ */
77
+ status_url: string;
78
+ /**
79
+ * Account name that owns the task.
80
+ */
81
+ account_name?: string;
82
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
83
+ /**
84
+ * Batch ID if this task is part of a batch.
85
+ */
86
+ batch_id?: string | null;
87
+ /**
88
+ * URL for downloading the task results.
89
+ */
90
+ download_url?: string | null;
91
+ /**
92
+ * Error message if the task failed.
93
+ */
94
+ error?: string | null;
95
+ /**
96
+ * Classification of the error type.
97
+ */
98
+ error_type?: string | null;
99
+ /**
100
+ * Timestamp when the task was last modified.
101
+ */
102
+ modified_at?: string;
103
+ /**
104
+ * Storage location of the output data.
105
+ */
106
+ output_url?: string | null;
107
+ /**
108
+ * Queue name the task was submitted to.
109
+ */
110
+ queue?: string;
111
+ /**
112
+ * HTTP status code from the task execution.
113
+ */
114
+ status_code?: number;
115
+ }
116
+ }
117
+ /**
118
+ * Response when a batch of extract tasks is created successfully.
119
+ */
120
+ export interface ExtractBatchResponse {
121
+ /**
122
+ * Unique identifier for the batch.
123
+ */
124
+ batch_id: string;
125
+ /**
126
+ * Number of tasks in the batch.
127
+ */
128
+ batch_size: number;
129
+ /**
130
+ * List of created tasks.
131
+ */
132
+ tasks: Array<ExtractBatchResponse.Task>;
133
+ }
134
+ export declare namespace ExtractBatchResponse {
135
+ interface Task {
136
+ /**
137
+ * Unique task identifier.
138
+ */
139
+ id: string;
140
+ _query: unknown;
141
+ /**
142
+ * Timestamp when the task was created.
143
+ */
144
+ created_at: string;
145
+ /**
146
+ * Original input data for the task.
147
+ */
148
+ input: unknown;
149
+ /**
150
+ * Current state of the task.
151
+ */
152
+ state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
153
+ /**
154
+ * URL for checking the task status.
155
+ */
156
+ status_url: string;
157
+ /**
158
+ * Account name that owns the task.
159
+ */
160
+ account_name?: string;
161
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
162
+ /**
163
+ * Batch ID if this task is part of a batch.
164
+ */
165
+ batch_id?: string | null;
166
+ /**
167
+ * URL for downloading the task results.
168
+ */
169
+ download_url?: string | null;
170
+ /**
171
+ * Error message if the task failed.
172
+ */
173
+ error?: string | null;
174
+ /**
175
+ * Classification of the error type.
176
+ */
177
+ error_type?: string | null;
178
+ /**
179
+ * Timestamp when the task was last modified.
180
+ */
181
+ modified_at?: string;
182
+ /**
183
+ * Storage location of the output data.
184
+ */
185
+ output_url?: string | null;
186
+ /**
187
+ * Queue name the task was submitted to.
188
+ */
189
+ queue?: string;
190
+ /**
191
+ * HTTP status code from the task execution.
192
+ */
193
+ status_code?: number;
194
+ }
195
+ }
196
+ export interface ExtractRunResponse {
197
+ data: ExtractRunResponse.Data;
198
+ metadata: ExtractRunResponse.Metadata;
199
+ /**
200
+ * The status of the task.
201
+ */
202
+ status: 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked';
203
+ /**
204
+ * Unique identifier for the task.
205
+ */
206
+ task_id: string;
207
+ /**
208
+ * The final URL.
209
+ */
210
+ url: string;
211
+ debug?: ExtractRunResponse.Debug;
212
+ /**
213
+ * Pagination information if applicable.
214
+ */
215
+ pagination?: ExtractRunResponse.NextPageParams | Array<ExtractRunResponse.UnionMember1>;
216
+ /**
217
+ * The HTTP status code of the task.
218
+ */
219
+ status_code?: number;
220
+ /**
221
+ * List of warnings generated during the task.
222
+ */
223
+ warnings?: Array<string>;
224
+ }
225
+ export declare namespace ExtractRunResponse {
226
+ interface Data {
227
+ /**
228
+ * Browser actions execution results. Present only when browser_actions were
229
+ * specified in the request.
230
+ */
231
+ browser_actions?: Data.BrowserActions;
232
+ /**
233
+ * The cookies collected from browser actions during the task.
234
+ */
235
+ cookies?: Array<unknown>;
236
+ /**
237
+ * The evaluation results from browser actions during the task.
238
+ */
239
+ eval?: Array<unknown>;
240
+ /**
241
+ * The http requests from browser actions made during the task.
242
+ */
243
+ fetch?: Array<unknown>;
244
+ /**
245
+ * The headers received during the task.
246
+ */
247
+ headers?: {
248
+ [key: string]: string;
249
+ };
250
+ /**
251
+ * The HTML content of the page.
252
+ */
253
+ html?: string;
254
+ /**
255
+ * List of all unique URLs found on the page.
256
+ */
257
+ links?: Array<string>;
258
+ /**
259
+ * The Markdown version of the HTML content.
260
+ */
261
+ markdown?: string;
262
+ /**
263
+ * The network capture data collected during the task.
264
+ */
265
+ network_capture?: Array<Data.NetworkCapture>;
266
+ /**
267
+ * Individual HTML content of each pagination page, before merging.
268
+ */
269
+ pages_html?: Array<string>;
270
+ /**
271
+ * The parsing results extracted from the HTML & network content.
272
+ */
273
+ parsing?: Data.ParsingSuccessResult | Data.ParsingErrorResult | {
274
+ [key: string]: unknown;
275
+ };
276
+ /**
277
+ * The list of redirects that occurred during the task.
278
+ */
279
+ redirects?: Array<Data.Redirect>;
280
+ /**
281
+ * Screenshots taken during the task, from browser actions, or the screenshot
282
+ * format.
283
+ */
284
+ screenshots?: Array<unknown>;
285
+ }
286
+ namespace Data {
287
+ /**
288
+ * Browser actions execution results. Present only when browser_actions were
289
+ * specified in the request.
290
+ */
291
+ interface BrowserActions {
292
+ results: Array<BrowserActions.Result>;
293
+ success: boolean;
294
+ total_duration: number;
295
+ }
296
+ namespace BrowserActions {
297
+ interface Result {
298
+ duration: number;
299
+ name: 'goto' | 'wait' | 'wait_for_element' | 'wait_for_navigation' | 'click' | 'fill' | 'press' | 'scroll' | 'auto_scroll' | 'screenshot' | 'get_cookies' | 'eval' | 'fetch';
300
+ status: 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped';
301
+ error?: string;
302
+ result?: unknown;
303
+ }
304
+ }
305
+ interface NetworkCapture {
306
+ filter: NetworkCapture.Filter;
307
+ results: Array<NetworkCapture.Result>;
308
+ errorMessage?: string;
309
+ }
310
+ namespace NetworkCapture {
311
+ interface Filter {
312
+ validation: boolean;
313
+ wait_for_requests_count: number;
314
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
315
+ /**
316
+ * Resource type for network capture filtering
317
+ */
318
+ resource_type?: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm' | Array<'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm'>;
319
+ status_code?: number | Array<number>;
320
+ url?: Filter.URL;
321
+ wait_for_requests_count_timeout?: number;
322
+ }
323
+ namespace Filter {
324
+ interface URL {
325
+ type: 'exact' | 'contains';
326
+ value: string;
327
+ }
328
+ }
329
+ interface Result {
330
+ request: Result.Request;
331
+ response: Result.Response;
332
+ }
333
+ namespace Result {
334
+ interface Request {
335
+ headers: {
336
+ [key: string]: string;
337
+ };
338
+ method: string;
339
+ /**
340
+ * Resource type for network capture filtering
341
+ */
342
+ resource_type: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm';
343
+ url: string;
344
+ body?: string;
345
+ }
346
+ interface Response {
347
+ body: string;
348
+ headers: {
349
+ [key: string]: string;
350
+ };
351
+ serialization: 'none' | 'base64';
352
+ status: number;
353
+ status_text: string;
354
+ }
355
+ }
356
+ }
357
+ interface ParsingSuccessResult {
358
+ entities: {
359
+ [key: string]: unknown;
360
+ };
361
+ status: 'success';
362
+ }
363
+ interface ParsingErrorResult {
364
+ error: string;
365
+ status: 'error';
366
+ }
367
+ interface Redirect {
368
+ status_code: number;
369
+ url: string;
370
+ }
371
+ }
372
+ interface Metadata {
373
+ /**
374
+ * The name of the agent used for the query.
375
+ */
376
+ agent?: string;
377
+ /**
378
+ * The driver used for the task.
379
+ */
380
+ driver?: string;
381
+ /**
382
+ * The localization identifier for the query.
383
+ */
384
+ localization_id?: string;
385
+ /**
386
+ * The duration in milliseconds of the query processing.
387
+ */
388
+ query_duration?: number;
389
+ /**
390
+ * The time when the query was received.
391
+ */
392
+ query_time?: string;
393
+ /**
394
+ * Additional response parameters.
395
+ */
396
+ response_parameters?: unknown;
397
+ /**
398
+ * A tag associated with the query.
399
+ */
400
+ tag?: string;
401
+ }
402
+ interface Debug {
403
+ /**
404
+ * Performance metrics collected during the task.
405
+ */
406
+ performance_metrics?: {
407
+ [key: string]: number;
408
+ };
409
+ /**
410
+ * Total bytes used by the proxy during the task.
411
+ */
412
+ proxy_total_bytes_usage?: number;
413
+ /**
414
+ * The transformed output after applying any transformations.
415
+ */
416
+ transformed_output?: unknown;
417
+ /**
418
+ * The userbrowser instance using during the task.
419
+ */
420
+ userbrowser?: unknown;
421
+ }
422
+ interface NextPageParams {
423
+ next_page_params: {
424
+ [key: string]: unknown;
425
+ };
426
+ }
427
+ interface UnionMember1 {
428
+ next_page_params: {
429
+ [key: string]: unknown;
430
+ };
431
+ }
432
+ }
433
+ export interface ExtractAsyncParams {
434
+ /**
435
+ * Target URL to scrape
436
+ */
437
+ url: string;
438
+ /**
439
+ * Custom flow for the optimization engine: maps candidate names to the number of
440
+ * attempts to spend on each candidate before advancing (0 skips it). Key order
441
+ * defines the flow order. Providing it opts the request into 'auto' driver
442
+ * selection.
443
+ */
444
+ auto_driver_configuration?: {
445
+ [key: string]: number;
446
+ };
447
+ /**
448
+ * Request body for POST, PUT, PATCH methods
449
+ */
450
+ body?: unknown;
451
+ /**
452
+ * Browser type to emulate
453
+ */
454
+ browser?: 'chrome' | 'firefox' | ExtractAsyncParams.UnionMember1;
455
+ /**
456
+ * Array of browser automation actions to execute sequentially
457
+ */
458
+ browser_actions?: Array<Shared.AutoScrollAction | Shared.ClickAction | Shared.EvalAction | Shared.FetchAction | Shared.FillAction | Shared.GetCookiesAction | Shared.GotoAction | Shared.PressAction | Shared.ScreenshotAction | Shared.ScrollAction | Shared.WaitAction | Shared.WaitForElementAction | Shared.WaitForNavigationAction>;
459
+ /**
460
+ * URL to call back when async operation completes
461
+ */
462
+ callback_url?: string;
463
+ /**
464
+ * City for geolocation
465
+ */
466
+ city?: string;
467
+ /**
468
+ * Whether to automatically handle cookie consent headers
469
+ */
470
+ consent_header?: boolean;
471
+ /**
472
+ * Browser cookies as array of cookie objects
473
+ */
474
+ cookies?: Array<ExtractAsyncParams.UnionMember0> | string;
475
+ /**
476
+ * Country code for geolocation and proxy selection
477
+ */
478
+ country?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ALL';
479
+ /**
480
+ * Device type for browser emulation
481
+ */
482
+ device?: 'desktop' | 'mobile' | 'tablet';
483
+ /**
484
+ * Browser driver to use
485
+ */
486
+ driver?: 'auto' | 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro' | 'media-vx6' | 'fast-vx6';
487
+ /**
488
+ * Expected HTTP status codes for successful requests
489
+ */
490
+ expected_status_codes?: Array<number>;
491
+ /**
492
+ * List of acceptable response formats in order of preference
493
+ */
494
+ formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
495
+ /**
496
+ * Custom HTTP headers to include in the request
497
+ */
498
+ headers?: {
499
+ [key: string]: string | Array<string> | null;
500
+ };
501
+ /**
502
+ * Whether to use HTTP/2 protocol
503
+ */
504
+ http2?: boolean;
505
+ /**
506
+ * Whether to emulate XMLHttpRequest behavior
507
+ */
508
+ is_xhr?: boolean;
509
+ /**
510
+ * Locale for browser language and region settings
511
+ */
512
+ locale?: 'aa-DJ' | 'aa-ER' | 'aa-ET' | 'af' | 'af-NA' | 'af-ZA' | 'ak' | 'ak-GH' | 'am' | 'am-ET' | 'an-ES' | 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IN' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-QA' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'as' | 'as-IN' | 'asa' | 'asa-TZ' | 'ast-ES' | 'az' | 'az-AZ' | 'az-Cyrl' | 'az-Cyrl-AZ' | 'az-Latn' | 'az-Latn-AZ' | 'be' | 'be-BY' | 'bem' | 'bem-ZM' | 'ber-DZ' | 'ber-MA' | 'bez' | 'bez-TZ' | 'bg' | 'bg-BG' | 'bho-IN' | 'bm' | 'bm-ML' | 'bn' | 'bn-BD' | 'bn-IN' | 'bo' | 'bo-CN' | 'bo-IN' | 'br-FR' | 'brx-IN' | 'bs' | 'bs-BA' | 'byn-ER' | 'ca' | 'ca-AD' | 'ca-ES' | 'ca-FR' | 'ca-IT' | 'cgg' | 'cgg-UG' | 'chr' | 'chr-US' | 'crh-UA' | 'cs' | 'cs-CZ' | 'csb-PL' | 'cv-RU' | 'cy' | 'cy-GB' | 'da' | 'da-DK' | 'dav' | 'dav-KE' | 'de' | 'de-AT' | 'de-BE' | 'de-CH' | 'de-DE' | 'de-LI' | 'de-LU' | 'dv-MV' | 'dz-BT' | 'ebu' | 'ebu-KE' | 'ee' | 'ee-GH' | 'ee-TG' | 'el' | 'el-CY' | 'el-GR' | 'en' | 'en-AG' | 'en-AS' | 'en-AU' | 'en-BE' | 'en-BW' | 'en-BZ' | 'en-CA' | 'en-DK' | 'en-GB' | 'en-GU' | 'en-HK' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-MH' | 'en-MP' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-SG' | 'en-TT' | 'en-UM' | 'en-US' | 'en-VI' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'eo' | 'es' | 'es-419' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GQ' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PR' | 'es-PY' | 'es-SV' | 'es-US' | 'es-UY' | 'es-VE' | 'et' | 'et-EE' | 'eu' | 'eu-ES' | 'fa' | 'fa-AF' | 'fa-IR' | 'ff' | 'ff-SN' | 'fi' | 'fi-FI' | 'fil' | 'fil-PH' | 'fo' | 'fo-FO' | 'fr' | 'fr-BE' | 'fr-BF' | 'fr-BI' | 'fr-BJ' | 'fr-BL' | 'fr-CA' | 'fr-CD' | 'fr-CF' | 'fr-CG' | 'fr-CH' | 'fr-CI' | 'fr-CM' | 'fr-DJ' | 'fr-FR' | 'fr-GA' | 'fr-GN' | 'fr-GP' | 'fr-GQ' | 'fr-KM' | 'fr-LU' | 'fr-MC' | 'fr-MF' | 'fr-MG' | 'fr-ML' | 'fr-MQ' | 'fr-NE' | 'fr-RE' | 'fr-RW' | 'fr-SN' | 'fr-TD' | 'fr-TG' | 'fur-IT' | 'fy-DE' | 'fy-NL' | 'ga' | 'ga-IE' | 'gd-GB' | 'gez-ER' | 'gez-ET' | 'gl' | 'gl-ES' | 'gsw' | 'gsw-CH' | 'gu' | 'gu-IN' | 'guz' | 'guz-KE' | 'gv' | 'gv-GB' | 'ha' | 'ha-Latn' | 'ha-Latn-GH' | 'ha-Latn-NE' | 'ha-Latn-NG' | 'ha-NG' | 'haw' | 'haw-US' | 'he' | 'he-IL' | 'hi' | 'hi-IN' | 'hne-IN' | 'hr' | 'hr-HR' | 'hsb-DE' | 'ht-HT' | 'hu' | 'hu-HU' | 'hy' | 'hy-AM' | 'id' | 'id-ID' | 'ig' | 'ig-NG' | 'ii' | 'ii-CN' | 'ik-CA' | 'is' | 'is-IS' | 'it' | 'it-CH' | 'it-IT' | 'iu-CA' | 'iw-IL' | 'ja' | 'ja-JP' | 'jmc' | 'jmc-TZ' | 'ka' | 'ka-GE' | 'kab' | 'kab-DZ' | 'kam' | 'kam-KE' | 'kde' | 'kde-TZ' | 'kea' | 'kea-CV' | 'khq' | 'khq-ML' | 'ki' | 'ki-KE' | 'kk' | 'kk-Cyrl' | 'kk-Cyrl-KZ' | 'kk-KZ' | 'kl' | 'kl-GL' | 'kln' | 'kln-KE' | 'km' | 'km-KH' | 'kn' | 'kn-IN' | 'ko' | 'ko-KR' | 'kok' | 'kok-IN' | 'ks-IN' | 'ku-TR' | 'kw' | 'kw-GB' | 'ky-KG' | 'lag' | 'lag-TZ' | 'lb-LU' | 'lg' | 'lg-UG' | 'li-BE' | 'li-NL' | 'lij-IT' | 'lo-LA' | 'lt' | 'lt-LT' | 'luo' | 'luo-KE' | 'luy' | 'luy-KE' | 'lv' | 'lv-LV' | 'mag-IN' | 'mai-IN' | 'mas' | 'mas-KE' | 'mas-TZ' | 'mer' | 'mer-KE' | 'mfe' | 'mfe-MU' | 'mg' | 'mg-MG' | 'mhr-RU' | 'mi-NZ' | 'mk' | 'mk-MK' | 'ml' | 'ml-IN' | 'mn-MN' | 'mr' | 'mr-IN' | 'ms' | 'ms-BN' | 'ms-MY' | 'mt' | 'mt-MT' | 'my' | 'my-MM' | 'nan-TW' | 'naq' | 'naq-NA' | 'nb' | 'nb-NO' | 'nd' | 'nd-ZW' | 'nds-DE' | 'nds-NL' | 'ne' | 'ne-IN' | 'ne-NP' | 'nl' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'nn' | 'nn-NO' | 'nr-ZA' | 'nso-ZA' | 'nyn' | 'nyn-UG' | 'oc-FR' | 'om' | 'om-ET' | 'om-KE' | 'or' | 'or-IN' | 'os-RU' | 'pa' | 'pa-Arab' | 'pa-Arab-PK' | 'pa-Guru' | 'pa-Guru-IN' | 'pa-IN' | 'pa-PK' | 'pap-AN' | 'pl' | 'pl-PL' | 'ps' | 'ps-AF' | 'pt' | 'pt-BR' | 'pt-GW' | 'pt-MZ' | 'pt-PT' | 'rm' | 'rm-CH' | 'ro' | 'ro-MD' | 'ro-RO' | 'rof' | 'rof-TZ' | 'ru' | 'ru-MD' | 'ru-RU' | 'ru-UA' | 'rw' | 'rw-RW' | 'rwk' | 'rwk-TZ' | 'sa-IN' | 'saq' | 'saq-KE' | 'sc-IT' | 'sd-IN' | 'se-NO' | 'seh' | 'seh-MZ' | 'ses' | 'ses-ML' | 'sg' | 'sg-CF' | 'shi' | 'shi-Latn' | 'shi-Latn-MA' | 'shi-Tfng' | 'shi-Tfng-MA' | 'shs-CA' | 'si' | 'si-LK' | 'sid-ET' | 'sk' | 'sk-SK' | 'sl' | 'sl-SI' | 'sn' | 'sn-ZW' | 'so' | 'so-DJ' | 'so-ET' | 'so-KE' | 'so-SO' | 'sq' | 'sq-AL' | 'sq-MK' | 'sr' | 'sr-Cyrl' | 'sr-Cyrl-BA' | 'sr-Cyrl-ME' | 'sr-Cyrl-RS' | 'sr-Latn' | 'sr-Latn-BA' | 'sr-Latn-ME' | 'sr-Latn-RS' | 'sr-ME' | 'sr-RS' | 'ss-ZA' | 'st-ZA' | 'sv' | 'sv-FI' | 'sv-SE' | 'sw' | 'sw-KE' | 'sw-TZ' | 'ta' | 'ta-IN' | 'ta-LK' | 'te' | 'te-IN' | 'teo' | 'teo-KE' | 'teo-UG' | 'tg-TJ' | 'th' | 'th-TH' | 'ti' | 'ti-ER' | 'ti-ET' | 'tig-ER' | 'tk-TM' | 'tl-PH' | 'tn-ZA' | 'to' | 'to-TO' | 'tr' | 'tr-CY' | 'tr-TR' | 'ts-ZA' | 'tt-RU' | 'tzm' | 'tzm-Latn' | 'tzm-Latn-MA' | 'ug-CN' | 'uk' | 'uk-UA' | 'unm-US' | 'ur' | 'ur-IN' | 'ur-PK' | 'uz' | 'uz-Arab' | 'uz-Arab-AF' | 'uz-Cyrl' | 'uz-Cyrl-UZ' | 'uz-Latn' | 'uz-Latn-UZ' | 'uz-UZ' | 've-ZA' | 'vi' | 'vi-VN' | 'vun' | 'vun-TZ' | 'wa-BE' | 'wae-CH' | 'wal-ET' | 'wo-SN' | 'xh-ZA' | 'xog' | 'xog-UG' | 'yi-US' | 'yo' | 'yo-NG' | 'yue-HK' | 'zh' | 'zh-CN' | 'zh-HK' | 'zh-Hans' | 'zh-Hans-CN' | 'zh-Hans-HK' | 'zh-Hans-MO' | 'zh-Hans-SG' | 'zh-Hant' | 'zh-Hant-HK' | 'zh-Hant-MO' | 'zh-Hant-TW' | 'zh-SG' | 'zh-TW' | 'zu' | 'zu-ZA' | 'auto';
513
+ /**
514
+ * Selects which markdown conversion strategy to use. "full_page" converts the
515
+ * entire HTML page. "main_content" uses Mozilla Readability to extract the main
516
+ * article content before converting.
517
+ */
518
+ markdown_backend?: 'full_page' | 'main_content';
519
+ /**
520
+ * HTTP method for the request
521
+ */
522
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
523
+ /**
524
+ * Filters for capturing network traffic
525
+ */
526
+ network_capture?: Array<ExtractAsyncParams.NetworkCapture>;
527
+ /**
528
+ * Operating system to emulate
529
+ */
530
+ os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
531
+ /**
532
+ * Whether to parse the response content
533
+ */
534
+ parse?: boolean;
535
+ /**
536
+ * Custom parser configuration as a key-value map
537
+ */
538
+ parser?: {
539
+ [key: string]: unknown;
540
+ } | string;
541
+ /**
542
+ * Referrer policy for the request
543
+ */
544
+ referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
545
+ /**
546
+ * Whether to render JavaScript content using a browser
547
+ */
548
+ render?: boolean | 'auto';
549
+ /**
550
+ * Request timeout in milliseconds
551
+ */
552
+ request_timeout?: number;
553
+ session?: ExtractAsyncParams.Session;
554
+ /**
555
+ * Skills or capabilities required for the request
556
+ */
557
+ skill?: string | Array<string>;
558
+ /**
559
+ * US state for geolocation (only valid when country is US)
560
+ */
561
+ state?: 'AL' | 'AK' | 'AS' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'DC' | 'FL' | 'GA' | 'GU' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'MP' | 'OH' | 'OK' | 'OR' | 'PA' | 'PR' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'VI' | 'WA' | 'WV' | 'WI' | 'WY';
562
+ /**
563
+ * Whether to compress stored data
564
+ */
565
+ storage_compress?: boolean;
566
+ /**
567
+ * Custom name for the stored object
568
+ */
569
+ storage_object_name?: string;
570
+ /**
571
+ * Type of storage to use for results
572
+ */
573
+ storage_type?: string;
574
+ /**
575
+ * URL for storage location
576
+ */
577
+ storage_url?: string;
578
+ /**
579
+ * User-defined tag for request identification
580
+ */
581
+ tag?: string;
582
+ }
583
+ export declare namespace ExtractAsyncParams {
584
+ interface UnionMember1 {
585
+ name: 'chrome' | 'firefox';
586
+ /**
587
+ * Specific browser version to emulate
588
+ */
589
+ version?: string;
590
+ }
591
+ interface UnionMember0 {
592
+ creation?: string | null;
593
+ domain?: string | null;
594
+ expires?: string;
595
+ extensions?: Array<string> | null;
596
+ hostOnly?: boolean | null;
597
+ httpOnly?: boolean | null;
598
+ lastAccessed?: string | null;
599
+ maxAge?: 'Infinity' | '-Infinity' | number | null;
600
+ name?: string;
601
+ path?: string | null;
602
+ pathIsDefault?: boolean | null;
603
+ sameSite?: 'strict' | 'lax' | 'none';
604
+ secure?: boolean;
605
+ value?: string;
606
+ [k: string]: unknown;
607
+ }
608
+ interface NetworkCapture {
609
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
610
+ /**
611
+ * Resource type for network capture filtering
612
+ */
613
+ resource_type?: string | Array<string>;
614
+ status_code?: number | Array<number>;
615
+ url?: NetworkCapture.URL;
616
+ validation?: boolean;
617
+ wait_for_requests_count?: number;
618
+ wait_for_requests_count_timeout?: number;
619
+ }
620
+ namespace NetworkCapture {
621
+ interface URL {
622
+ value: string;
623
+ type?: 'exact' | 'contains';
624
+ }
625
+ }
626
+ interface Session {
627
+ id?: string;
628
+ prefetch_userbrowser?: boolean;
629
+ renew_on_blocked?: boolean;
630
+ retry?: boolean;
631
+ timeout?: number;
632
+ }
633
+ }
634
+ export interface ExtractBatchParams {
635
+ /**
636
+ * Array of extraction requests. Each object can include extraction parameters and
637
+ * async/storage settings.
638
+ */
639
+ inputs: Array<ExtractBatchParams.Input>;
640
+ /**
641
+ * Shared parameters applied to the entire batch. Can include extraction parameters
642
+ * and async/storage settings.
643
+ */
644
+ shared_inputs?: ExtractBatchParams.SharedInputs;
645
+ }
646
+ export declare namespace ExtractBatchParams {
647
+ interface Input {
648
+ /**
649
+ * Custom flow for the optimization engine: maps candidate names to the number of
650
+ * attempts to spend on each candidate before advancing (0 skips it). Key order
651
+ * defines the flow order. Providing it opts the request into 'auto' driver
652
+ * selection.
653
+ */
654
+ auto_driver_configuration?: {
655
+ [key: string]: number;
656
+ };
657
+ /**
658
+ * Request body for POST, PUT, PATCH methods
659
+ */
660
+ body?: unknown;
661
+ /**
662
+ * Browser type to emulate
663
+ */
664
+ browser?: 'chrome' | 'firefox' | Input.UnionMember1;
665
+ /**
666
+ * Array of browser automation actions to execute sequentially
667
+ */
668
+ browser_actions?: Array<Shared.AutoScrollAction | Shared.ClickAction | Shared.EvalAction | Shared.FetchAction | Shared.FillAction | Shared.GetCookiesAction | Shared.GotoAction | Shared.PressAction | Shared.ScreenshotAction | Shared.ScrollAction | Shared.WaitAction | Shared.WaitForElementAction | Shared.WaitForNavigationAction>;
669
+ /**
670
+ * URL to call back when async operation completes
671
+ */
672
+ callback_url?: string;
673
+ /**
674
+ * City for geolocation
675
+ */
676
+ city?: string;
677
+ /**
678
+ * Whether to automatically handle cookie consent headers
679
+ */
680
+ consent_header?: boolean;
681
+ /**
682
+ * Browser cookies as array of cookie objects
683
+ */
684
+ cookies?: Array<Input.UnionMember0> | string;
685
+ /**
686
+ * Country code for geolocation and proxy selection
687
+ */
688
+ country?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ALL';
689
+ /**
690
+ * Device type for browser emulation
691
+ */
692
+ device?: 'desktop' | 'mobile' | 'tablet';
693
+ /**
694
+ * Browser driver to use. Use 'auto' to let the engine select the candidate config
695
+ * per domain.
696
+ */
697
+ driver?: 'auto' | 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro' | 'media-vx6' | 'fast-vx6';
698
+ /**
699
+ * Expected HTTP status codes for successful requests
700
+ */
701
+ expected_status_codes?: Array<number>;
702
+ /**
703
+ * List of acceptable response formats in order of preference
704
+ */
705
+ formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
706
+ /**
707
+ * Custom HTTP headers to include in the request
708
+ */
709
+ headers?: {
710
+ [key: string]: string | Array<string> | null;
711
+ };
712
+ /**
713
+ * Whether to use HTTP/2 protocol
714
+ */
715
+ http2?: boolean;
716
+ /**
717
+ * Whether to emulate XMLHttpRequest behavior
718
+ */
719
+ is_xhr?: boolean;
720
+ /**
721
+ * Locale for browser language and region settings
722
+ */
723
+ locale?: 'aa-DJ' | 'aa-ER' | 'aa-ET' | 'af' | 'af-NA' | 'af-ZA' | 'ak' | 'ak-GH' | 'am' | 'am-ET' | 'an-ES' | 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IN' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-QA' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'as' | 'as-IN' | 'asa' | 'asa-TZ' | 'ast-ES' | 'az' | 'az-AZ' | 'az-Cyrl' | 'az-Cyrl-AZ' | 'az-Latn' | 'az-Latn-AZ' | 'be' | 'be-BY' | 'bem' | 'bem-ZM' | 'ber-DZ' | 'ber-MA' | 'bez' | 'bez-TZ' | 'bg' | 'bg-BG' | 'bho-IN' | 'bm' | 'bm-ML' | 'bn' | 'bn-BD' | 'bn-IN' | 'bo' | 'bo-CN' | 'bo-IN' | 'br-FR' | 'brx-IN' | 'bs' | 'bs-BA' | 'byn-ER' | 'ca' | 'ca-AD' | 'ca-ES' | 'ca-FR' | 'ca-IT' | 'cgg' | 'cgg-UG' | 'chr' | 'chr-US' | 'crh-UA' | 'cs' | 'cs-CZ' | 'csb-PL' | 'cv-RU' | 'cy' | 'cy-GB' | 'da' | 'da-DK' | 'dav' | 'dav-KE' | 'de' | 'de-AT' | 'de-BE' | 'de-CH' | 'de-DE' | 'de-LI' | 'de-LU' | 'dv-MV' | 'dz-BT' | 'ebu' | 'ebu-KE' | 'ee' | 'ee-GH' | 'ee-TG' | 'el' | 'el-CY' | 'el-GR' | 'en' | 'en-AG' | 'en-AS' | 'en-AU' | 'en-BE' | 'en-BW' | 'en-BZ' | 'en-CA' | 'en-DK' | 'en-GB' | 'en-GU' | 'en-HK' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-MH' | 'en-MP' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-SG' | 'en-TT' | 'en-UM' | 'en-US' | 'en-VI' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'eo' | 'es' | 'es-419' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GQ' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PR' | 'es-PY' | 'es-SV' | 'es-US' | 'es-UY' | 'es-VE' | 'et' | 'et-EE' | 'eu' | 'eu-ES' | 'fa' | 'fa-AF' | 'fa-IR' | 'ff' | 'ff-SN' | 'fi' | 'fi-FI' | 'fil' | 'fil-PH' | 'fo' | 'fo-FO' | 'fr' | 'fr-BE' | 'fr-BF' | 'fr-BI' | 'fr-BJ' | 'fr-BL' | 'fr-CA' | 'fr-CD' | 'fr-CF' | 'fr-CG' | 'fr-CH' | 'fr-CI' | 'fr-CM' | 'fr-DJ' | 'fr-FR' | 'fr-GA' | 'fr-GN' | 'fr-GP' | 'fr-GQ' | 'fr-KM' | 'fr-LU' | 'fr-MC' | 'fr-MF' | 'fr-MG' | 'fr-ML' | 'fr-MQ' | 'fr-NE' | 'fr-RE' | 'fr-RW' | 'fr-SN' | 'fr-TD' | 'fr-TG' | 'fur-IT' | 'fy-DE' | 'fy-NL' | 'ga' | 'ga-IE' | 'gd-GB' | 'gez-ER' | 'gez-ET' | 'gl' | 'gl-ES' | 'gsw' | 'gsw-CH' | 'gu' | 'gu-IN' | 'guz' | 'guz-KE' | 'gv' | 'gv-GB' | 'ha' | 'ha-Latn' | 'ha-Latn-GH' | 'ha-Latn-NE' | 'ha-Latn-NG' | 'ha-NG' | 'haw' | 'haw-US' | 'he' | 'he-IL' | 'hi' | 'hi-IN' | 'hne-IN' | 'hr' | 'hr-HR' | 'hsb-DE' | 'ht-HT' | 'hu' | 'hu-HU' | 'hy' | 'hy-AM' | 'id' | 'id-ID' | 'ig' | 'ig-NG' | 'ii' | 'ii-CN' | 'ik-CA' | 'is' | 'is-IS' | 'it' | 'it-CH' | 'it-IT' | 'iu-CA' | 'iw-IL' | 'ja' | 'ja-JP' | 'jmc' | 'jmc-TZ' | 'ka' | 'ka-GE' | 'kab' | 'kab-DZ' | 'kam' | 'kam-KE' | 'kde' | 'kde-TZ' | 'kea' | 'kea-CV' | 'khq' | 'khq-ML' | 'ki' | 'ki-KE' | 'kk' | 'kk-Cyrl' | 'kk-Cyrl-KZ' | 'kk-KZ' | 'kl' | 'kl-GL' | 'kln' | 'kln-KE' | 'km' | 'km-KH' | 'kn' | 'kn-IN' | 'ko' | 'ko-KR' | 'kok' | 'kok-IN' | 'ks-IN' | 'ku-TR' | 'kw' | 'kw-GB' | 'ky-KG' | 'lag' | 'lag-TZ' | 'lb-LU' | 'lg' | 'lg-UG' | 'li-BE' | 'li-NL' | 'lij-IT' | 'lo-LA' | 'lt' | 'lt-LT' | 'luo' | 'luo-KE' | 'luy' | 'luy-KE' | 'lv' | 'lv-LV' | 'mag-IN' | 'mai-IN' | 'mas' | 'mas-KE' | 'mas-TZ' | 'mer' | 'mer-KE' | 'mfe' | 'mfe-MU' | 'mg' | 'mg-MG' | 'mhr-RU' | 'mi-NZ' | 'mk' | 'mk-MK' | 'ml' | 'ml-IN' | 'mn-MN' | 'mr' | 'mr-IN' | 'ms' | 'ms-BN' | 'ms-MY' | 'mt' | 'mt-MT' | 'my' | 'my-MM' | 'nan-TW' | 'naq' | 'naq-NA' | 'nb' | 'nb-NO' | 'nd' | 'nd-ZW' | 'nds-DE' | 'nds-NL' | 'ne' | 'ne-IN' | 'ne-NP' | 'nl' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'nn' | 'nn-NO' | 'nr-ZA' | 'nso-ZA' | 'nyn' | 'nyn-UG' | 'oc-FR' | 'om' | 'om-ET' | 'om-KE' | 'or' | 'or-IN' | 'os-RU' | 'pa' | 'pa-Arab' | 'pa-Arab-PK' | 'pa-Guru' | 'pa-Guru-IN' | 'pa-IN' | 'pa-PK' | 'pap-AN' | 'pl' | 'pl-PL' | 'ps' | 'ps-AF' | 'pt' | 'pt-BR' | 'pt-GW' | 'pt-MZ' | 'pt-PT' | 'rm' | 'rm-CH' | 'ro' | 'ro-MD' | 'ro-RO' | 'rof' | 'rof-TZ' | 'ru' | 'ru-MD' | 'ru-RU' | 'ru-UA' | 'rw' | 'rw-RW' | 'rwk' | 'rwk-TZ' | 'sa-IN' | 'saq' | 'saq-KE' | 'sc-IT' | 'sd-IN' | 'se-NO' | 'seh' | 'seh-MZ' | 'ses' | 'ses-ML' | 'sg' | 'sg-CF' | 'shi' | 'shi-Latn' | 'shi-Latn-MA' | 'shi-Tfng' | 'shi-Tfng-MA' | 'shs-CA' | 'si' | 'si-LK' | 'sid-ET' | 'sk' | 'sk-SK' | 'sl' | 'sl-SI' | 'sn' | 'sn-ZW' | 'so' | 'so-DJ' | 'so-ET' | 'so-KE' | 'so-SO' | 'sq' | 'sq-AL' | 'sq-MK' | 'sr' | 'sr-Cyrl' | 'sr-Cyrl-BA' | 'sr-Cyrl-ME' | 'sr-Cyrl-RS' | 'sr-Latn' | 'sr-Latn-BA' | 'sr-Latn-ME' | 'sr-Latn-RS' | 'sr-ME' | 'sr-RS' | 'ss-ZA' | 'st-ZA' | 'sv' | 'sv-FI' | 'sv-SE' | 'sw' | 'sw-KE' | 'sw-TZ' | 'ta' | 'ta-IN' | 'ta-LK' | 'te' | 'te-IN' | 'teo' | 'teo-KE' | 'teo-UG' | 'tg-TJ' | 'th' | 'th-TH' | 'ti' | 'ti-ER' | 'ti-ET' | 'tig-ER' | 'tk-TM' | 'tl-PH' | 'tn-ZA' | 'to' | 'to-TO' | 'tr' | 'tr-CY' | 'tr-TR' | 'ts-ZA' | 'tt-RU' | 'tzm' | 'tzm-Latn' | 'tzm-Latn-MA' | 'ug-CN' | 'uk' | 'uk-UA' | 'unm-US' | 'ur' | 'ur-IN' | 'ur-PK' | 'uz' | 'uz-Arab' | 'uz-Arab-AF' | 'uz-Cyrl' | 'uz-Cyrl-UZ' | 'uz-Latn' | 'uz-Latn-UZ' | 'uz-UZ' | 've-ZA' | 'vi' | 'vi-VN' | 'vun' | 'vun-TZ' | 'wa-BE' | 'wae-CH' | 'wal-ET' | 'wo-SN' | 'xh-ZA' | 'xog' | 'xog-UG' | 'yi-US' | 'yo' | 'yo-NG' | 'yue-HK' | 'zh' | 'zh-CN' | 'zh-HK' | 'zh-Hans' | 'zh-Hans-CN' | 'zh-Hans-HK' | 'zh-Hans-MO' | 'zh-Hans-SG' | 'zh-Hant' | 'zh-Hant-HK' | 'zh-Hant-MO' | 'zh-Hant-TW' | 'zh-SG' | 'zh-TW' | 'zu' | 'zu-ZA' | 'auto';
724
+ /**
725
+ * Selects which markdown conversion strategy to use. "full_page" converts the
726
+ * entire HTML page. "main_content" uses Mozilla Readability to extract the main
727
+ * article content before converting.
728
+ */
729
+ markdown_backend?: 'full_page' | 'main_content';
730
+ /**
731
+ * HTTP method for the request
732
+ */
733
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
734
+ /**
735
+ * Filters for capturing network traffic
736
+ */
737
+ network_capture?: Array<Input.NetworkCapture>;
738
+ /**
739
+ * Operating system to emulate
740
+ */
741
+ os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
742
+ /**
743
+ * Whether to parse the response content
744
+ */
745
+ parse?: boolean;
746
+ /**
747
+ * Custom parser configuration as a key-value map
748
+ */
749
+ parser?: {
750
+ [key: string]: unknown;
751
+ } | string;
752
+ /**
753
+ * Referrer policy for the request
754
+ */
755
+ referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
756
+ /**
757
+ * Whether to render JavaScript content using a browser. Use 'auto' to let the
758
+ * engine select the candidate config per domain.
759
+ */
760
+ render?: boolean | 'auto';
761
+ /**
762
+ * Request timeout in milliseconds
763
+ */
764
+ request_timeout?: number;
765
+ session?: Input.Session;
766
+ /**
767
+ * Skills or capabilities required for the request
768
+ */
769
+ skill?: string | Array<string>;
770
+ /**
771
+ * US state for geolocation (only valid when country is US)
772
+ */
773
+ state?: 'AL' | 'AK' | 'AS' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'DC' | 'FL' | 'GA' | 'GU' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'MP' | 'OH' | 'OK' | 'OR' | 'PA' | 'PR' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'VI' | 'WA' | 'WV' | 'WI' | 'WY';
774
+ /**
775
+ * Whether to compress stored data
776
+ */
777
+ storage_compress?: boolean;
778
+ /**
779
+ * Custom name for the stored object
780
+ */
781
+ storage_object_name?: string;
782
+ /**
783
+ * Type of storage to use for results
784
+ */
785
+ storage_type?: string;
786
+ /**
787
+ * URL for storage location
788
+ */
789
+ storage_url?: string;
790
+ /**
791
+ * User-defined tag for request identification
792
+ */
793
+ tag?: string;
794
+ /**
795
+ * Target URL to scrape
796
+ */
797
+ url?: string;
798
+ }
799
+ namespace Input {
800
+ interface UnionMember1 {
801
+ name: 'chrome' | 'firefox';
802
+ /**
803
+ * Specific browser version to emulate
804
+ */
805
+ version?: string;
806
+ }
807
+ interface UnionMember0 {
808
+ creation?: string | null;
809
+ domain?: string | null;
810
+ expires?: string;
811
+ extensions?: Array<string> | null;
812
+ hostOnly?: boolean | null;
813
+ httpOnly?: boolean | null;
814
+ lastAccessed?: string | null;
815
+ maxAge?: 'Infinity' | '-Infinity' | number | null;
816
+ name?: string;
817
+ path?: string | null;
818
+ pathIsDefault?: boolean | null;
819
+ sameSite?: 'strict' | 'lax' | 'none';
820
+ secure?: boolean;
821
+ value?: string;
822
+ [k: string]: unknown;
823
+ }
824
+ interface NetworkCapture {
825
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
826
+ /**
827
+ * Resource type for network capture filtering
828
+ */
829
+ resource_type?: string | Array<string>;
830
+ status_code?: number | Array<number>;
831
+ url?: NetworkCapture.URL;
832
+ validation?: boolean;
833
+ wait_for_requests_count?: number;
834
+ wait_for_requests_count_timeout?: number;
835
+ }
836
+ namespace NetworkCapture {
837
+ interface URL {
838
+ value: string;
839
+ type?: 'exact' | 'contains';
840
+ }
841
+ }
842
+ interface Session {
843
+ id?: string;
844
+ prefetch_userbrowser?: boolean;
845
+ renew_on_blocked?: boolean;
846
+ retry?: boolean;
847
+ timeout?: number;
848
+ }
849
+ }
850
+ /**
851
+ * Shared parameters applied to the entire batch. Can include extraction parameters
852
+ * and async/storage settings.
853
+ */
854
+ interface SharedInputs {
855
+ /**
856
+ * Custom flow for the optimization engine: maps candidate names to the number of
857
+ * attempts to spend on each candidate before advancing (0 skips it). Key order
858
+ * defines the flow order. Providing it opts the request into 'auto' driver
859
+ * selection.
860
+ */
861
+ auto_driver_configuration?: {
862
+ [key: string]: number;
863
+ };
864
+ /**
865
+ * Request body for POST, PUT, PATCH methods
866
+ */
867
+ body?: unknown;
868
+ /**
869
+ * Browser type to emulate
870
+ */
871
+ browser?: 'chrome' | 'firefox' | SharedInputs.UnionMember1;
872
+ /**
873
+ * Array of browser automation actions to execute sequentially
874
+ */
875
+ browser_actions?: Array<Shared.AutoScrollAction | Shared.ClickAction | Shared.EvalAction | Shared.FetchAction | Shared.FillAction | Shared.GetCookiesAction | Shared.GotoAction | Shared.PressAction | Shared.ScreenshotAction | Shared.ScrollAction | Shared.WaitAction | Shared.WaitForElementAction | Shared.WaitForNavigationAction>;
876
+ /**
877
+ * URL to call back when async operation completes
878
+ */
879
+ callback_url?: string;
880
+ /**
881
+ * City for geolocation
882
+ */
883
+ city?: string;
884
+ /**
885
+ * Whether to automatically handle cookie consent headers
886
+ */
887
+ consent_header?: boolean;
888
+ /**
889
+ * Browser cookies as array of cookie objects
890
+ */
891
+ cookies?: Array<SharedInputs.UnionMember0> | string;
892
+ /**
893
+ * Country code for geolocation and proxy selection
894
+ */
895
+ country?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ALL';
896
+ /**
897
+ * Device type for browser emulation
898
+ */
899
+ device?: 'desktop' | 'mobile' | 'tablet';
900
+ /**
901
+ * Browser driver to use. Use 'auto' to let the engine select the candidate config
902
+ * per domain.
903
+ */
904
+ driver?: 'auto' | 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro' | 'media-vx6' | 'fast-vx6';
905
+ /**
906
+ * Expected HTTP status codes for successful requests
907
+ */
908
+ expected_status_codes?: Array<number>;
909
+ /**
910
+ * List of acceptable response formats in order of preference
911
+ */
912
+ formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
913
+ /**
914
+ * Custom HTTP headers to include in the request
915
+ */
916
+ headers?: {
917
+ [key: string]: string | Array<string> | null;
918
+ };
919
+ /**
920
+ * Whether to use HTTP/2 protocol
921
+ */
922
+ http2?: boolean;
923
+ /**
924
+ * Whether to emulate XMLHttpRequest behavior
925
+ */
926
+ is_xhr?: boolean;
927
+ /**
928
+ * Locale for browser language and region settings
929
+ */
930
+ locale?: 'aa-DJ' | 'aa-ER' | 'aa-ET' | 'af' | 'af-NA' | 'af-ZA' | 'ak' | 'ak-GH' | 'am' | 'am-ET' | 'an-ES' | 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IN' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-QA' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'as' | 'as-IN' | 'asa' | 'asa-TZ' | 'ast-ES' | 'az' | 'az-AZ' | 'az-Cyrl' | 'az-Cyrl-AZ' | 'az-Latn' | 'az-Latn-AZ' | 'be' | 'be-BY' | 'bem' | 'bem-ZM' | 'ber-DZ' | 'ber-MA' | 'bez' | 'bez-TZ' | 'bg' | 'bg-BG' | 'bho-IN' | 'bm' | 'bm-ML' | 'bn' | 'bn-BD' | 'bn-IN' | 'bo' | 'bo-CN' | 'bo-IN' | 'br-FR' | 'brx-IN' | 'bs' | 'bs-BA' | 'byn-ER' | 'ca' | 'ca-AD' | 'ca-ES' | 'ca-FR' | 'ca-IT' | 'cgg' | 'cgg-UG' | 'chr' | 'chr-US' | 'crh-UA' | 'cs' | 'cs-CZ' | 'csb-PL' | 'cv-RU' | 'cy' | 'cy-GB' | 'da' | 'da-DK' | 'dav' | 'dav-KE' | 'de' | 'de-AT' | 'de-BE' | 'de-CH' | 'de-DE' | 'de-LI' | 'de-LU' | 'dv-MV' | 'dz-BT' | 'ebu' | 'ebu-KE' | 'ee' | 'ee-GH' | 'ee-TG' | 'el' | 'el-CY' | 'el-GR' | 'en' | 'en-AG' | 'en-AS' | 'en-AU' | 'en-BE' | 'en-BW' | 'en-BZ' | 'en-CA' | 'en-DK' | 'en-GB' | 'en-GU' | 'en-HK' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-MH' | 'en-MP' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-SG' | 'en-TT' | 'en-UM' | 'en-US' | 'en-VI' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'eo' | 'es' | 'es-419' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GQ' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PR' | 'es-PY' | 'es-SV' | 'es-US' | 'es-UY' | 'es-VE' | 'et' | 'et-EE' | 'eu' | 'eu-ES' | 'fa' | 'fa-AF' | 'fa-IR' | 'ff' | 'ff-SN' | 'fi' | 'fi-FI' | 'fil' | 'fil-PH' | 'fo' | 'fo-FO' | 'fr' | 'fr-BE' | 'fr-BF' | 'fr-BI' | 'fr-BJ' | 'fr-BL' | 'fr-CA' | 'fr-CD' | 'fr-CF' | 'fr-CG' | 'fr-CH' | 'fr-CI' | 'fr-CM' | 'fr-DJ' | 'fr-FR' | 'fr-GA' | 'fr-GN' | 'fr-GP' | 'fr-GQ' | 'fr-KM' | 'fr-LU' | 'fr-MC' | 'fr-MF' | 'fr-MG' | 'fr-ML' | 'fr-MQ' | 'fr-NE' | 'fr-RE' | 'fr-RW' | 'fr-SN' | 'fr-TD' | 'fr-TG' | 'fur-IT' | 'fy-DE' | 'fy-NL' | 'ga' | 'ga-IE' | 'gd-GB' | 'gez-ER' | 'gez-ET' | 'gl' | 'gl-ES' | 'gsw' | 'gsw-CH' | 'gu' | 'gu-IN' | 'guz' | 'guz-KE' | 'gv' | 'gv-GB' | 'ha' | 'ha-Latn' | 'ha-Latn-GH' | 'ha-Latn-NE' | 'ha-Latn-NG' | 'ha-NG' | 'haw' | 'haw-US' | 'he' | 'he-IL' | 'hi' | 'hi-IN' | 'hne-IN' | 'hr' | 'hr-HR' | 'hsb-DE' | 'ht-HT' | 'hu' | 'hu-HU' | 'hy' | 'hy-AM' | 'id' | 'id-ID' | 'ig' | 'ig-NG' | 'ii' | 'ii-CN' | 'ik-CA' | 'is' | 'is-IS' | 'it' | 'it-CH' | 'it-IT' | 'iu-CA' | 'iw-IL' | 'ja' | 'ja-JP' | 'jmc' | 'jmc-TZ' | 'ka' | 'ka-GE' | 'kab' | 'kab-DZ' | 'kam' | 'kam-KE' | 'kde' | 'kde-TZ' | 'kea' | 'kea-CV' | 'khq' | 'khq-ML' | 'ki' | 'ki-KE' | 'kk' | 'kk-Cyrl' | 'kk-Cyrl-KZ' | 'kk-KZ' | 'kl' | 'kl-GL' | 'kln' | 'kln-KE' | 'km' | 'km-KH' | 'kn' | 'kn-IN' | 'ko' | 'ko-KR' | 'kok' | 'kok-IN' | 'ks-IN' | 'ku-TR' | 'kw' | 'kw-GB' | 'ky-KG' | 'lag' | 'lag-TZ' | 'lb-LU' | 'lg' | 'lg-UG' | 'li-BE' | 'li-NL' | 'lij-IT' | 'lo-LA' | 'lt' | 'lt-LT' | 'luo' | 'luo-KE' | 'luy' | 'luy-KE' | 'lv' | 'lv-LV' | 'mag-IN' | 'mai-IN' | 'mas' | 'mas-KE' | 'mas-TZ' | 'mer' | 'mer-KE' | 'mfe' | 'mfe-MU' | 'mg' | 'mg-MG' | 'mhr-RU' | 'mi-NZ' | 'mk' | 'mk-MK' | 'ml' | 'ml-IN' | 'mn-MN' | 'mr' | 'mr-IN' | 'ms' | 'ms-BN' | 'ms-MY' | 'mt' | 'mt-MT' | 'my' | 'my-MM' | 'nan-TW' | 'naq' | 'naq-NA' | 'nb' | 'nb-NO' | 'nd' | 'nd-ZW' | 'nds-DE' | 'nds-NL' | 'ne' | 'ne-IN' | 'ne-NP' | 'nl' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'nn' | 'nn-NO' | 'nr-ZA' | 'nso-ZA' | 'nyn' | 'nyn-UG' | 'oc-FR' | 'om' | 'om-ET' | 'om-KE' | 'or' | 'or-IN' | 'os-RU' | 'pa' | 'pa-Arab' | 'pa-Arab-PK' | 'pa-Guru' | 'pa-Guru-IN' | 'pa-IN' | 'pa-PK' | 'pap-AN' | 'pl' | 'pl-PL' | 'ps' | 'ps-AF' | 'pt' | 'pt-BR' | 'pt-GW' | 'pt-MZ' | 'pt-PT' | 'rm' | 'rm-CH' | 'ro' | 'ro-MD' | 'ro-RO' | 'rof' | 'rof-TZ' | 'ru' | 'ru-MD' | 'ru-RU' | 'ru-UA' | 'rw' | 'rw-RW' | 'rwk' | 'rwk-TZ' | 'sa-IN' | 'saq' | 'saq-KE' | 'sc-IT' | 'sd-IN' | 'se-NO' | 'seh' | 'seh-MZ' | 'ses' | 'ses-ML' | 'sg' | 'sg-CF' | 'shi' | 'shi-Latn' | 'shi-Latn-MA' | 'shi-Tfng' | 'shi-Tfng-MA' | 'shs-CA' | 'si' | 'si-LK' | 'sid-ET' | 'sk' | 'sk-SK' | 'sl' | 'sl-SI' | 'sn' | 'sn-ZW' | 'so' | 'so-DJ' | 'so-ET' | 'so-KE' | 'so-SO' | 'sq' | 'sq-AL' | 'sq-MK' | 'sr' | 'sr-Cyrl' | 'sr-Cyrl-BA' | 'sr-Cyrl-ME' | 'sr-Cyrl-RS' | 'sr-Latn' | 'sr-Latn-BA' | 'sr-Latn-ME' | 'sr-Latn-RS' | 'sr-ME' | 'sr-RS' | 'ss-ZA' | 'st-ZA' | 'sv' | 'sv-FI' | 'sv-SE' | 'sw' | 'sw-KE' | 'sw-TZ' | 'ta' | 'ta-IN' | 'ta-LK' | 'te' | 'te-IN' | 'teo' | 'teo-KE' | 'teo-UG' | 'tg-TJ' | 'th' | 'th-TH' | 'ti' | 'ti-ER' | 'ti-ET' | 'tig-ER' | 'tk-TM' | 'tl-PH' | 'tn-ZA' | 'to' | 'to-TO' | 'tr' | 'tr-CY' | 'tr-TR' | 'ts-ZA' | 'tt-RU' | 'tzm' | 'tzm-Latn' | 'tzm-Latn-MA' | 'ug-CN' | 'uk' | 'uk-UA' | 'unm-US' | 'ur' | 'ur-IN' | 'ur-PK' | 'uz' | 'uz-Arab' | 'uz-Arab-AF' | 'uz-Cyrl' | 'uz-Cyrl-UZ' | 'uz-Latn' | 'uz-Latn-UZ' | 'uz-UZ' | 've-ZA' | 'vi' | 'vi-VN' | 'vun' | 'vun-TZ' | 'wa-BE' | 'wae-CH' | 'wal-ET' | 'wo-SN' | 'xh-ZA' | 'xog' | 'xog-UG' | 'yi-US' | 'yo' | 'yo-NG' | 'yue-HK' | 'zh' | 'zh-CN' | 'zh-HK' | 'zh-Hans' | 'zh-Hans-CN' | 'zh-Hans-HK' | 'zh-Hans-MO' | 'zh-Hans-SG' | 'zh-Hant' | 'zh-Hant-HK' | 'zh-Hant-MO' | 'zh-Hant-TW' | 'zh-SG' | 'zh-TW' | 'zu' | 'zu-ZA' | 'auto';
931
+ /**
932
+ * Selects which markdown conversion strategy to use. "full_page" converts the
933
+ * entire HTML page. "main_content" uses Mozilla Readability to extract the main
934
+ * article content before converting.
935
+ */
936
+ markdown_backend?: 'full_page' | 'main_content';
937
+ /**
938
+ * HTTP method for the request
939
+ */
940
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
941
+ /**
942
+ * Filters for capturing network traffic
943
+ */
944
+ network_capture?: Array<SharedInputs.NetworkCapture>;
945
+ /**
946
+ * Operating system to emulate
947
+ */
948
+ os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
949
+ /**
950
+ * Whether to parse the response content
951
+ */
952
+ parse?: boolean;
953
+ /**
954
+ * Custom parser configuration as a key-value map
955
+ */
956
+ parser?: {
957
+ [key: string]: unknown;
958
+ } | string;
959
+ /**
960
+ * Referrer policy for the request
961
+ */
962
+ referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
963
+ /**
964
+ * Whether to render JavaScript content using a browser. Use 'auto' to let the
965
+ * engine select the candidate config per domain.
966
+ */
967
+ render?: boolean | 'auto';
968
+ /**
969
+ * Request timeout in milliseconds
970
+ */
971
+ request_timeout?: number;
972
+ session?: SharedInputs.Session;
973
+ /**
974
+ * Skills or capabilities required for the request
975
+ */
976
+ skill?: string | Array<string>;
977
+ /**
978
+ * US state for geolocation (only valid when country is US)
979
+ */
980
+ state?: 'AL' | 'AK' | 'AS' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'DC' | 'FL' | 'GA' | 'GU' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'MP' | 'OH' | 'OK' | 'OR' | 'PA' | 'PR' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'VI' | 'WA' | 'WV' | 'WI' | 'WY';
981
+ /**
982
+ * Whether to compress stored data
983
+ */
984
+ storage_compress?: boolean;
985
+ /**
986
+ * Custom name for the stored object
987
+ */
988
+ storage_object_name?: string;
989
+ /**
990
+ * Type of storage to use for results
991
+ */
992
+ storage_type?: string;
993
+ /**
994
+ * URL for storage location
995
+ */
996
+ storage_url?: string;
997
+ /**
998
+ * User-defined tag for request identification
999
+ */
1000
+ tag?: string;
1001
+ /**
1002
+ * Target URL to scrape
1003
+ */
1004
+ url?: string;
1005
+ }
1006
+ namespace SharedInputs {
1007
+ interface UnionMember1 {
1008
+ name: 'chrome' | 'firefox';
1009
+ /**
1010
+ * Specific browser version to emulate
1011
+ */
1012
+ version?: string;
1013
+ }
1014
+ interface UnionMember0 {
1015
+ creation?: string | null;
1016
+ domain?: string | null;
1017
+ expires?: string;
1018
+ extensions?: Array<string> | null;
1019
+ hostOnly?: boolean | null;
1020
+ httpOnly?: boolean | null;
1021
+ lastAccessed?: string | null;
1022
+ maxAge?: 'Infinity' | '-Infinity' | number | null;
1023
+ name?: string;
1024
+ path?: string | null;
1025
+ pathIsDefault?: boolean | null;
1026
+ sameSite?: 'strict' | 'lax' | 'none';
1027
+ secure?: boolean;
1028
+ value?: string;
1029
+ [k: string]: unknown;
1030
+ }
1031
+ interface NetworkCapture {
1032
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
1033
+ /**
1034
+ * Resource type for network capture filtering
1035
+ */
1036
+ resource_type?: string | Array<string>;
1037
+ status_code?: number | Array<number>;
1038
+ url?: NetworkCapture.URL;
1039
+ validation?: boolean;
1040
+ wait_for_requests_count?: number;
1041
+ wait_for_requests_count_timeout?: number;
1042
+ }
1043
+ namespace NetworkCapture {
1044
+ interface URL {
1045
+ value: string;
1046
+ type?: 'exact' | 'contains';
1047
+ }
1048
+ }
1049
+ interface Session {
1050
+ id?: string;
1051
+ prefetch_userbrowser?: boolean;
1052
+ renew_on_blocked?: boolean;
1053
+ retry?: boolean;
1054
+ timeout?: number;
1055
+ }
1056
+ }
1057
+ }
1058
+ export interface ExtractRunParams {
1059
+ /**
1060
+ * Target URL to scrape
1061
+ */
1062
+ url: string;
1063
+ /**
1064
+ * Custom flow for the optimization engine: maps candidate names to the number of
1065
+ * attempts to spend on each candidate before advancing (0 skips it). Key order
1066
+ * defines the flow order. Providing it opts the request into 'auto' driver
1067
+ * selection.
1068
+ */
1069
+ auto_driver_configuration?: {
1070
+ [key: string]: number;
1071
+ };
1072
+ /**
1073
+ * Request body for POST, PUT, PATCH methods
1074
+ */
1075
+ body?: unknown;
1076
+ /**
1077
+ * Browser type to emulate
1078
+ */
1079
+ browser?: 'chrome' | 'firefox' | ExtractRunParams.UnionMember1;
1080
+ /**
1081
+ * Array of browser automation actions to execute sequentially
1082
+ */
1083
+ browser_actions?: Array<Shared.AutoScrollAction | Shared.ClickAction | Shared.EvalAction | Shared.FetchAction | Shared.FillAction | Shared.GetCookiesAction | Shared.GotoAction | Shared.PressAction | Shared.ScreenshotAction | Shared.ScrollAction | Shared.WaitAction | Shared.WaitForElementAction | Shared.WaitForNavigationAction>;
1084
+ /**
1085
+ * City for geolocation
1086
+ */
1087
+ city?: string;
1088
+ /**
1089
+ * Whether to automatically handle cookie consent headers
1090
+ */
1091
+ consent_header?: boolean;
1092
+ /**
1093
+ * Browser cookies as array of cookie objects
1094
+ */
1095
+ cookies?: Array<ExtractRunParams.UnionMember0> | string;
1096
+ /**
1097
+ * Country code for geolocation and proxy selection
1098
+ */
1099
+ country?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ALL';
1100
+ /**
1101
+ * Device type for browser emulation
1102
+ */
1103
+ device?: 'desktop' | 'mobile' | 'tablet';
1104
+ /**
1105
+ * Browser driver to use
1106
+ */
1107
+ driver?: 'auto' | 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro' | 'media-vx6' | 'fast-vx6';
1108
+ /**
1109
+ * Expected HTTP status codes for successful requests
1110
+ */
1111
+ expected_status_codes?: Array<number>;
1112
+ /**
1113
+ * List of acceptable response formats in order of preference
1114
+ */
1115
+ formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
1116
+ /**
1117
+ * Custom HTTP headers to include in the request
1118
+ */
1119
+ headers?: {
1120
+ [key: string]: string | Array<string> | null;
1121
+ };
1122
+ /**
1123
+ * Whether to use HTTP/2 protocol
1124
+ */
1125
+ http2?: boolean;
1126
+ /**
1127
+ * Whether to emulate XMLHttpRequest behavior
1128
+ */
1129
+ is_xhr?: boolean;
1130
+ /**
1131
+ * Locale for browser language and region settings
1132
+ */
1133
+ locale?: 'aa-DJ' | 'aa-ER' | 'aa-ET' | 'af' | 'af-NA' | 'af-ZA' | 'ak' | 'ak-GH' | 'am' | 'am-ET' | 'an-ES' | 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IN' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-QA' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'as' | 'as-IN' | 'asa' | 'asa-TZ' | 'ast-ES' | 'az' | 'az-AZ' | 'az-Cyrl' | 'az-Cyrl-AZ' | 'az-Latn' | 'az-Latn-AZ' | 'be' | 'be-BY' | 'bem' | 'bem-ZM' | 'ber-DZ' | 'ber-MA' | 'bez' | 'bez-TZ' | 'bg' | 'bg-BG' | 'bho-IN' | 'bm' | 'bm-ML' | 'bn' | 'bn-BD' | 'bn-IN' | 'bo' | 'bo-CN' | 'bo-IN' | 'br-FR' | 'brx-IN' | 'bs' | 'bs-BA' | 'byn-ER' | 'ca' | 'ca-AD' | 'ca-ES' | 'ca-FR' | 'ca-IT' | 'cgg' | 'cgg-UG' | 'chr' | 'chr-US' | 'crh-UA' | 'cs' | 'cs-CZ' | 'csb-PL' | 'cv-RU' | 'cy' | 'cy-GB' | 'da' | 'da-DK' | 'dav' | 'dav-KE' | 'de' | 'de-AT' | 'de-BE' | 'de-CH' | 'de-DE' | 'de-LI' | 'de-LU' | 'dv-MV' | 'dz-BT' | 'ebu' | 'ebu-KE' | 'ee' | 'ee-GH' | 'ee-TG' | 'el' | 'el-CY' | 'el-GR' | 'en' | 'en-AG' | 'en-AS' | 'en-AU' | 'en-BE' | 'en-BW' | 'en-BZ' | 'en-CA' | 'en-DK' | 'en-GB' | 'en-GU' | 'en-HK' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-MH' | 'en-MP' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-SG' | 'en-TT' | 'en-UM' | 'en-US' | 'en-VI' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'eo' | 'es' | 'es-419' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GQ' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PR' | 'es-PY' | 'es-SV' | 'es-US' | 'es-UY' | 'es-VE' | 'et' | 'et-EE' | 'eu' | 'eu-ES' | 'fa' | 'fa-AF' | 'fa-IR' | 'ff' | 'ff-SN' | 'fi' | 'fi-FI' | 'fil' | 'fil-PH' | 'fo' | 'fo-FO' | 'fr' | 'fr-BE' | 'fr-BF' | 'fr-BI' | 'fr-BJ' | 'fr-BL' | 'fr-CA' | 'fr-CD' | 'fr-CF' | 'fr-CG' | 'fr-CH' | 'fr-CI' | 'fr-CM' | 'fr-DJ' | 'fr-FR' | 'fr-GA' | 'fr-GN' | 'fr-GP' | 'fr-GQ' | 'fr-KM' | 'fr-LU' | 'fr-MC' | 'fr-MF' | 'fr-MG' | 'fr-ML' | 'fr-MQ' | 'fr-NE' | 'fr-RE' | 'fr-RW' | 'fr-SN' | 'fr-TD' | 'fr-TG' | 'fur-IT' | 'fy-DE' | 'fy-NL' | 'ga' | 'ga-IE' | 'gd-GB' | 'gez-ER' | 'gez-ET' | 'gl' | 'gl-ES' | 'gsw' | 'gsw-CH' | 'gu' | 'gu-IN' | 'guz' | 'guz-KE' | 'gv' | 'gv-GB' | 'ha' | 'ha-Latn' | 'ha-Latn-GH' | 'ha-Latn-NE' | 'ha-Latn-NG' | 'ha-NG' | 'haw' | 'haw-US' | 'he' | 'he-IL' | 'hi' | 'hi-IN' | 'hne-IN' | 'hr' | 'hr-HR' | 'hsb-DE' | 'ht-HT' | 'hu' | 'hu-HU' | 'hy' | 'hy-AM' | 'id' | 'id-ID' | 'ig' | 'ig-NG' | 'ii' | 'ii-CN' | 'ik-CA' | 'is' | 'is-IS' | 'it' | 'it-CH' | 'it-IT' | 'iu-CA' | 'iw-IL' | 'ja' | 'ja-JP' | 'jmc' | 'jmc-TZ' | 'ka' | 'ka-GE' | 'kab' | 'kab-DZ' | 'kam' | 'kam-KE' | 'kde' | 'kde-TZ' | 'kea' | 'kea-CV' | 'khq' | 'khq-ML' | 'ki' | 'ki-KE' | 'kk' | 'kk-Cyrl' | 'kk-Cyrl-KZ' | 'kk-KZ' | 'kl' | 'kl-GL' | 'kln' | 'kln-KE' | 'km' | 'km-KH' | 'kn' | 'kn-IN' | 'ko' | 'ko-KR' | 'kok' | 'kok-IN' | 'ks-IN' | 'ku-TR' | 'kw' | 'kw-GB' | 'ky-KG' | 'lag' | 'lag-TZ' | 'lb-LU' | 'lg' | 'lg-UG' | 'li-BE' | 'li-NL' | 'lij-IT' | 'lo-LA' | 'lt' | 'lt-LT' | 'luo' | 'luo-KE' | 'luy' | 'luy-KE' | 'lv' | 'lv-LV' | 'mag-IN' | 'mai-IN' | 'mas' | 'mas-KE' | 'mas-TZ' | 'mer' | 'mer-KE' | 'mfe' | 'mfe-MU' | 'mg' | 'mg-MG' | 'mhr-RU' | 'mi-NZ' | 'mk' | 'mk-MK' | 'ml' | 'ml-IN' | 'mn-MN' | 'mr' | 'mr-IN' | 'ms' | 'ms-BN' | 'ms-MY' | 'mt' | 'mt-MT' | 'my' | 'my-MM' | 'nan-TW' | 'naq' | 'naq-NA' | 'nb' | 'nb-NO' | 'nd' | 'nd-ZW' | 'nds-DE' | 'nds-NL' | 'ne' | 'ne-IN' | 'ne-NP' | 'nl' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'nn' | 'nn-NO' | 'nr-ZA' | 'nso-ZA' | 'nyn' | 'nyn-UG' | 'oc-FR' | 'om' | 'om-ET' | 'om-KE' | 'or' | 'or-IN' | 'os-RU' | 'pa' | 'pa-Arab' | 'pa-Arab-PK' | 'pa-Guru' | 'pa-Guru-IN' | 'pa-IN' | 'pa-PK' | 'pap-AN' | 'pl' | 'pl-PL' | 'ps' | 'ps-AF' | 'pt' | 'pt-BR' | 'pt-GW' | 'pt-MZ' | 'pt-PT' | 'rm' | 'rm-CH' | 'ro' | 'ro-MD' | 'ro-RO' | 'rof' | 'rof-TZ' | 'ru' | 'ru-MD' | 'ru-RU' | 'ru-UA' | 'rw' | 'rw-RW' | 'rwk' | 'rwk-TZ' | 'sa-IN' | 'saq' | 'saq-KE' | 'sc-IT' | 'sd-IN' | 'se-NO' | 'seh' | 'seh-MZ' | 'ses' | 'ses-ML' | 'sg' | 'sg-CF' | 'shi' | 'shi-Latn' | 'shi-Latn-MA' | 'shi-Tfng' | 'shi-Tfng-MA' | 'shs-CA' | 'si' | 'si-LK' | 'sid-ET' | 'sk' | 'sk-SK' | 'sl' | 'sl-SI' | 'sn' | 'sn-ZW' | 'so' | 'so-DJ' | 'so-ET' | 'so-KE' | 'so-SO' | 'sq' | 'sq-AL' | 'sq-MK' | 'sr' | 'sr-Cyrl' | 'sr-Cyrl-BA' | 'sr-Cyrl-ME' | 'sr-Cyrl-RS' | 'sr-Latn' | 'sr-Latn-BA' | 'sr-Latn-ME' | 'sr-Latn-RS' | 'sr-ME' | 'sr-RS' | 'ss-ZA' | 'st-ZA' | 'sv' | 'sv-FI' | 'sv-SE' | 'sw' | 'sw-KE' | 'sw-TZ' | 'ta' | 'ta-IN' | 'ta-LK' | 'te' | 'te-IN' | 'teo' | 'teo-KE' | 'teo-UG' | 'tg-TJ' | 'th' | 'th-TH' | 'ti' | 'ti-ER' | 'ti-ET' | 'tig-ER' | 'tk-TM' | 'tl-PH' | 'tn-ZA' | 'to' | 'to-TO' | 'tr' | 'tr-CY' | 'tr-TR' | 'ts-ZA' | 'tt-RU' | 'tzm' | 'tzm-Latn' | 'tzm-Latn-MA' | 'ug-CN' | 'uk' | 'uk-UA' | 'unm-US' | 'ur' | 'ur-IN' | 'ur-PK' | 'uz' | 'uz-Arab' | 'uz-Arab-AF' | 'uz-Cyrl' | 'uz-Cyrl-UZ' | 'uz-Latn' | 'uz-Latn-UZ' | 'uz-UZ' | 've-ZA' | 'vi' | 'vi-VN' | 'vun' | 'vun-TZ' | 'wa-BE' | 'wae-CH' | 'wal-ET' | 'wo-SN' | 'xh-ZA' | 'xog' | 'xog-UG' | 'yi-US' | 'yo' | 'yo-NG' | 'yue-HK' | 'zh' | 'zh-CN' | 'zh-HK' | 'zh-Hans' | 'zh-Hans-CN' | 'zh-Hans-HK' | 'zh-Hans-MO' | 'zh-Hans-SG' | 'zh-Hant' | 'zh-Hant-HK' | 'zh-Hant-MO' | 'zh-Hant-TW' | 'zh-SG' | 'zh-TW' | 'zu' | 'zu-ZA' | 'auto';
1134
+ /**
1135
+ * Selects which markdown conversion strategy to use. "full_page" converts the
1136
+ * entire HTML page. "main_content" uses Mozilla Readability to extract the main
1137
+ * article content before converting.
1138
+ */
1139
+ markdown_backend?: 'full_page' | 'main_content';
1140
+ /**
1141
+ * HTTP method for the request
1142
+ */
1143
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
1144
+ /**
1145
+ * Filters for capturing network traffic
1146
+ */
1147
+ network_capture?: Array<ExtractRunParams.NetworkCapture>;
1148
+ /**
1149
+ * Operating system to emulate
1150
+ */
1151
+ os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
1152
+ /**
1153
+ * Whether to parse the response content
1154
+ */
1155
+ parse?: boolean;
1156
+ /**
1157
+ * Custom parser configuration as a key-value map
1158
+ */
1159
+ parser?: {
1160
+ [key: string]: unknown;
1161
+ } | string;
1162
+ /**
1163
+ * Referrer policy for the request
1164
+ */
1165
+ referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
1166
+ /**
1167
+ * Whether to render JavaScript content using a browser
1168
+ */
1169
+ render?: boolean | 'auto';
1170
+ /**
1171
+ * Request timeout in milliseconds
1172
+ */
1173
+ request_timeout?: number;
1174
+ session?: ExtractRunParams.Session;
1175
+ /**
1176
+ * Skills or capabilities required for the request
1177
+ */
1178
+ skill?: string | Array<string>;
1179
+ /**
1180
+ * US state for geolocation (only valid when country is US)
1181
+ */
1182
+ state?: 'AL' | 'AK' | 'AS' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'DC' | 'FL' | 'GA' | 'GU' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'MP' | 'OH' | 'OK' | 'OR' | 'PA' | 'PR' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'VI' | 'WA' | 'WV' | 'WI' | 'WY';
1183
+ /**
1184
+ * User-defined tag for request identification
1185
+ */
1186
+ tag?: string;
1187
+ }
1188
+ export declare namespace ExtractRunParams {
1189
+ interface UnionMember1 {
1190
+ name: 'chrome' | 'firefox';
1191
+ /**
1192
+ * Specific browser version to emulate
1193
+ */
1194
+ version?: string;
1195
+ }
1196
+ interface UnionMember0 {
1197
+ creation?: string | null;
1198
+ domain?: string | null;
1199
+ expires?: string;
1200
+ extensions?: Array<string> | null;
1201
+ hostOnly?: boolean | null;
1202
+ httpOnly?: boolean | null;
1203
+ lastAccessed?: string | null;
1204
+ maxAge?: 'Infinity' | '-Infinity' | number | null;
1205
+ name?: string;
1206
+ path?: string | null;
1207
+ pathIsDefault?: boolean | null;
1208
+ sameSite?: 'strict' | 'lax' | 'none';
1209
+ secure?: boolean;
1210
+ value?: string;
1211
+ [k: string]: unknown;
1212
+ }
1213
+ interface NetworkCapture {
1214
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
1215
+ /**
1216
+ * Resource type for network capture filtering
1217
+ */
1218
+ resource_type?: string | Array<string>;
1219
+ status_code?: number | Array<number>;
1220
+ url?: NetworkCapture.URL;
1221
+ validation?: boolean;
1222
+ wait_for_requests_count?: number;
1223
+ wait_for_requests_count_timeout?: number;
1224
+ }
1225
+ namespace NetworkCapture {
1226
+ interface URL {
1227
+ value: string;
1228
+ type?: 'exact' | 'contains';
1229
+ }
1230
+ }
1231
+ interface Session {
1232
+ id?: string;
1233
+ prefetch_userbrowser?: boolean;
1234
+ renew_on_blocked?: boolean;
1235
+ retry?: boolean;
1236
+ timeout?: number;
1237
+ }
1238
+ }
1239
+ export declare namespace Extract {
1240
+ export { type ExtractAsyncResponse as ExtractAsyncResponse, type ExtractBatchResponse as ExtractBatchResponse, type ExtractRunResponse as ExtractRunResponse, type ExtractAsyncParams as ExtractAsyncParams, type ExtractBatchParams as ExtractBatchParams, type ExtractRunParams as ExtractRunParams, };
1241
+ export { Templates as Templates, type TemplateUpdateResponse as TemplateUpdateResponse, type TemplateListResponse as TemplateListResponse, type TemplateAsyncResponse as TemplateAsyncResponse, type TemplateBatchResponse as TemplateBatchResponse, type TemplateGetResponse as TemplateGetResponse, type TemplateRunResponse as TemplateRunResponse, type TemplateUpdateParams as TemplateUpdateParams, type TemplateListParams as TemplateListParams, type TemplateAsyncParams as TemplateAsyncParams, type TemplateBatchParams as TemplateBatchParams, type TemplateRunParams as TemplateRunParams, };
1242
+ }
1243
+ //# sourceMappingURL=extract.d.mts.map