@nimble-way/nimble-js 0.5.1
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.
- package/CHANGELOG.md +164 -0
- package/LICENSE +201 -0
- package/README.md +370 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +239 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +239 -0
- package/client.d.ts.map +1 -0
- package/client.js +530 -0
- package/client.js.map +1 -0
- package/client.mjs +526 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +137 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/agent.d.mts +356 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +356 -0
- package/resources/agent.d.ts.map +1 -0
- package/resources/agent.js +34 -0
- package/resources/agent.js.map +1 -0
- package/resources/agent.mjs +30 -0
- package/resources/agent.mjs.map +1 -0
- package/resources/crawl.d.mts +465 -0
- package/resources/crawl.d.mts.map +1 -0
- package/resources/crawl.d.ts +465 -0
- package/resources/crawl.d.ts.map +1 -0
- package/resources/crawl.js +34 -0
- package/resources/crawl.js.map +1 -0
- package/resources/crawl.mjs +30 -0
- package/resources/crawl.mjs.map +1 -0
- package/resources/index.d.mts +6 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +13 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +6 -0
- package/resources/index.mjs.map +1 -0
- package/resources/shared.d.mts +452 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +452 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/tasks.d.mts +183 -0
- package/resources/tasks.d.mts.map +1 -0
- package/resources/tasks.d.ts +183 -0
- package/resources/tasks.d.ts.map +1 -0
- package/resources/tasks.js +28 -0
- package/resources/tasks.js.map +1 -0
- package/resources/tasks.mjs +24 -0
- package/resources/tasks.mjs.map +1 -0
- package/resources/top-level.d.mts +847 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +847 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +893 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/agent.ts +548 -0
- package/src/resources/crawl.ts +1493 -0
- package/src/resources/index.ts +39 -0
- package/src/resources/shared.ts +816 -0
- package/src/resources/tasks.ts +240 -0
- package/src/resources/top-level.ts +3665 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
import * as Shared from "./shared.js";
|
|
2
|
+
export interface ExtractResponse {
|
|
3
|
+
data: ExtractResponse.Data;
|
|
4
|
+
metadata: ExtractResponse.Metadata;
|
|
5
|
+
/**
|
|
6
|
+
* The status of the task.
|
|
7
|
+
*/
|
|
8
|
+
status: 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked';
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for the task.
|
|
11
|
+
*/
|
|
12
|
+
task_id: string;
|
|
13
|
+
/**
|
|
14
|
+
* The final URL.
|
|
15
|
+
*/
|
|
16
|
+
url: string;
|
|
17
|
+
debug?: ExtractResponse.Debug;
|
|
18
|
+
/**
|
|
19
|
+
* Pagination information if applicable.
|
|
20
|
+
*/
|
|
21
|
+
pagination?: ExtractResponse.NextPageParams | Array<ExtractResponse.UnionMember1>;
|
|
22
|
+
/**
|
|
23
|
+
* The HTTP status code of the task.
|
|
24
|
+
*/
|
|
25
|
+
status_code?: number;
|
|
26
|
+
/**
|
|
27
|
+
* List of warnings generated during the task.
|
|
28
|
+
*/
|
|
29
|
+
warnings?: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace ExtractResponse {
|
|
32
|
+
interface Data {
|
|
33
|
+
/**
|
|
34
|
+
* Browser actions execution results. Present only when browser_actions were
|
|
35
|
+
* specified in the request.
|
|
36
|
+
*/
|
|
37
|
+
browser_actions?: Data.BrowserActions;
|
|
38
|
+
/**
|
|
39
|
+
* The cookies collected from browser actions during the task.
|
|
40
|
+
*/
|
|
41
|
+
cookies?: Array<unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* The evaluation results from browser actions during the task.
|
|
44
|
+
*/
|
|
45
|
+
eval?: Array<unknown>;
|
|
46
|
+
/**
|
|
47
|
+
* The http requests from browser actions made during the task.
|
|
48
|
+
*/
|
|
49
|
+
fetch?: Array<unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* The headers received during the task.
|
|
52
|
+
*/
|
|
53
|
+
headers?: {
|
|
54
|
+
[key: string]: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The HTML content of the page.
|
|
58
|
+
*/
|
|
59
|
+
html?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The Markdown version of the HTML content.
|
|
62
|
+
*/
|
|
63
|
+
markdown?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The network capture data collected during the task.
|
|
66
|
+
*/
|
|
67
|
+
network_capture?: Array<Data.NetworkCapture>;
|
|
68
|
+
/**
|
|
69
|
+
* The parsing results extracted from the HTML & network content.
|
|
70
|
+
*/
|
|
71
|
+
parsing?: Data.ParsingSuccessResult | Data.ParsingErrorResult | {
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The list of redirects that occurred during the task.
|
|
76
|
+
*/
|
|
77
|
+
redirects?: Array<Data.Redirect>;
|
|
78
|
+
/**
|
|
79
|
+
* Screenshots taken during the task, from browser actions, or the screenshot
|
|
80
|
+
* format.
|
|
81
|
+
*/
|
|
82
|
+
screenshots?: Array<unknown>;
|
|
83
|
+
}
|
|
84
|
+
namespace Data {
|
|
85
|
+
/**
|
|
86
|
+
* Browser actions execution results. Present only when browser_actions were
|
|
87
|
+
* specified in the request.
|
|
88
|
+
*/
|
|
89
|
+
interface BrowserActions {
|
|
90
|
+
results: Array<BrowserActions.Result>;
|
|
91
|
+
success: boolean;
|
|
92
|
+
total_duration: number;
|
|
93
|
+
}
|
|
94
|
+
namespace BrowserActions {
|
|
95
|
+
interface Result {
|
|
96
|
+
duration: number;
|
|
97
|
+
name: 'goto' | 'wait' | 'wait_for_element' | 'wait_for_navigation' | 'click' | 'fill' | 'press' | 'scroll' | 'auto_scroll' | 'screenshot' | 'get_cookies' | 'eval' | 'fetch';
|
|
98
|
+
status: 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped';
|
|
99
|
+
error?: string;
|
|
100
|
+
result?: unknown;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
interface NetworkCapture {
|
|
104
|
+
filter: NetworkCapture.Filter;
|
|
105
|
+
results: Array<NetworkCapture.Result>;
|
|
106
|
+
errorMessage?: string;
|
|
107
|
+
}
|
|
108
|
+
namespace NetworkCapture {
|
|
109
|
+
interface Filter {
|
|
110
|
+
validation: boolean;
|
|
111
|
+
wait_for_requests_count: number;
|
|
112
|
+
method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
113
|
+
/**
|
|
114
|
+
* Resource type for network capture filtering
|
|
115
|
+
*/
|
|
116
|
+
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'>;
|
|
117
|
+
status_code?: number | Array<number>;
|
|
118
|
+
url?: Filter.URL;
|
|
119
|
+
wait_for_requests_count_timeout?: number;
|
|
120
|
+
}
|
|
121
|
+
namespace Filter {
|
|
122
|
+
interface URL {
|
|
123
|
+
type: 'exact' | 'contains';
|
|
124
|
+
value: string;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
interface Result {
|
|
128
|
+
request: Result.Request;
|
|
129
|
+
response: Result.Response;
|
|
130
|
+
}
|
|
131
|
+
namespace Result {
|
|
132
|
+
interface Request {
|
|
133
|
+
headers: {
|
|
134
|
+
[key: string]: string;
|
|
135
|
+
};
|
|
136
|
+
method: string;
|
|
137
|
+
/**
|
|
138
|
+
* Resource type for network capture filtering
|
|
139
|
+
*/
|
|
140
|
+
resource_type: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm';
|
|
141
|
+
url: string;
|
|
142
|
+
body?: string;
|
|
143
|
+
}
|
|
144
|
+
interface Response {
|
|
145
|
+
body: string;
|
|
146
|
+
headers: {
|
|
147
|
+
[key: string]: string;
|
|
148
|
+
};
|
|
149
|
+
serialization: 'none' | 'base64';
|
|
150
|
+
status: number;
|
|
151
|
+
status_text: string;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
interface ParsingSuccessResult {
|
|
156
|
+
entities: {
|
|
157
|
+
[key: string]: unknown;
|
|
158
|
+
};
|
|
159
|
+
status: 'success';
|
|
160
|
+
}
|
|
161
|
+
interface ParsingErrorResult {
|
|
162
|
+
error: string;
|
|
163
|
+
status: 'error';
|
|
164
|
+
}
|
|
165
|
+
interface Redirect {
|
|
166
|
+
status_code: number;
|
|
167
|
+
url: string;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
interface Metadata {
|
|
171
|
+
/**
|
|
172
|
+
* The name of the agent used for the query.
|
|
173
|
+
*/
|
|
174
|
+
agent?: string;
|
|
175
|
+
/**
|
|
176
|
+
* The driver used for the task.
|
|
177
|
+
*/
|
|
178
|
+
driver?: string;
|
|
179
|
+
/**
|
|
180
|
+
* The localization identifier for the query.
|
|
181
|
+
*/
|
|
182
|
+
localization_id?: string;
|
|
183
|
+
/**
|
|
184
|
+
* The duration in milliseconds of the query processing.
|
|
185
|
+
*/
|
|
186
|
+
query_duration?: number;
|
|
187
|
+
/**
|
|
188
|
+
* The time when the query was received.
|
|
189
|
+
*/
|
|
190
|
+
query_time?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Additional response parameters.
|
|
193
|
+
*/
|
|
194
|
+
response_parameters?: unknown;
|
|
195
|
+
/**
|
|
196
|
+
* A tag associated with the query.
|
|
197
|
+
*/
|
|
198
|
+
tag?: string;
|
|
199
|
+
}
|
|
200
|
+
interface Debug {
|
|
201
|
+
/**
|
|
202
|
+
* Performance metrics collected during the task.
|
|
203
|
+
*/
|
|
204
|
+
performance_metrics?: {
|
|
205
|
+
[key: string]: number;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Total bytes used by the proxy during the task.
|
|
209
|
+
*/
|
|
210
|
+
proxy_total_bytes_usage?: number;
|
|
211
|
+
/**
|
|
212
|
+
* The transformed output after applying any transformations.
|
|
213
|
+
*/
|
|
214
|
+
transformed_output?: unknown;
|
|
215
|
+
/**
|
|
216
|
+
* The userbrowser instance using during the task.
|
|
217
|
+
*/
|
|
218
|
+
userbrowser?: unknown;
|
|
219
|
+
}
|
|
220
|
+
interface NextPageParams {
|
|
221
|
+
next_page_params: {
|
|
222
|
+
[key: string]: unknown;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
interface UnionMember1 {
|
|
226
|
+
next_page_params: {
|
|
227
|
+
[key: string]: unknown;
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Response when an async extract task is created successfully.
|
|
233
|
+
*/
|
|
234
|
+
export interface ExtractAsyncResponse {
|
|
235
|
+
/**
|
|
236
|
+
* Status indicating the async task was created successfully.
|
|
237
|
+
*/
|
|
238
|
+
status: 'success';
|
|
239
|
+
/**
|
|
240
|
+
* The created async task details.
|
|
241
|
+
*/
|
|
242
|
+
task: ExtractAsyncResponse.Task;
|
|
243
|
+
}
|
|
244
|
+
export declare namespace ExtractAsyncResponse {
|
|
245
|
+
/**
|
|
246
|
+
* The created async task details.
|
|
247
|
+
*/
|
|
248
|
+
interface Task {
|
|
249
|
+
/**
|
|
250
|
+
* Unique task identifier.
|
|
251
|
+
*/
|
|
252
|
+
id: string;
|
|
253
|
+
_query: unknown;
|
|
254
|
+
/**
|
|
255
|
+
* Timestamp when the task was created.
|
|
256
|
+
*/
|
|
257
|
+
created_at: string;
|
|
258
|
+
/**
|
|
259
|
+
* Original input data for the task.
|
|
260
|
+
*/
|
|
261
|
+
input: unknown;
|
|
262
|
+
/**
|
|
263
|
+
* Current state of the task.
|
|
264
|
+
*/
|
|
265
|
+
state: 'pending' | 'success' | 'error';
|
|
266
|
+
/**
|
|
267
|
+
* URL for checking the task status.
|
|
268
|
+
*/
|
|
269
|
+
status_url: string;
|
|
270
|
+
/**
|
|
271
|
+
* Account name that owns the task.
|
|
272
|
+
*/
|
|
273
|
+
account_name?: string;
|
|
274
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social';
|
|
275
|
+
/**
|
|
276
|
+
* Batch ID if this task is part of a batch.
|
|
277
|
+
*/
|
|
278
|
+
batch_id?: string;
|
|
279
|
+
/**
|
|
280
|
+
* URL for downloading the task results.
|
|
281
|
+
*/
|
|
282
|
+
download_url?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Error message if the task failed.
|
|
285
|
+
*/
|
|
286
|
+
error?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Classification of the error type.
|
|
289
|
+
*/
|
|
290
|
+
error_type?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Timestamp when the task was last modified.
|
|
293
|
+
*/
|
|
294
|
+
modified_at?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Storage location of the output data.
|
|
297
|
+
*/
|
|
298
|
+
output_url?: string;
|
|
299
|
+
/**
|
|
300
|
+
* HTTP status code from the task execution.
|
|
301
|
+
*/
|
|
302
|
+
status_code?: number;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Response schema for map requests.
|
|
307
|
+
*/
|
|
308
|
+
export interface MapResponse {
|
|
309
|
+
/**
|
|
310
|
+
* Array of mapped links with optional titles and descriptions.
|
|
311
|
+
*/
|
|
312
|
+
links: Array<MapResponse.Link>;
|
|
313
|
+
/**
|
|
314
|
+
* Indicates if the map request was successful.
|
|
315
|
+
*/
|
|
316
|
+
success: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Unique identifier for the map task.
|
|
319
|
+
*/
|
|
320
|
+
task_id: string;
|
|
321
|
+
}
|
|
322
|
+
export declare namespace MapResponse {
|
|
323
|
+
interface Link {
|
|
324
|
+
url: string;
|
|
325
|
+
description?: string;
|
|
326
|
+
title?: string;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Response model from SearchService with results and optional LLM answer.
|
|
331
|
+
*
|
|
332
|
+
* Note: request_id is always a valid UUID generated internally by the middleware,
|
|
333
|
+
* so no validation is needed.
|
|
334
|
+
*/
|
|
335
|
+
export interface SearchResponse {
|
|
336
|
+
/**
|
|
337
|
+
* Unique identifier for this request (UUID)
|
|
338
|
+
*/
|
|
339
|
+
request_id: string;
|
|
340
|
+
results: Array<SearchResponse.Result>;
|
|
341
|
+
/**
|
|
342
|
+
* Number of results returned
|
|
343
|
+
*/
|
|
344
|
+
total_results: number;
|
|
345
|
+
answer?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* Citations mapping citation markers to result indices
|
|
348
|
+
*/
|
|
349
|
+
answer_citations?: Array<SearchResponse.AnswerCitation> | null;
|
|
350
|
+
}
|
|
351
|
+
export declare namespace SearchResponse {
|
|
352
|
+
/**
|
|
353
|
+
* Unified result model for all search types (SERP and WSA).
|
|
354
|
+
*
|
|
355
|
+
* This model provides a consistent structure for search results, with
|
|
356
|
+
* platform-specific data in additional_data and typed metadata.
|
|
357
|
+
*/
|
|
358
|
+
interface Result {
|
|
359
|
+
content: string;
|
|
360
|
+
description: string;
|
|
361
|
+
/**
|
|
362
|
+
* Metadata for SERP-based search results (general, news, location).
|
|
363
|
+
*/
|
|
364
|
+
metadata: Result.SerpMetadata | Result.WsaMetadata;
|
|
365
|
+
title: string;
|
|
366
|
+
url: string;
|
|
367
|
+
/**
|
|
368
|
+
* Platform-specific fields (e.g., price, rating, publish_date). Omitted from
|
|
369
|
+
* response when no extra data.
|
|
370
|
+
*/
|
|
371
|
+
additional_data?: {
|
|
372
|
+
[key: string]: unknown;
|
|
373
|
+
} | null;
|
|
374
|
+
}
|
|
375
|
+
namespace Result {
|
|
376
|
+
/**
|
|
377
|
+
* Metadata for SERP-based search results (general, news, location).
|
|
378
|
+
*/
|
|
379
|
+
interface SerpMetadata {
|
|
380
|
+
country: string;
|
|
381
|
+
entity_type: string;
|
|
382
|
+
locale: string;
|
|
383
|
+
position: number;
|
|
384
|
+
driver?: string | null;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Metadata for WSA-based search results.
|
|
388
|
+
*/
|
|
389
|
+
interface WsaMetadata {
|
|
390
|
+
agent_name: string;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Citation model that maps citation markers to result indices.
|
|
395
|
+
*/
|
|
396
|
+
interface AnswerCitation {
|
|
397
|
+
/**
|
|
398
|
+
* Citation marker number (e.g., 1 for [1])
|
|
399
|
+
*/
|
|
400
|
+
marker: number;
|
|
401
|
+
/**
|
|
402
|
+
* Zero-based index into the results array
|
|
403
|
+
*/
|
|
404
|
+
result_index: number;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
export interface ExtractParams {
|
|
408
|
+
/**
|
|
409
|
+
* Target URL to scrape
|
|
410
|
+
*/
|
|
411
|
+
url: string;
|
|
412
|
+
/**
|
|
413
|
+
* Browser type to emulate
|
|
414
|
+
*/
|
|
415
|
+
browser?: 'chrome' | 'firefox' | ExtractParams.UnionMember1;
|
|
416
|
+
/**
|
|
417
|
+
* Array of browser automation actions to execute sequentially
|
|
418
|
+
*/
|
|
419
|
+
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>;
|
|
420
|
+
/**
|
|
421
|
+
* City for geolocation
|
|
422
|
+
*/
|
|
423
|
+
city?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Whether to automatically handle cookie consent headers
|
|
426
|
+
*/
|
|
427
|
+
consent_header?: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* Browser cookies as array of cookie objects
|
|
430
|
+
*/
|
|
431
|
+
cookies?: Array<ExtractParams.UnionMember0> | string;
|
|
432
|
+
/**
|
|
433
|
+
* Country code for geolocation and proxy selection
|
|
434
|
+
*/
|
|
435
|
+
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';
|
|
436
|
+
/**
|
|
437
|
+
* Device type for browser emulation
|
|
438
|
+
*/
|
|
439
|
+
device?: 'desktop' | 'mobile' | 'tablet';
|
|
440
|
+
/**
|
|
441
|
+
* Browser driver to use
|
|
442
|
+
*/
|
|
443
|
+
driver?: 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro';
|
|
444
|
+
/**
|
|
445
|
+
* Expected HTTP status codes for successful requests
|
|
446
|
+
*/
|
|
447
|
+
expected_status_codes?: Array<number>;
|
|
448
|
+
/**
|
|
449
|
+
* List of acceptable response formats in order of preference
|
|
450
|
+
*/
|
|
451
|
+
formats?: Array<'html' | 'markdown' | 'screenshot'>;
|
|
452
|
+
/**
|
|
453
|
+
* Custom HTTP headers to include in the request
|
|
454
|
+
*/
|
|
455
|
+
headers?: {
|
|
456
|
+
[key: string]: string | Array<string> | null;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Whether to use HTTP/2 protocol
|
|
460
|
+
*/
|
|
461
|
+
http2?: boolean;
|
|
462
|
+
/**
|
|
463
|
+
* Whether to emulate XMLHttpRequest behavior
|
|
464
|
+
*/
|
|
465
|
+
is_xhr?: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* Locale for browser language and region settings
|
|
468
|
+
*/
|
|
469
|
+
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';
|
|
470
|
+
/**
|
|
471
|
+
* HTTP method for the request
|
|
472
|
+
*/
|
|
473
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
474
|
+
/**
|
|
475
|
+
* Filters for capturing network traffic
|
|
476
|
+
*/
|
|
477
|
+
network_capture?: Array<ExtractParams.NetworkCapture>;
|
|
478
|
+
/**
|
|
479
|
+
* Operating system to emulate
|
|
480
|
+
*/
|
|
481
|
+
os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
|
|
482
|
+
/**
|
|
483
|
+
* Whether to parse the response content
|
|
484
|
+
*/
|
|
485
|
+
parse?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Custom parser configuration as a key-value map
|
|
488
|
+
*/
|
|
489
|
+
parser?: {
|
|
490
|
+
[key: string]: unknown;
|
|
491
|
+
} | string;
|
|
492
|
+
/**
|
|
493
|
+
* Referrer policy for the request
|
|
494
|
+
*/
|
|
495
|
+
referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
|
|
496
|
+
/**
|
|
497
|
+
* Whether to render JavaScript content using a browser
|
|
498
|
+
*/
|
|
499
|
+
render?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Request timeout in milliseconds
|
|
502
|
+
*/
|
|
503
|
+
request_timeout?: number;
|
|
504
|
+
session?: ExtractParams.Session;
|
|
505
|
+
/**
|
|
506
|
+
* Skills or capabilities required for the request
|
|
507
|
+
*/
|
|
508
|
+
skill?: string | Array<string>;
|
|
509
|
+
/**
|
|
510
|
+
* US state for geolocation (only valid when country is US)
|
|
511
|
+
*/
|
|
512
|
+
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';
|
|
513
|
+
/**
|
|
514
|
+
* User-defined tag for request identification
|
|
515
|
+
*/
|
|
516
|
+
tag?: string;
|
|
517
|
+
}
|
|
518
|
+
export declare namespace ExtractParams {
|
|
519
|
+
interface UnionMember1 {
|
|
520
|
+
name: 'chrome' | 'firefox';
|
|
521
|
+
/**
|
|
522
|
+
* Specific browser version to emulate
|
|
523
|
+
*/
|
|
524
|
+
version?: string;
|
|
525
|
+
}
|
|
526
|
+
interface UnionMember0 {
|
|
527
|
+
creation?: string | null;
|
|
528
|
+
domain?: string | null;
|
|
529
|
+
expires?: string;
|
|
530
|
+
extensions?: Array<string> | null;
|
|
531
|
+
hostOnly?: boolean | null;
|
|
532
|
+
httpOnly?: boolean | null;
|
|
533
|
+
lastAccessed?: string | null;
|
|
534
|
+
maxAge?: 'Infinity' | '-Infinity' | number | null;
|
|
535
|
+
name?: string;
|
|
536
|
+
path?: string | null;
|
|
537
|
+
pathIsDefault?: boolean | null;
|
|
538
|
+
sameSite?: 'strict' | 'lax' | 'none';
|
|
539
|
+
secure?: boolean;
|
|
540
|
+
value?: string;
|
|
541
|
+
[k: string]: unknown;
|
|
542
|
+
}
|
|
543
|
+
interface NetworkCapture {
|
|
544
|
+
method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
545
|
+
/**
|
|
546
|
+
* Resource type for network capture filtering
|
|
547
|
+
*/
|
|
548
|
+
resource_type?: string | Array<string>;
|
|
549
|
+
status_code?: number | Array<number>;
|
|
550
|
+
url?: NetworkCapture.URL;
|
|
551
|
+
validation?: boolean;
|
|
552
|
+
wait_for_requests_count?: number;
|
|
553
|
+
wait_for_requests_count_timeout?: number;
|
|
554
|
+
}
|
|
555
|
+
namespace NetworkCapture {
|
|
556
|
+
interface URL {
|
|
557
|
+
value: string;
|
|
558
|
+
type?: 'exact' | 'contains';
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
interface Session {
|
|
562
|
+
id?: string;
|
|
563
|
+
prefetch_userbrowser?: boolean;
|
|
564
|
+
retry?: boolean;
|
|
565
|
+
timeout?: number;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
export interface ExtractAsyncParams {
|
|
569
|
+
/**
|
|
570
|
+
* Target URL to scrape
|
|
571
|
+
*/
|
|
572
|
+
url: string;
|
|
573
|
+
/**
|
|
574
|
+
* Browser type to emulate
|
|
575
|
+
*/
|
|
576
|
+
browser?: 'chrome' | 'firefox' | ExtractAsyncParams.UnionMember1;
|
|
577
|
+
/**
|
|
578
|
+
* Array of browser automation actions to execute sequentially
|
|
579
|
+
*/
|
|
580
|
+
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>;
|
|
581
|
+
/**
|
|
582
|
+
* URL to call back when async operation completes
|
|
583
|
+
*/
|
|
584
|
+
callback_url?: string;
|
|
585
|
+
/**
|
|
586
|
+
* City for geolocation
|
|
587
|
+
*/
|
|
588
|
+
city?: string;
|
|
589
|
+
/**
|
|
590
|
+
* Whether to automatically handle cookie consent headers
|
|
591
|
+
*/
|
|
592
|
+
consent_header?: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Browser cookies as array of cookie objects
|
|
595
|
+
*/
|
|
596
|
+
cookies?: Array<ExtractAsyncParams.UnionMember0> | string;
|
|
597
|
+
/**
|
|
598
|
+
* Country code for geolocation and proxy selection
|
|
599
|
+
*/
|
|
600
|
+
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';
|
|
601
|
+
/**
|
|
602
|
+
* Device type for browser emulation
|
|
603
|
+
*/
|
|
604
|
+
device?: 'desktop' | 'mobile' | 'tablet';
|
|
605
|
+
/**
|
|
606
|
+
* Browser driver to use
|
|
607
|
+
*/
|
|
608
|
+
driver?: 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro';
|
|
609
|
+
/**
|
|
610
|
+
* Expected HTTP status codes for successful requests
|
|
611
|
+
*/
|
|
612
|
+
expected_status_codes?: Array<number>;
|
|
613
|
+
/**
|
|
614
|
+
* List of acceptable response formats in order of preference
|
|
615
|
+
*/
|
|
616
|
+
formats?: Array<'html' | 'markdown' | 'screenshot'>;
|
|
617
|
+
/**
|
|
618
|
+
* Custom HTTP headers to include in the request
|
|
619
|
+
*/
|
|
620
|
+
headers?: {
|
|
621
|
+
[key: string]: string | Array<string> | null;
|
|
622
|
+
};
|
|
623
|
+
/**
|
|
624
|
+
* Whether to use HTTP/2 protocol
|
|
625
|
+
*/
|
|
626
|
+
http2?: boolean;
|
|
627
|
+
/**
|
|
628
|
+
* Whether to emulate XMLHttpRequest behavior
|
|
629
|
+
*/
|
|
630
|
+
is_xhr?: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* Locale for browser language and region settings
|
|
633
|
+
*/
|
|
634
|
+
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';
|
|
635
|
+
/**
|
|
636
|
+
* HTTP method for the request
|
|
637
|
+
*/
|
|
638
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
639
|
+
/**
|
|
640
|
+
* Filters for capturing network traffic
|
|
641
|
+
*/
|
|
642
|
+
network_capture?: Array<ExtractAsyncParams.NetworkCapture>;
|
|
643
|
+
/**
|
|
644
|
+
* Operating system to emulate
|
|
645
|
+
*/
|
|
646
|
+
os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
|
|
647
|
+
/**
|
|
648
|
+
* Whether to parse the response content
|
|
649
|
+
*/
|
|
650
|
+
parse?: boolean;
|
|
651
|
+
/**
|
|
652
|
+
* Custom parser configuration as a key-value map
|
|
653
|
+
*/
|
|
654
|
+
parser?: {
|
|
655
|
+
[key: string]: unknown;
|
|
656
|
+
} | string;
|
|
657
|
+
/**
|
|
658
|
+
* Referrer policy for the request
|
|
659
|
+
*/
|
|
660
|
+
referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
|
|
661
|
+
/**
|
|
662
|
+
* Whether to render JavaScript content using a browser
|
|
663
|
+
*/
|
|
664
|
+
render?: boolean;
|
|
665
|
+
/**
|
|
666
|
+
* Request timeout in milliseconds
|
|
667
|
+
*/
|
|
668
|
+
request_timeout?: number;
|
|
669
|
+
session?: ExtractAsyncParams.Session;
|
|
670
|
+
/**
|
|
671
|
+
* Skills or capabilities required for the request
|
|
672
|
+
*/
|
|
673
|
+
skill?: string | Array<string>;
|
|
674
|
+
/**
|
|
675
|
+
* US state for geolocation (only valid when country is US)
|
|
676
|
+
*/
|
|
677
|
+
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';
|
|
678
|
+
/**
|
|
679
|
+
* Whether to compress stored data
|
|
680
|
+
*/
|
|
681
|
+
storage_compress?: boolean;
|
|
682
|
+
/**
|
|
683
|
+
* Custom name for the stored object
|
|
684
|
+
*/
|
|
685
|
+
storage_object_name?: string;
|
|
686
|
+
/**
|
|
687
|
+
* Type of storage to use for results
|
|
688
|
+
*/
|
|
689
|
+
storage_type?: string;
|
|
690
|
+
/**
|
|
691
|
+
* URL for storage location
|
|
692
|
+
*/
|
|
693
|
+
storage_url?: string;
|
|
694
|
+
/**
|
|
695
|
+
* User-defined tag for request identification
|
|
696
|
+
*/
|
|
697
|
+
tag?: string;
|
|
698
|
+
}
|
|
699
|
+
export declare namespace ExtractAsyncParams {
|
|
700
|
+
interface UnionMember1 {
|
|
701
|
+
name: 'chrome' | 'firefox';
|
|
702
|
+
/**
|
|
703
|
+
* Specific browser version to emulate
|
|
704
|
+
*/
|
|
705
|
+
version?: string;
|
|
706
|
+
}
|
|
707
|
+
interface UnionMember0 {
|
|
708
|
+
creation?: string | null;
|
|
709
|
+
domain?: string | null;
|
|
710
|
+
expires?: string;
|
|
711
|
+
extensions?: Array<string> | null;
|
|
712
|
+
hostOnly?: boolean | null;
|
|
713
|
+
httpOnly?: boolean | null;
|
|
714
|
+
lastAccessed?: string | null;
|
|
715
|
+
maxAge?: 'Infinity' | '-Infinity' | number | null;
|
|
716
|
+
name?: string;
|
|
717
|
+
path?: string | null;
|
|
718
|
+
pathIsDefault?: boolean | null;
|
|
719
|
+
sameSite?: 'strict' | 'lax' | 'none';
|
|
720
|
+
secure?: boolean;
|
|
721
|
+
value?: string;
|
|
722
|
+
[k: string]: unknown;
|
|
723
|
+
}
|
|
724
|
+
interface NetworkCapture {
|
|
725
|
+
method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
726
|
+
/**
|
|
727
|
+
* Resource type for network capture filtering
|
|
728
|
+
*/
|
|
729
|
+
resource_type?: string | Array<string>;
|
|
730
|
+
status_code?: number | Array<number>;
|
|
731
|
+
url?: NetworkCapture.URL;
|
|
732
|
+
validation?: boolean;
|
|
733
|
+
wait_for_requests_count?: number;
|
|
734
|
+
wait_for_requests_count_timeout?: number;
|
|
735
|
+
}
|
|
736
|
+
namespace NetworkCapture {
|
|
737
|
+
interface URL {
|
|
738
|
+
value: string;
|
|
739
|
+
type?: 'exact' | 'contains';
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
interface Session {
|
|
743
|
+
id?: string;
|
|
744
|
+
prefetch_userbrowser?: boolean;
|
|
745
|
+
retry?: boolean;
|
|
746
|
+
timeout?: number;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
export interface MapParams {
|
|
750
|
+
/**
|
|
751
|
+
* Url to map.
|
|
752
|
+
*/
|
|
753
|
+
url: string;
|
|
754
|
+
/**
|
|
755
|
+
* Country code for geolocation and proxy selection
|
|
756
|
+
*/
|
|
757
|
+
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';
|
|
758
|
+
/**
|
|
759
|
+
* Includes subdomains of the main domain in the mapping process.
|
|
760
|
+
*/
|
|
761
|
+
domain_filter?: 'domain' | 'subdomain' | 'all';
|
|
762
|
+
/**
|
|
763
|
+
* Maximum number of links to return.
|
|
764
|
+
*/
|
|
765
|
+
limit?: number;
|
|
766
|
+
/**
|
|
767
|
+
* Locale for browser language and region settings
|
|
768
|
+
*/
|
|
769
|
+
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';
|
|
770
|
+
/**
|
|
771
|
+
* Sitemap and other methods will be used together to find URLs.
|
|
772
|
+
*/
|
|
773
|
+
sitemap?: 'skip' | 'include' | 'only';
|
|
774
|
+
}
|
|
775
|
+
export interface SearchParams {
|
|
776
|
+
/**
|
|
777
|
+
* Search query string
|
|
778
|
+
*/
|
|
779
|
+
query: string;
|
|
780
|
+
/**
|
|
781
|
+
* Filter by content type (only supported with focus=general). Supports semantic
|
|
782
|
+
* groups ('documents', 'spreadsheets', 'presentations') and specific formats
|
|
783
|
+
* ('pdf', 'docx', 'xlsx', etc.)
|
|
784
|
+
*/
|
|
785
|
+
content_type?: Array<string> | null;
|
|
786
|
+
country?: string;
|
|
787
|
+
/**
|
|
788
|
+
* If True, fetches and extracts full page content for each search result. If
|
|
789
|
+
* False, returns only metadata (title, snippet, URL)
|
|
790
|
+
*/
|
|
791
|
+
deep_search?: boolean;
|
|
792
|
+
/**
|
|
793
|
+
* Filter results before this date (format: YYYY-MM-DD or YYYY)
|
|
794
|
+
*/
|
|
795
|
+
end_date?: string | null;
|
|
796
|
+
/**
|
|
797
|
+
* List of domains to exclude from search results. Maximum 50 domains.
|
|
798
|
+
*/
|
|
799
|
+
exclude_domains?: Array<string> | null;
|
|
800
|
+
/**
|
|
801
|
+
* Generate LLM answer summary based on search result snippets (works with both
|
|
802
|
+
* deep_search=True and False)
|
|
803
|
+
*/
|
|
804
|
+
include_answer?: boolean;
|
|
805
|
+
/**
|
|
806
|
+
* List of domains to include in search results. Maximum 50 domains.
|
|
807
|
+
*/
|
|
808
|
+
include_domains?: Array<string> | null;
|
|
809
|
+
locale?: string;
|
|
810
|
+
/**
|
|
811
|
+
* Maximum number of subagents to execute in parallel for WSA focus modes
|
|
812
|
+
* (shopping, social, geo). Ignored for traditional SERP focus modes. Default: 3,
|
|
813
|
+
* Range: 1-10.
|
|
814
|
+
*/
|
|
815
|
+
max_subagents?: number;
|
|
816
|
+
/**
|
|
817
|
+
* Maximum number of results to return (actual count may be less)
|
|
818
|
+
*/
|
|
819
|
+
num_results?: number;
|
|
820
|
+
/**
|
|
821
|
+
* Output format: plain_text, markdown, or simplified_html
|
|
822
|
+
*/
|
|
823
|
+
parsing_type?: 'plain_text' | 'markdown' | 'simplified_html';
|
|
824
|
+
/**
|
|
825
|
+
* Enum representing the search engines supported by Nimble ⚠️ DEPRECATED: This
|
|
826
|
+
* parameter is ignored. Use 'focus' parameter instead.
|
|
827
|
+
*/
|
|
828
|
+
search_engine?: 'google_search' | 'google_sge' | 'bing_search' | 'yandex_search' | null;
|
|
829
|
+
/**
|
|
830
|
+
* Filter results after this date (format: YYYY-MM-DD or YYYY)
|
|
831
|
+
*/
|
|
832
|
+
start_date?: string | null;
|
|
833
|
+
/**
|
|
834
|
+
* Time range filters passed to Webit SERP API as 'time' parameter.
|
|
835
|
+
*/
|
|
836
|
+
time_range?: 'hour' | 'day' | 'week' | 'month' | 'year' | null;
|
|
837
|
+
/**
|
|
838
|
+
* Search focus/specialization. Can be a single focus mode (e.g., 'shopping',
|
|
839
|
+
* 'social') or a list of explicit subagent names (e.g., ['amazon_serp',
|
|
840
|
+
* 'target_serp'])
|
|
841
|
+
*/
|
|
842
|
+
topic?: string | Array<string>;
|
|
843
|
+
}
|
|
844
|
+
export declare namespace TopLevel {
|
|
845
|
+
export { type ExtractResponse as ExtractResponse, type ExtractAsyncResponse as ExtractAsyncResponse, type MapResponse as MapResponse, type SearchResponse as SearchResponse, type ExtractParams as ExtractParams, type ExtractAsyncParams as ExtractAsyncParams, type MapParams as MapParams, type SearchParams as SearchParams, };
|
|
846
|
+
}
|
|
847
|
+
//# sourceMappingURL=top-level.d.ts.map
|