@2captcha/captcha-solver 1.3.0 → 1.3.2

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.
@@ -1,1105 +1,1270 @@
1
- export interface paramsRecaptcha {
2
- pageurl: string;
3
- googlekey: string;
4
- invisible?: 0 | 1;
5
- datas?: string;
6
- domain?: string;
7
- cookies?: string;
8
- userAgent?: string;
9
- header_acao?: boolean;
10
- pingback?: string;
11
- soft_id?: number;
12
- proxy?: string;
13
- proxytype?: string;
14
- action?: string;
15
- enterprise?: 0 | 1;
16
- min_score?: number;
17
- version?: string;
18
- }
19
- export interface paramsHCaptcha {
20
- sitekey: string;
21
- pageurl: string;
22
- header_acao?: boolean;
23
- pingback?: string;
24
- proxy?: string;
25
- proxytype?: string;
26
- invisible?: 0 | 1;
27
- data?: string;
28
- userAgent?: string;
29
- soft_id?: number;
30
- domain?: string;
31
- }
32
- export interface paramsFunCaptcha {
33
- publickey: string;
34
- pageurl: string;
35
- surl?: string;
36
- header_acao?: boolean;
37
- pingback?: string;
38
- proxy?: string;
39
- proxytype?: string;
40
- userAgent?: string;
41
- data?: string;
42
- }
43
- export interface paramsImageCaptcha {
44
- body: string;
45
- phrase?: 0 | 1;
46
- regsense?: 0 | 1;
47
- numeric?: 0 | 1 | 2 | 3 | 4;
48
- calc?: 0 | 1;
49
- min_len?: 0 | string | number;
50
- max_len?: 0 | string | number;
51
- language?: 0 | 1 | 2;
52
- lang?: string;
53
- pingback?: string;
54
- textinstructions?: string;
55
- }
56
- export interface paramsGeetest {
57
- gt: string;
58
- challenge: string;
59
- pageurl: string;
60
- api_server?: string;
61
- offline?: number | boolean;
62
- new_captcha?: number | boolean;
63
- pingback?: string;
64
- soft_id?: number;
65
- proxy?: string;
66
- proxytype?: string;
67
- userAgent?: string;
68
- }
69
- export interface yandexSmart {
70
- pageurl: string;
71
- sitekey: string;
72
- pingback?: string;
73
- proxy?: string;
74
- proxytype?: string;
75
- userAgent?: string;
76
- }
77
- export interface paramsGeeTestV4 {
78
- pageurl: string;
79
- captcha_id: string;
80
- pingback?: string;
81
- proxy?: string;
82
- proxytype?: string;
83
- userAgent?: string;
84
- }
85
- export interface paramsLemin {
86
- pageurl: string;
87
- captcha_id: string;
88
- div_id: string;
89
- api_server?: string;
90
- pingback?: string;
91
- proxy?: string;
92
- proxytype?: string;
93
- }
94
- export interface paramsAmazonWAF {
95
- pageurl: string;
96
- sitekey: string;
97
- iv: string;
98
- context: string;
99
- challenge_script?: string;
100
- captcha_script?: string;
101
- header_acao?: boolean;
102
- pingback?: string;
103
- soft_id?: number;
104
- proxy?: string;
105
- proxytype?: string;
106
- }
107
- export interface paramsTurnstile {
108
- pageurl: string;
109
- sitekey: string;
110
- action?: string;
111
- data?: string;
112
- header_acao?: boolean;
113
- pingback?: string;
114
- soft_id?: number;
115
- proxy?: string;
116
- proxytype?: string;
117
- }
118
- export interface paramsCapyPuzzle {
119
- pageurl: string;
120
- captchakey: string;
121
- api_server?: string;
122
- version?: string;
123
- pingback?: string;
124
- proxy?: string;
125
- proxytype?: string;
126
- }
127
- export interface paramsCoordinates {
128
- body: string;
129
- language?: 0 | 1 | 2;
130
- lang?: string;
131
- pingback?: string;
132
- textinstructions?: string;
133
- imginstructions?: string;
134
- }
135
- export interface paramsDataDome {
136
- pageurl: string;
137
- captcha_url: string;
138
- userAgent: string;
139
- pingback?: string;
140
- proxy: string;
141
- proxytype: string;
142
- }
143
- export interface paramsCyberSiARA {
144
- pageurl: string;
145
- master_url_id: string;
146
- userAgent: string;
147
- pingback?: string;
148
- proxy?: string;
149
- proxytype?: string;
150
- }
151
- export interface paramsMTCaptcha {
152
- pageurl: string;
153
- sitekey: string;
154
- userAgent?: string;
155
- pingback?: string;
156
- proxy?: string;
157
- proxytype?: string;
158
- }
159
- export interface paramsCutcaptcha {
160
- pageurl: string;
161
- miseryKey: string;
162
- apiKey: string;
163
- pingback?: string;
164
- proxy?: string;
165
- proxytype?: string;
166
- }
167
- export interface friendlyCaptcha {
168
- pageurl: string;
169
- sitekey: string;
170
- pingback?: string;
171
- proxy?: string;
172
- proxytype?: string;
173
- }
174
- export interface paramsBoundingBox {
175
- image: string;
176
- textinstructions?: string;
177
- imginstructions?: string;
178
- }
179
- export interface paramsGrid {
180
- body: string;
181
- recaptcha: number;
182
- canvas?: number;
183
- rows?: number;
184
- cols?: number;
185
- minClicks?: number;
186
- maxClicks?: number;
187
- previousId?: string;
188
- imgType?: string;
189
- textinstructions?: string;
190
- imginstructions?: string;
191
- canSkip?: number;
192
- lang?: string;
193
- pingback?: string;
194
- }
195
- export interface paramsTextcaptcha {
196
- textcaptcha: string;
197
- lang?: string;
198
- pingback?: string;
199
- }
200
- export interface paramsRotateCaptcha {
201
- body: string;
202
- angle?: number;
203
- pingback?: string;
204
- lang?: string;
205
- textinstructions?: string;
206
- imginstructions?: string;
207
- }
208
- export interface paramsKeyCaptcha {
209
- pageurl: string;
210
- userId: string;
211
- sessionId: string;
212
- webServerSign: string;
213
- webServerSign2: string;
214
- pingback?: string;
215
- proxy?: string;
216
- proxytype?: string;
217
- }
218
- export interface paramsTencent {
219
- pageurl: string;
220
- appId: string;
221
- pingback?: string;
222
- proxy?: string;
223
- proxytype?: string;
224
- }
225
- export interface paramsAtbCaptcha {
226
- pageurl: string;
227
- appId: string;
228
- apiServer: string;
229
- pingback?: string;
230
- proxy?: string;
231
- proxytype?: string;
232
- }
233
- export interface paramsAudioCaptcha {
234
- body: string;
235
- lang: string;
236
- pingback?: string;
237
- }
238
- /**
239
- * An object containing properties of the captcha solution.
240
- * @typedef {Object} CaptchaAnswer
241
- * @param {string} data The solution to the captcha
242
- * @param {string} id The captcha ID
243
- */
244
- interface CaptchaAnswer {
245
- /** The solution to the captcha */
246
- data: string;
247
- /** The ID of the captcha solve */
248
- id: string;
249
- }
250
- /**
251
- * The main 2captcha class, housing all API calls and api interactions.
252
- *
253
- */
254
- export declare class Solver {
255
- _apikey: string;
256
- _pollingFrequency: number;
257
- _headerACAO: number;
258
- /**
259
- * The constructor for the 2captcha Solver class.
260
- *
261
- * @param {string} apikey The API key to use
262
- * @param {number} pollingFrequency The frequency to poll for requests
263
- *
264
- */
265
- constructor(apikey: string, pollingFrequency?: number, enableACAO?: boolean);
266
- /** The API key this instance is using */
267
- get apikey(): string;
268
- /** Frequency the instance polls for updates */
269
- get pollingFrequency(): number;
270
- /** Set the API key for this instance */
271
- set apikey(update: string);
272
- private get in();
273
- private get res();
274
- private get defaultPayload();
275
- /**
276
- * Returns the remaining account balance.
277
- *
278
- * @return {Promise<Number>} Remaining balance
279
- * @throws APIError
280
- * @example
281
- * solver.balance()
282
- * .then((res) => {
283
- * console.log(res)
284
- * })
285
- */
286
- balance(): Promise<number>;
287
- /**
288
- * @private
289
- *
290
- * Polls for a captcha, finding out if it's been completed
291
- * @param {string} id Captcha ID
292
- *
293
- * @returns {Promise<CaptchaAnswer>}
294
- * @throws APIError
295
- */
296
- private pollResponse;
297
- /**
298
- * ### Solves a google reCAPTCHA V2 | V3.
299
- *
300
- * [Read more about other reCAPTCHA parameters](https://2captcha.com/2captcha-api#solving_recaptchav2_new).
301
- *
302
- * @param {{pageurl, googlekey, cookies, proxy, proxytype, userAgent, invisible, datas, pingback, action, enterprise, min_score, version, domain}} params Object
303
- * @param {string} params.pageurl The URL the captcha appears on.
304
- * @param {string} params.googlekey Value of `k` or `data-sitekey` parameter you found on page.
305
- * @param {string} params.cookies Your cookies that will be passed to our worker who solve the captha.
306
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128`. You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
307
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
308
- * @param {string} params.userAgent Your `userAgent` that will be passed to our worker and used to solve the captcha.
309
- * @param {number} params.invisible `1` - means that reCAPTCHA is invisible. `0` - normal reCAPTCHA.
310
- * @param {string} params.datas Value of `data-s` parameter you found on page. Curenttly applicable for Google Search and other Google services.
311
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
312
- * @param {string} params.action Value of `action` parameter you found on page.
313
- * @param {number} params.enterprise `1` - defines that you're sending reCAPTCHA Enterpise.
314
- * @param {number} params.min_score The score needed for resolution reCAPTCHA V3. Currently it's almost impossible to get token with score higher than `0.3`
315
- * @param {string} params.version `v2` — defines that you're sending a reCAPTCHA V2. `v3` — defines that you're sending a reCAPTCHA V3.
316
- * @param {string} params.domain Domain used to load the captcha: `google.com` or `recaptcha.net`
317
- *
318
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
319
- * @throws APIError
320
- * @example
321
- * solver.recaptcha({
322
- * pageurl: 'https://2captcha.com/demo/recaptcha-v2',
323
- * googlekey: '6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u'
324
- * })
325
- * .then((res) => {
326
- * console.log(res);
327
- * })
328
- * .catch((err) => {
329
- * console.log(err);
330
- * })
331
- */
332
- recaptcha(params: paramsRecaptcha): Promise<CaptchaAnswer>;
333
- /**
334
- * ### Solves a hCaptcha
335
- *
336
- * [Read more about other hCaptcha parameters](https://2captcha.com/2captcha-api#solving_hcaptcha).
337
- *
338
- * @param {{sitekey, pageurl, data, userAgent, invisible, pingback, proxy, proxytype, domain}} params Object
339
- * @param {string} params.sitekey The hcaptcha site key. Value of `k` or `data-sitekey` parameter you found on page.
340
- * @param {string} params.pageurl The URL the captcha appears on.
341
- * @param {string} params.data Custom `data` that is used in some implementations of hCaptcha, mostly with `invisible=1`. In most cases you see it as `rqdata` inside network requests. IMPORTANT: you MUST provide `userAgent` if you submit captcha with `data` paramater. The value should match the User-Agent you use when interacting with the target website.
342
- * @param {string} params.userAgent Your userAgent that will be passed to our worker and used to solve the captcha. Required for hCaptcha with `data` parameter.
343
- * @param {number} params.invisible Use `1` for invisible version of hcaptcha. Currently it is a very rare case.
344
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. More info [here](https://2captcha.com/2captcha-api#pingback).
345
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
346
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
347
- * @param {string} params.domain Domain used to load the captcha: `hcaptcha.com` or `js.hcaptcha.com`
348
- *
349
- * @returns {Promise<CaptchaAnswer>} The result from the solve
350
- * @throws APIError
351
- * @example
352
- * solver.hcaptcha({
353
- * pageurl: "https://2captcha.com/demo/hcaptcha",
354
- * sitekey: "b76cd927-d266-4cfb-a328-3b03ae07ded6"
355
- * .then((res) => {
356
- * console.log(res);
357
- * })
358
- * .catch((err) => {
359
- * console.log(err);
360
- * })
361
- */
362
- hcaptcha(params: paramsHCaptcha): Promise<CaptchaAnswer>;
363
- /**
364
- * ### Solves a GeeTest Captcha.
365
- *
366
- * [Read more about parameters and solving for Geetest captcha](https://2captcha.com/2captcha-api#solving_geetest).
367
- *
368
- * @param {{ gt, challenge, api_server, offline, new_captcha,
369
- * pageurl, pingback, proxy, proxytype, userAgent }} params
370
- * @param {string} params.gt Value of gt parameter found on site
371
- * @param {string} params.challenge Value of challenge parameter found on site
372
- * @param {string} params.pageurl The URL the captcha appears on
373
- * @param {string} params.api_server The URL of the api_server (recommended)
374
- * @param {number} params.offline In rare cases `initGeetest` can be called with `offline` parameter on the target page. If the call uses offline: true, set the value to `1`.
375
- * @param {number} params.new_captcha In rare cases `initGeetest` can be called with `new_captcha` parameter. If the call uses `new_captcha: true`, set the value to `1`. Mostly used with offline parameter.
376
- * @param {string} params.pingback URL for `pingback` (callback) response that will be sent when captcha is solved. [More info here](https://2captcha.com/2captcha-api#pingback).
377
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128`. You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
378
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
379
- * @param {string} params.userAgent Your `userAgent` that will be passed to our worker and used to solve the captcha.
380
- *
381
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
382
- * @throws APIError
383
- * @example
384
- * ;(async () => {
385
- *
386
- * // Warning: Attention, the `challenge` value is not static but dynamic.
387
- * // You need to find the queries that makes the captcha on the page to API.
388
- * // Then you need to make request to this API and get new `challenge`.
389
- *
390
- * // For page https://rucaptcha.com/demo/geetest, api address is https://rucaptcha.com/api/v1/captcha-demo/gee-test/init-params?t=${t}
391
- * // Also note that when make request to API, the request uses the dynamic parameter `t`
392
- *
393
- * // You can read more about sending GeeTest here https://2captcha.com/2captcha-api#solving_geetest, or here https://2captcha.com/p/geetest
394
- * // In this example I solve GeeTest from page https://2captcha.com/demo/geetest
395
- *
396
- * const t = new Date().getTime()
397
- * // below i make a request to get a new `challenge`.
398
- * const response = await fetch(`https://2captcha.com/api/v1/captcha-demo/gee-test/init-params?t=${t}`)
399
- * const data = await response.json()
400
- *
401
- * const params = {
402
- * pageurl: 'https://rucaptcha.com/demo/geetest',
403
- * gt: data.gt,
404
- * challenge: data.challenge
405
- * }
406
- *
407
- * const res = await solver.geetest(params)
408
- * try {
409
- * console.log(res)
410
- * } catch (error) {
411
- * console.error(error);
412
- * }
413
- * })()
414
- */
415
- geetest(params: paramsGeetest): Promise<CaptchaAnswer>;
416
- /**
417
- * ### Solves a GeeTest V4 Captcha.
418
- *
419
- * This method accepts an object with the following fields: `pageurl`, `captcha_id`, `pingback`, `proxy`, `proxytype`, `userAgent`.
420
- * The `pageurl` and `captcha_id` fields are required.
421
- *
422
- * @param {{pageurl, captcha_id, pingback, proxy, proxytype, userAgent}} params The method geetestV4 takes arguments as an object.
423
- * @param {string} params.pageurl Full URL of the page where you see Geetest V4 captcha.
424
- * @param {string} params.captcha_id Required parameter. Value of `captcha_id` parameter you found on target website.
425
- * @param {string} params.pingback An optional param. [More info here](https://2captcha.com/2captcha-api#pingback).
426
- * @param {string} params.proxy An optional param. Format: `login:password@123.123.123.123:3128`. You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
427
- * @param {string} params.proxytype An optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
428
- * @param {string} params.userAgent An optional param. Your `userAgent` that will be passed to our worker and used to solve the captcha.
429
- *
430
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
431
- * @throws APIError
432
- * @example
433
- * solver.geetestV4({
434
- * pageurl: 'https://2captcha.com/demo/geetest-v4',
435
- * captcha_id: 'e392e1d7fd421dc63325744d5a2b9c73'
436
- * })
437
- * .then((res) => {
438
- * console.log(res)
439
- * })
440
- * .catch((err) => {
441
- * console.log(err);
442
- * })
443
- */
444
- geetestV4(params: paramsGeeTestV4): Promise<CaptchaAnswer>;
445
- /**
446
- * ### Method for sending Yandex Smart Captcha.
447
- *
448
- * This method accepts an object with the following fields: `pageurl`, `sitekey`, `pingback`, `proxy`, `proxytype`.
449
- * The `pageurl` and `sitekey` fields are required.
450
- *
451
- * @param {{pageurl, sitekey, pingback, proxy, proxytype, userAgent}} params The method takes arguments as an object.
452
- * @param {string} params.pageurl Required parameter. URL of the page where the captcha is located.
453
- * @param {string} params.sitekey Required parameter. The `sitekey` value you found on the captcha page.
454
- * @param {string} params.pingback An optional param.
455
- * @param {string} params.proxy An optional param. Format: `login:password@123.123.123.123:3128`.
456
- * @param {string} params.proxytype An optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
457
- * @param {string} params.userAgent An optional param. Your `userAgent` that will be passed to our worker and used to solve the captcha.
458
- *
459
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
460
- * @throws APIError
461
- * @example
462
- * solver.yandexSmart({
463
- * pageurl: "https://captcha-api.yandex.ru/demo",
464
- * sitekey: "FEXfAbHQsToo97VidNVk3j4dC74nGW1DgdxjtNB9"
465
- * })
466
- * .then((res) => {
467
- * console.log(res)
468
- * })
469
- * .catch((err) => {
470
- * console.log(err);
471
- * })
472
- */
473
- yandexSmart(params: yandexSmart): Promise<CaptchaAnswer>;
474
- /**
475
- * ### Solves a image-based captcha.
476
- *
477
- * [Read more about parameters for image captcha](https://2captcha.com/2captcha-api#solving_normal_captcha).
478
- *
479
- * @param {{ body,
480
- * phrase,
481
- * regsense,
482
- * numeric,
483
- * calc,
484
- * min_len,
485
- * max_len,
486
- * language,
487
- * lang,
488
- * textinstructions,
489
- * pingback }} params Extra properties to pass to 2captcha.
490
- * @param {string} params.body Base64 image data for the captcha.
491
- * @param {number} params.phrase Captcha contains two or more words? `1` - Yes. `0` - No.
492
- * @param {number} params.regsense Captcha is case sensitive? `1` - Yes. `0` - No.
493
- * @param {number} params.numeric `0` - not specified. `1` - captcha contains only numbers. `2` - captcha contains only letters. `3` - captcha contains only numbers OR only letters. `4` - captcha MUST contain both numbers AND letters.
494
- * @param {number} params.calc Does captcha require calculations? (e.g. type the result 4 + 8 = ) `1` - Yes. `0` - No.
495
- * @param {number} params.min_len `1..20` - minimal number of symbols in captcha. `0` - not specified.
496
- * @param {number} params.max_len `1..20` - maximal number of symbols in captcha. `0` - not specified.
497
- * @param {number} params.language `0` - not specified. `1` - Cyrillic captcha. `2` - Latin captcha
498
- * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
499
- * @param {string} params.textinstructions Text will be shown to worker to help him to solve the captcha correctly. For example: type red symbols only.
500
- * @param {string} params.pingback URL for `pingback` (callback) response that will be sent when captcha is solved. [More info here](https://2captcha.com/2captcha-api#pingback).
501
- *
502
- * @returns {Promise<CaptchaAnswer>} The result from the solve
503
- * @throws APIError
504
- * @example
505
- * const imageBase64 = fs.readFileSync("./tests/media/imageCaptcha_6e584.png", "base64")
506
- *
507
- * solver.imageCaptcha({
508
- * body: imageBase64,
509
- * numeric: 4,
510
- * min_len: 5,
511
- * max_len: 5
512
- * })
513
- * .then((res) => {
514
- * console.log(res);
515
- * })
516
- * .catch((err) => {
517
- * console.log(err);
518
- * })
519
- */
520
- imageCaptcha(params: paramsImageCaptcha): Promise<CaptchaAnswer>;
521
- /**
522
- * ### Solves Arkose Labs FunCaptcha.
523
- *
524
- * [Read more](https://2captcha.com/2captcha-api#solving_funcaptcha_new) about other solving and other parameters for Arkose Labs FunCaptcha.
525
- *
526
- * @param {{pageurl, publicKey, surl, data, pingback, proxy, proxytype, userAgent}} params Object
527
- * @param {string} params.publicKey The FunCaptcha Public Key
528
- * @param {string} params.pageurl The URL to the website the captcha is seen on
529
- * @param {string} params.surl The FunCaptcha Service URL (recommended)
530
- * @param {string} params.data Custom data to pass to FunCaptcha. For example: `'data': '{"blob": "foo"}'`.
531
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
532
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
533
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
534
- * @param {string} params.userAgent Your `userAgent` that will be passed to our worker and used to solve the captcha.
535
- *
536
- * @returns {Promise<CaptchaAnswer>} The result from the solve
537
- * @throws APIError
538
- *
539
- * @example
540
- * solver.funCaptcha({
541
- * pageurl: "https://funcaptcha.com/tile-game-lite-mode/fc/api/nojs/?pkey=804380F4-6844-FFA1-ED4E-5877CA1F1EA4&lang=en",
542
- * publickey: "804380F4-6844-FFA1-ED4E-5877CA1F1EA4"
543
- * })
544
- * .then((res) => {
545
- * console.log(res);
546
- * })
547
- * .catch((err) => {
548
- * console.log(err);
549
- * })
550
- */
551
- funCaptcha(params: paramsFunCaptcha): Promise<CaptchaAnswer>;
552
- /**
553
- *
554
- * ### Solves a Lemin captcha
555
- *
556
- * [Read more about other Lemin captcha parameters](https://2captcha.com/2captcha-api#lemin).
557
- *
558
- * @param {{ pageurl, captcha_id, div_id, api_server, pingback, proxy, proxytype}} params Object
559
- * @param {string} params.pageurl The URL the captcha appears on.
560
- * @param {string} params.captcha_id Value of `captcha_id` parameter you found on page.
561
- * @param {string} params.div_id Value `id` of captcha pareent `<div></div>` element.
562
- * @param {string} params.api_server The domain part of script URL you found on page. Default value: `https://api.leminnow.com/`
563
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
564
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
565
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
566
- *
567
- * @example
568
- * solver.lemin({
569
- * pageurl:'https://2captcha.com/demo/lemin',
570
- * captcha_id: 'CROPPED_3dfdd5c_d1872b526b794d83ba3b365eb15a200b',
571
- * div_id: 'lemin-cropped-captcha',
572
- * api_server: 'api.leminnow.com'
573
- * })
574
- * .then((res) => {
575
- * console.log(res);
576
- * })
577
- * .catch((err) => {
578
- * console.log(err);
579
- * })
580
- */
581
- lemin(params: paramsLemin): Promise<CaptchaAnswer>;
582
- /**
583
- *
584
- * ### Solves Amazon WAF captcha
585
- *
586
- * [Read more about "Amazon WAF" captcha](https://2captcha.com/2captcha-api#amazon-waf).
587
- *
588
- * @param {{ pageurl, sitekey, iv, context, challenge_script, captcha_script, pingback, proxy, proxytype}} params The `amazonWaf` method takes arguments as an object. Thus, the `pageurl`, `sitekey`, `iv`, `context` fields in the passed object are mandatory.
589
- * @param {string} params.pageurl Is the full `URL` of page where you were challenged by the captcha.
590
- * @param {string} params.sitekey Is a value of `key` parameter in the page source.
591
- * @param {string} params.iv Is a value of `iv` parameter in the page source.
592
- * @param {string} params.context Is a value of `context` parameter in the page source.
593
- * @param {string} params.challenge_script The source URL of `challenge.js` script on the page.
594
- * @param {string} params.captcha_script The source URL of `captcha.js` script on the page.
595
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
596
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
597
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
598
- *
599
- * @example
600
- * solver.amazonWaf({
601
- * pageurl: "https://non-existent-example.execute-api.us-east-1.amazonaws.com/latest",
602
- * sitekey: "AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AHMDLodoefdvyOnsHMRtEKQAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMUX+ZqwwuANRnZujSAgEQgDvHSxUQmVBuyUtumoW2n4ccTG7xQN1r3X/zz41qmQaYv9SSSvQrjIoDXKaUQ23tVb4ii8+uljuRdz/HPA==",
603
- * context: "9BUgmlm48F92WUoqv97a49ZuEJJ50TCk9MVr3C7WMtQ0X6flVbufM4n8mjFLmbLVAPgaQ1Jydeaja94iAS49ljb+sUNLoukWedAQZKrlY4RdbOOzvcFqmD/ZepQFS9N5w15Exr4VwnVq+HIxTsDJwRviElWCdzKDebN/mk8/eX2n7qJi5G3Riq0tdQw9+C4diFZU5E97RSeahejOAAJTDqduqW6uLw9NsjJBkDRBlRjxjn5CaMMo5pYOxYbGrM8Un1JH5DMOLeXbq1xWbC17YSEoM1cRFfTgOoc+VpCe36Ai9Kc=",
604
- * iv: "CgAHbCe2GgAAAAAj",
605
- * })
606
- * .then((res) => {
607
- * console.log(res);
608
- * })
609
- * .catch((err) => {
610
- * console.log(err);
611
- * })
612
- */
613
- amazonWaf(params: paramsAmazonWAF): Promise<CaptchaAnswer>;
614
- /**
615
- *
616
- * ### Solves Cloudflare Turnstile captcha
617
- *
618
- * [Read more about Cloudflare Turnstile captcha](https://2captcha.com/2captcha-api#turnstile).
619
- *
620
- * @param {{ pageurl, sitekey, action, data, pingback, proxy, proxytype}} params The `cloudflareTurnstile` method takes arguments as an object. Thus, the `pageurl`, `sitekey` fields in the passed object are mandatory.
621
- * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
622
- * @param {string} params.sitekey Is a value of `sitekey` parameter in the page source.
623
- * @param {string} params.action Value of optional `action` parameter you found on page.
624
- * @param {string} params.data Value of optional `data` parameter you found on page.
625
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
626
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
627
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
628
- *
629
- * @example
630
- * solver.cloudflareTurnstile({
631
- * pageurl: "https://app.nodecraft.com/login",
632
- * sitekey: "0x4AAAAAAAAkg0s3VIOD10y4"
633
- * })
634
- * .then((res) => {
635
- * console.log(res);
636
- * })
637
- * .catch((err) => {
638
- * console.log(err);
639
- * })
640
- */
641
- cloudflareTurnstile(params: paramsTurnstile): Promise<CaptchaAnswer>;
642
- /**
643
- * ### Solves a Coordinates captcha.
644
- *
645
- * @param {{ body, imginstructions, textinstructions, language, lang, pingback }} params parameters Coordinates Captcha as an object.
646
- * @param {string} params.body Base64-encoded captcha image.
647
- * @param {string} params.imginstructions Base64-encoded image with instruction for solving captcha.
648
- * @param {string} params.textinstructions Text will be shown to worker to help him to solve the captcha correctly. For example: click on all objects in red color.
649
- * @param {number} params.language `0` - not specified. `1` - Cyrillic captcha. `2` - Latin captcha
650
- * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
651
- * @param {string} params.pingback URL for `pingback` (callback) response that will be sent when captcha is solved. [More info here](https://2captcha.com/2captcha-api#pingback).
652
- *
653
- * @returns {Promise<CaptchaAnswer>} The result from the solve
654
- *
655
- * @example
656
- * const imageBase64 = fs.readFileSync("./tests/media/hCaptchaImage.jpg", "base64")
657
- *
658
- * solver.coordinates({
659
- * body: imageBase64,
660
- * textinstructions: 'Select all photos containing the boat'
661
- * })
662
- * .then((res) => {
663
- * console.log(res);
664
- * })
665
- * .catch((err) => {
666
- * console.log(err);
667
- * })
668
- */
669
- coordinates(params: paramsCoordinates): Promise<CaptchaAnswer>;
670
- /**
671
- * ### Solves Capy Puzzle captcha
672
- *
673
- * @param {{ pageurl, captchakey, api_server, version, pingback, proxy, proxytype}} params Parameters Capy Puzzle Captcha as an object.
674
- * @param {string} params.pageurl Full `URL`of the page where you see the captcha.
675
- * @param {string} params.captchakey Value of `captchakey` parameter you found on page.
676
- * @param {string} params.api_server The domain part of script URL you found on page. Default value: `https://jp.api.capy.me/`.
677
- * @param {string} params.version The version of captcha task: `puzzle` (assemble a puzzle) or `avatar` (drag an object)..
678
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
679
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
680
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
681
- *
682
- * @example
683
- * solver.capyPuzzle({
684
- * pageurl: "https://www.capy.me/account/register/",
685
- * captchakey: "PUZZLE_Cme4hZLjuZRMYC3uh14C52D3uNms5w"
686
- * })
687
- * .then((res) => {
688
- * console.log(res);
689
- * })
690
- * .catch((err) => {
691
- * console.log(err);
692
- * })
693
- */
694
- capyPuzzle(params: paramsCapyPuzzle): Promise<CaptchaAnswer>;
695
- /**
696
- * ### Solves DataDome captcha
697
- *
698
- * @param {{ pageurl, captcha_url, userAgent, pingback, proxy, proxytype}} params Parameters DataDome Captcha as an object.
699
- * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
700
- * @param {string} params.captcha_url The value of the `src` parameter for the `iframe` element containing the captcha on the page.
701
- * @param {string} params.userAgent ser-Agent of your MODERN browser
702
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
703
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
704
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
705
- *
706
- * @example
707
- * solver.dataDome({
708
- * pageurl: "https://rendezvousparis.hermes.com/client/register",
709
- * captcha_url: "https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAEuQtkf4k1c0ABZhYZA%3D%3D&hash=789361B674144528D0B7EE76B35826&cid=mY4z7GNmh7Nt1lAFwpbNHAOcWPhyPgjHD2K1Pm~Od1iEKYLUnK3t7N2ZGUj8OqDK65cnwJHtHwd~t902vlwpSBA5l4ZHbS1Qszv~jEuEUJNQ_jMAjar2Kj3kq20MRJYh&t=fe&referer=https%3A%2F%2Frendezvousparis.hermes.com%2Fclient%2Fregister&s=40119&e=67fef144ac1a54dbd7507776367d2f9d5e36ec3add17fa22f3cb881db8385838",
710
- * userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
711
- * proxy: "1.2.3.4:8888:user:password",
712
- * proxytype: "http"
713
- * })
714
- * .then((res) => {
715
- * console.log(res);
716
- * })
717
- * .catch((err) => {
718
- * console.log(err);
719
- * })
720
- */
721
- dataDome(params: paramsDataDome): Promise<CaptchaAnswer>;
722
- /**
723
- * ### Solves CyberSiARA captcha
724
- *
725
- * @param {{ pageurl, master_url_id, userAgent, pingback, proxy, proxytype}} params Parameters CyberSiARA Captcha as an object.
726
- * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
727
- * @param {string} params.master_url_id The value of `MasterUrlId` parameter obtained from the request to the endpoint `API/CyberSiara/GetCyberSiara`.
728
- * @param {string} params.userAgent ser-Agent of your MODERN browser
729
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
730
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
731
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
732
- *
733
- * @example
734
- * solver.cyberSiARA({
735
- * pageurl: "https://www.cybersiara.com/book-a-demo",
736
- * master_url_id: "OXR2LVNvCuXykkZbB8KZIfh162sNT8S2",
737
- * userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
738
- * })
739
- * .then((res) => {
740
- * console.log(res);
741
- * })
742
- * .catch((err) => {
743
- * console.log(err);
744
- * })
745
- */
746
- cyberSiARA(params: paramsCyberSiARA): Promise<CaptchaAnswer>;
747
- /**
748
- * ### Solves MTCaptcha
749
- *
750
- * @param {{ pageurl, sitekey, userAgent, pingback, proxy, proxytype}} params Parameters MTCaptcha as an object.
751
- * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
752
- * @param {string} params.sitekey TThe value of `sitekey` parameter found on the page.
753
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
754
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
755
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
756
- *
757
- * @example
758
- * solver.mtCaptcha({
759
- * pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
760
- * sitekey: "MTPublic-DemoKey9M"
761
- * })
762
- * .then((res) => {
763
- * console.log(res);
764
- * })
765
- * .catch((err) => {
766
- * console.log(err);
767
- * })
768
- */
769
- mtCaptcha(params: paramsMTCaptcha): Promise<CaptchaAnswer>;
770
- /**
771
- * ### Solves a Cutcaptcha.
772
- *
773
- * Use this method to solve Cutcaptcha. Returns the response in JSON.
774
- * [Read more about Cutcaptcha Method](https://2captcha.com/2captcha-api#cutcaptcha).
775
- *
776
- * @param {{ pageurl, miseryKey, apiKey, pingback, proxy, proxytype }} params Parameters for solving Cutcaptcha as an object.
777
- * @param {string} params.pageurl The URL where the captcha is located.
778
- * @param {string} params.miseryKey The value of `CUTCAPTCHA_MISERY_KEY` variable defined on page.
779
- * @param {string} params.apiKey The value of `data-apikey` attribute of iframe's body. Also the name of javascript file included on the page
780
- * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
781
- * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
782
- * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
783
- *
784
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
785
- * @throws APIError
786
- *
787
- * @example
788
- * solver.cutCaptcha({
789
- * pageurl: "https://mysite.com/page/with/cutcaptcha",
790
- * miseryKey: "098e6a849af406142e3150dbf4e6d0538db2b51f",
791
- * apiKey: "SAs61IAI",
792
- * })
793
- * .then((res) => {
794
- * console.log(res);
795
- * })
796
- * .catch((err) => {
797
- * console.log(err);
798
- * })
799
- */
800
- cutCaptcha(params: paramsCutcaptcha): Promise<CaptchaAnswer>;
801
- /**
802
- * ### Solves Friendly Captcha
803
- *
804
- * @param {{ pageurl, sitekey, pingback, proxy, proxytype}} params Parameters Friendly Captcha as an object.
805
- * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
806
- * @param {string} params.sitekey The value of `data-apikey` or `data-sitekey` parameter found on the page.
807
- * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
808
- * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
809
- * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
810
- *
811
- * @example
812
- * solver.friendlyCaptcha({
813
- * pageurl: "https://geizhals.de/?liftban=1&from=/455973138?fsean=5901747021356",
814
- * sitekey: "FCMST5VUMCBOCGQ9"
815
- * })
816
- * .then((res) => {
817
- * console.log(res);
818
- * })
819
- * .catch((err) => {
820
- * console.log(err);
821
- * })
822
- */
823
- friendlyCaptcha(params: friendlyCaptcha): Promise<CaptchaAnswer>;
824
- /**
825
- * ### Bounding Box Method
826
- *
827
- * @param {{ image, textinstructions, imginstructions }} params Parameters Bounding Box Method as an object.
828
- * @param {string} params.image Image containing data for markup. The image must be encoded in `Base64` format.
829
- * @param {string} params.textinstructions Text will be shown to worker to help him to select object on the image correctly. For example: "*Select cars in the image*". **Optional parameter**, if the instruction already exists in the form of the `imginstructions`.
830
- * @param {string} params.imginstructions Image with instruction for worker to help him to select object on the image correctly. The image must be encoded in `Base64` format. **Optional parameter**, if the instruction already exists in the form of the `textinstructions`.
831
- *
832
- * @example
833
- * solver.boundingBox({
834
- * image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgG...",
835
- * textinstructions: "Select cars in the image"
836
- * })
837
- * .then((res) => {
838
- * console.log(res);
839
- * })
840
- * .catch((err) => {
841
- * console.log(err);
842
- * })
843
- */
844
- boundingBox(params: paramsBoundingBox): Promise<CaptchaAnswer>;
845
- /**
846
- * ### Grid method
847
- *
848
- * The method can be used to bypass tasks where a grid is applied to an image and you need to click on grid tiles, like reCAPTCHA or hCaptcha images.
849
- *
850
- * @param {{ body, textinstructions, imginstructions, rows, cols, minClicks, maxClicks, imgType, previousId, canSkip, lang, pingback}} params Parameters Grid Method as an object.
851
- * @param {string} params.body `Base64`- encoded captcha image.
852
- * @param {string} params.textinstructions Text will be shown to worker to help him to select object on the image correctly. For example: "*Select cars in the image*". **Optional parameter**, if the instruction already exists in the form of the `imginstructions`.
853
- * @param {string} params.imginstructions Image with instruction for worker to help him to select object on the image correctly. The image must be encoded in `Base64` format. **Optional parameter**, if the instruction already exists in the form of the `textinstructions`.
854
- * @param {number} params.rows Number of rows in grid captcha.
855
- * @param {number} params.cols Number of columns in grid captcdha.
856
- * @param {number} params.minClicks The minimum number of tiles that must be selected. Can't be more than `rows` * `cols`.
857
- * @param {number} params.maxClicks The maximum number of tiles that can be selected on the image.
858
- * @param {string} params.imgType The image will be recognized using Computer Vision. Supported value options: `recaptcha`, `hcaptcha`, `funcaptcha`, `funcaptcha_compare`. [More info here](https://2captcha.com/2captcha-api#grid).
859
- * @param {string} params.previousId Id of your previous request with the same captcha challenge.
860
- * @param {number} params.canSkip Set the value to `1` only if it's possible that there's no images matching to the instruction. We'll provide a button "No matching images" to worker and you will receive `No_matching_images` as answer.
861
- * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
862
- * @param {string} params.pingback params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
863
- *
864
- * @example
865
- * solver.grid({
866
- * body: 'iVBORw0KGgoAAAANSUhEUgAAAcIA...',
867
- * textinstructions: "Select cars in the image",
868
- * imginstructions: '/9j/4AAQSkZJRgABAQEA...'
869
- * })
870
- * .then((res) => {
871
- * console.log(res);
872
- * })
873
- * .catch((err) => {
874
- * console.log(err);
875
- * })
876
- */
877
- grid(params: paramsGrid): Promise<CaptchaAnswer>;
878
- /**
879
- * ### Text Captcha method
880
- *
881
- * Text Captcha is a type of captcha that is represented as text and doesn't contain images. Usually you have to answer a question to pass the verification. For example: "If tomorrow is Saturday, what day is today?".
882
- * [Read more about Text Captcha Method](https://2captcha.com/2captcha-api#text-captcha).
883
- *
884
- * @param {{ textcaptcha, lang, pingback}} params Parameters Text Captcha Method as an object.
885
- * @param {string} params.textcaptcha Text Captcha is a type of captcha that is represented as text and doesn't contain images. Usually you have to answer a question to pass the verification.
886
- * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
887
- * @param {string} params.pingback params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
888
- *
889
- * @example
890
- * solver.text({
891
- * textcaptcha: "If tomorrow is Saturday, what day is today?",
892
- * lang: 'en'
893
- * })
894
- * .then((res) => {
895
- * console.log(res);
896
- * })
897
- * .catch((err) => {
898
- * console.log(err);
899
- * })
900
- */
901
- text(params: paramsTextcaptcha): Promise<CaptchaAnswer>;
902
- /**
903
- * ### Canvas method
904
- *
905
- * This method can be used to bypass tasks in which you need to circle an object or line in an image.
906
- * [Read more about Canvas Method](https://2captcha.com/2captcha-api#canvas).
907
- *
908
- * @param {{ body, textinstructions, imginstructions, canSkip, lang, pingback}} params Parameters Canvas as an object.
909
- * @param {string} params.body `Base64`- encoded captcha image.
910
- * @param {string} params.textinstructions Text will be shown to worker to help him to select object on the image correctly. For example: "*Select cars in the image*". **Optional parameter**, if the instruction already exists in the form of the `imginstructions`.
911
- * @param {string} params.imginstructions Image with instruction for worker to help him to select object on the image correctly. The image must be encoded in `Base64` format. **Optional parameter**, if the instruction already exists in the form of the `textinstructions`.
912
- * @param {number} params.canSkip Set the value to `1` only if it's possible that there's no images matching to the instruction. We'll provide a button "No matching images" to worker and you will receive `No_matching_images` as answer.
913
- * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
914
- * @param {string} params.pingback params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
915
- *
916
- * @example
917
- * solver.canvas({
918
- * body: 'iVBORw0KGgoAAAANSgAAAcIA...',
919
- * imginstructions: '/9j/4AAQSkZJRgABAQEA...',
920
- * textinstructions: 'Highlight the red CIRCLE'
921
- * })
922
- * .then((res) => {
923
- * console.log(res);
924
- * })
925
- * .catch((err) => {
926
- * console.log(err);
927
- * })
928
- */
929
- canvas(params: paramsGrid): Promise<CaptchaAnswer>;
930
- /**
931
- * ### Rotate method
932
- *
933
- * This method can be used to solve a captcha that asks to rotate an object. It is mostly used to bypass FunCaptcha. Returns the rotation angle.
934
- * [Read more about Rotate Method](https://2captcha.com/2captcha-api#solving_rotatecaptcha).
935
- *
936
- * @param {{ body, angle, pingback, lang, textinstructions, imginstructions }} params Parameters for solving Rotate Captcha as an object.
937
- * @param {string} params.body Base64-encoded image of the captcha that needs to be rotated.
938
- * @param {number} params.angle Angle to which the captcha needs to be rotated to solve it correctly. Value between `0` to `360`.
939
- * @param {string} params.textinstructions Optional param. Text instruction that will be shown to worker to help solve the captcha correctly.
940
- * @param {string} params.imginstructions Optional param. Base64-encoded image instruction that will be shown to worker to help solve the captcha correctly.
941
- * @param {string} params.lang Optional param. Language code for worker to use while solving the captcha.
942
- * @param {string} params.pingback Optional param. URL for pingback (callback) response when captcha is solved.
943
- *
944
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
945
- * @throws APIError
946
- *
947
- * @example
948
- * solver.rotate({
949
- * body: "iVBORw0KGgoAAAANSUhEUgAAAcIA...",
950
- * angle: 15,
951
- * textinstructions: "Rotate the object to the correct position"
952
- * })
953
- * .then((res) => {
954
- * console.log(res);
955
- * })
956
- * .catch((err) => {
957
- * console.log(err);
958
- * })
959
- */
960
- rotate(params: paramsRotateCaptcha): Promise<CaptchaAnswer>;
961
- /**
962
- * ### Solves a KeyCaptcha.
963
- *
964
- * This method can be used to solve a KeyCaptcha. It is mostly used to bypass captchas that use KeyCaptcha technology.
965
- * [Read more about KeyCaptcha Method](https://2captcha.com/2captcha-api#solving_keycaptcha).
966
- *
967
- * @param {{ pageurl, userId, sessionId, webServerSign, webServerSign2, pingback, proxy, proxytype }} params Parameters for solving KeyCaptcha as an object.
968
- * @param {string} params.pageurl The URL where the captcha is located.
969
- * @param {string} params.userId Value of `s_s_c_user_id` parameter you found on page.
970
- * @param {string} params.sessionId Value of `s_s_c_session_id` parameter you found on page.
971
- * @param {string} params.webServerSign Value of `s_s_c_web_server_sign` parameter you found on page.
972
- * @param {string} params.webServerSign2 Value of `s_s_c_web_server_sign2` parameter you found on page.
973
- * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
974
- * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
975
- * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
976
- *
977
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
978
- * @throws APIError
979
- *
980
- * @example
981
- * solver.keyCaptcha({
982
- * pageurl: "https://2captcha.com/demo/keycaptcha",
983
- * userId: "184015",
984
- * sessionId: "11975dc265ce9174a54edb1619af15b7",
985
- * webServerSign: "73ef77fd3cf0ce02947d9088bdc8412a",
986
- * webServerSign2: "93836d9e7007f38f072ce07d89bb7e2b"
987
- * })
988
- * .then((res) => {
989
- * console.log(res);
990
- * })
991
- * .catch((err) => {
992
- * console.log(err);
993
- * })
994
- */
995
- keyCaptcha(params: paramsKeyCaptcha): Promise<CaptchaAnswer>;
996
- /**
997
- * ### Solves a Tencent.
998
- *
999
- * Use this method to solve Tencent captcha. Returns a token.
1000
- * [Read more about Tencent Method](https://2captcha.com/2captcha-api#tencent).
1001
- *
1002
- * @param {{ pageurl, appId, pingback, proxy, proxytype }} params Parameters for solving Tencent as an object.
1003
- * @param {string} params.pageurl The URL where the captcha is located.
1004
- * @param {string} params.appId The value of `appId` parameter in the website source code.
1005
- * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
1006
- * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
1007
- * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1008
- *
1009
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
1010
- * @throws APIError
1011
- *
1012
- * @example
1013
- * solver.tencent({
1014
- * pageurl: "https://mysite.com/page/with/tencent",
1015
- * appId: "189956587"
1016
- * })
1017
- * .then((res) => {
1018
- * console.log(res);
1019
- * })
1020
- * .catch((err) => {
1021
- * console.log(err);
1022
- * })
1023
- */
1024
- tencent(params: paramsTencent): Promise<CaptchaAnswer>;
1025
- /**
1026
- * ### Solves a atbCAPTCHA.
1027
- *
1028
- * Use this method to solve atbCAPTCHA captcha. Returns a token.
1029
- * [Read more about atbCAPTCHA Method](https://2captcha.com/2captcha-api#atb-captcha).
1030
- *
1031
- * @param {{ pageurl, appId, apiServer, pingback, proxy, proxytype }} params Parameters for solving atbCAPTCHA as an object.
1032
- * @param {string} params.pageurl The URL where the captcha is located.
1033
- * @param {string} params.appId The value of `appId` parameter in the website source code.
1034
- * @param {string} params.apiServer The value of `apiServer` parameter in the website source code.
1035
- * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
1036
- * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
1037
- * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1038
- *
1039
- * @returns {Promise<CaptchaAnswer>} The result from the solve.
1040
- * @throws APIError
1041
- *
1042
- * @example
1043
- * solver.atbCaptcha({
1044
- * pageurl: "https://mysite.com/page/with/tencent",
1045
- * appId: "af25e409b33d722a95e56a230ff8771c",
1046
- apiServer: "https://cap.aisecurius.com"
1047
- * })
1048
- * .then((res) => {
1049
- * console.log(res);
1050
- * })
1051
- * .catch((err) => {
1052
- * console.log(err);
1053
- * })
1054
- */
1055
- atbCaptcha(params: paramsAtbCaptcha): Promise<CaptchaAnswer>;
1056
- /**
1057
- * ### Method for solving Audio captcha.
1058
- *
1059
- * Use the following method to bypass an audio captcha (`mp3` formats only). You must provide the language as `lang = 'en'`. Supported languages are "en", "ru", "de", "el", "pt", "fr".
1060
- * [Read more about Audio recognition Method](https://2captcha.com/2captcha-api#audio-recognition).
1061
- *
1062
- * @param {{ body, lang, pingback }} params Object containing parameters for the audio captcha.
1063
- * @param {string} params.body Base64 encoded audio file in `mp3` format. Max file size: 1 MB.
1064
- * @param {string} params.lang The language of audio record. Supported languages are: "en", "ru", "de", "el", "pt", "fr".
1065
- * @param {string} [params.pingback] URL for pingback response once captcha is solved.
1066
- *
1067
- * @returns {Promise<CaptchaAnswer>} The result from solving the audio captcha.
1068
- * @throws APIError
1069
- * @example
1070
- * solver.audio({
1071
- * body: "SUQzBAAAAAAAHFRTU0UAAAA...",
1072
- * lang: "en"
1073
- * })
1074
- * .then((res) => {
1075
- * console.log(res);
1076
- * })
1077
- * .catch((err) => {
1078
- * console.log(err);
1079
- * })
1080
- */
1081
- audio(params: paramsAudioCaptcha): Promise<CaptchaAnswer>;
1082
- /**
1083
- * Reports a captcha as correctly solved.
1084
- *
1085
- * @param {string} id The ID of the captcha
1086
- * @throws APIError
1087
- * @example
1088
- * solver.goodReport("7031854546")
1089
- *
1090
- */
1091
- goodReport(id: string): Promise<void>;
1092
- /**
1093
- * Report an unsuccessful solve
1094
- *
1095
- * @param {string} id The id of the captcha solve
1096
- *
1097
- * @returns {Promise<void>} Resolves on completion
1098
- * @throws APIError
1099
- * @example
1100
- * solver.badReport("7031854546")
1101
- */
1102
- badReport(id: string): Promise<void>;
1103
- }
1104
- export {};
1
+ export interface paramsRecaptcha {
2
+ pageurl: string;
3
+ googlekey: string;
4
+ invisible?: 0 | 1;
5
+ datas?: string;
6
+ domain?: string;
7
+ cookies?: string;
8
+ userAgent?: string;
9
+ header_acao?: boolean;
10
+ pingback?: string;
11
+ soft_id?: number;
12
+ proxy?: string;
13
+ proxytype?: string;
14
+ action?: string;
15
+ enterprise?: 0 | 1;
16
+ min_score?: number;
17
+ version?: string;
18
+ }
19
+ export interface paramsHCaptcha {
20
+ sitekey: string;
21
+ pageurl: string;
22
+ header_acao?: boolean;
23
+ pingback?: string;
24
+ proxy?: string;
25
+ proxytype?: string;
26
+ invisible?: 0 | 1;
27
+ data?: string;
28
+ userAgent?: string;
29
+ soft_id?: number;
30
+ domain?: string;
31
+ }
32
+ export interface paramsFunCaptcha {
33
+ publickey: string;
34
+ pageurl: string;
35
+ surl?: string;
36
+ header_acao?: boolean;
37
+ pingback?: string;
38
+ proxy?: string;
39
+ proxytype?: string;
40
+ userAgent?: string;
41
+ data?: string;
42
+ }
43
+ export interface paramsImageCaptcha {
44
+ body: string;
45
+ phrase?: 0 | 1;
46
+ regsense?: 0 | 1;
47
+ numeric?: 0 | 1 | 2 | 3 | 4;
48
+ calc?: 0 | 1;
49
+ min_len?: 0 | string | number;
50
+ max_len?: 0 | string | number;
51
+ language?: 0 | 1 | 2;
52
+ lang?: string;
53
+ pingback?: string;
54
+ textinstructions?: string;
55
+ }
56
+ export interface paramsGeetest {
57
+ gt: string;
58
+ challenge: string;
59
+ pageurl: string;
60
+ api_server?: string;
61
+ offline?: number | boolean;
62
+ new_captcha?: number | boolean;
63
+ pingback?: string;
64
+ soft_id?: number;
65
+ proxy?: string;
66
+ proxytype?: string;
67
+ userAgent?: string;
68
+ }
69
+ export interface yandexSmart {
70
+ pageurl: string;
71
+ sitekey: string;
72
+ pingback?: string;
73
+ proxy?: string;
74
+ proxytype?: string;
75
+ userAgent?: string;
76
+ }
77
+ export interface paramsGeeTestV4 {
78
+ pageurl: string;
79
+ captcha_id: string;
80
+ risk_type?: string;
81
+ pingback?: string;
82
+ proxy?: string;
83
+ proxytype?: string;
84
+ userAgent?: string;
85
+ }
86
+ export interface paramsLemin {
87
+ pageurl: string;
88
+ captcha_id: string;
89
+ div_id: string;
90
+ api_server?: string;
91
+ pingback?: string;
92
+ proxy?: string;
93
+ proxytype?: string;
94
+ }
95
+ export interface paramsAmazonWAF {
96
+ pageurl: string;
97
+ sitekey: string;
98
+ iv: string;
99
+ context: string;
100
+ challenge_script?: string;
101
+ captcha_script?: string;
102
+ header_acao?: boolean;
103
+ pingback?: string;
104
+ soft_id?: number;
105
+ proxy?: string;
106
+ proxytype?: string;
107
+ }
108
+ export interface paramsTurnstile {
109
+ pageurl: string;
110
+ sitekey: string;
111
+ action?: string;
112
+ data?: string;
113
+ header_acao?: boolean;
114
+ pingback?: string;
115
+ soft_id?: number;
116
+ proxy?: string;
117
+ proxytype?: string;
118
+ }
119
+ export interface paramsCapyPuzzle {
120
+ pageurl: string;
121
+ captchakey: string;
122
+ api_server?: string;
123
+ version?: string;
124
+ pingback?: string;
125
+ proxy?: string;
126
+ proxytype?: string;
127
+ }
128
+ export interface paramsCoordinates {
129
+ body: string;
130
+ language?: 0 | 1 | 2;
131
+ lang?: string;
132
+ pingback?: string;
133
+ textinstructions?: string;
134
+ imginstructions?: string;
135
+ }
136
+ export interface paramsDataDome {
137
+ pageurl: string;
138
+ captcha_url: string;
139
+ userAgent: string;
140
+ pingback?: string;
141
+ proxy: string;
142
+ proxytype: string;
143
+ }
144
+ export interface paramsCyberSiARA {
145
+ pageurl: string;
146
+ master_url_id: string;
147
+ userAgent: string;
148
+ pingback?: string;
149
+ proxy?: string;
150
+ proxytype?: string;
151
+ }
152
+ export interface paramsMTCaptcha {
153
+ pageurl: string;
154
+ sitekey: string;
155
+ userAgent?: string;
156
+ pingback?: string;
157
+ proxy?: string;
158
+ proxytype?: string;
159
+ }
160
+ export interface paramsCutcaptcha {
161
+ pageurl: string;
162
+ miseryKey: string;
163
+ apiKey: string;
164
+ pingback?: string;
165
+ proxy?: string;
166
+ proxytype?: string;
167
+ }
168
+ export interface friendlyCaptcha {
169
+ pageurl: string;
170
+ sitekey: string;
171
+ pingback?: string;
172
+ proxy?: string;
173
+ proxytype?: string;
174
+ }
175
+ export interface paramsBoundingBox {
176
+ image: string;
177
+ textinstructions?: string;
178
+ imginstructions?: string;
179
+ }
180
+ export interface paramsGrid {
181
+ body: string;
182
+ recaptcha: number;
183
+ canvas?: number;
184
+ rows?: number;
185
+ cols?: number;
186
+ minClicks?: number;
187
+ maxClicks?: number;
188
+ previousId?: string;
189
+ imgType?: string;
190
+ textinstructions?: string;
191
+ imginstructions?: string;
192
+ canSkip?: number;
193
+ lang?: string;
194
+ pingback?: string;
195
+ }
196
+ export interface paramsTextcaptcha {
197
+ textcaptcha: string;
198
+ lang?: string;
199
+ pingback?: string;
200
+ }
201
+ export interface paramsRotateCaptcha {
202
+ body: string;
203
+ angle?: number;
204
+ pingback?: string;
205
+ lang?: string;
206
+ textinstructions?: string;
207
+ imginstructions?: string;
208
+ }
209
+ export interface paramsKeyCaptcha {
210
+ pageurl: string;
211
+ userId: string;
212
+ sessionId: string;
213
+ webServerSign: string;
214
+ webServerSign2: string;
215
+ pingback?: string;
216
+ proxy?: string;
217
+ proxytype?: string;
218
+ }
219
+ export interface paramsTencent {
220
+ pageurl: string;
221
+ appId: string;
222
+ pingback?: string;
223
+ proxy?: string;
224
+ proxytype?: string;
225
+ }
226
+ export interface paramsAtbCaptcha {
227
+ pageurl: string;
228
+ appId: string;
229
+ apiServer: string;
230
+ pingback?: string;
231
+ proxy?: string;
232
+ proxytype?: string;
233
+ }
234
+ export interface paramsProsopo {
235
+ pageurl: string;
236
+ sitekey: string;
237
+ proxy?: string;
238
+ proxytype?: string;
239
+ }
240
+ export interface paramsCaptchaFox {
241
+ pageurl: string;
242
+ sitekey: string;
243
+ userAgent: string;
244
+ proxy: string;
245
+ proxytype: string;
246
+ }
247
+ export interface paramsVkImage {
248
+ body: string;
249
+ steps: string;
250
+ }
251
+ export interface paramsVkCaptcha {
252
+ redirect_uri: string;
253
+ userAgent: string;
254
+ proxy: string;
255
+ proxytype: string;
256
+ }
257
+ export interface paramsTemu {
258
+ body: string;
259
+ part1: string;
260
+ part2: string;
261
+ part3: string;
262
+ }
263
+ export interface paramsAudioCaptcha {
264
+ body: string;
265
+ lang: string;
266
+ pingback?: string;
267
+ }
268
+ /**
269
+ * An object containing properties of the captcha solution.
270
+ * @typedef {Object} CaptchaAnswer
271
+ * @param {string} data The solution to the captcha
272
+ * @param {string} id The captcha ID
273
+ */
274
+ interface CaptchaAnswer {
275
+ /** The solution to the captcha */
276
+ data: string;
277
+ /** The ID of the captcha solve */
278
+ id: string;
279
+ }
280
+ /**
281
+ * The main 2captcha class, housing all API calls and api interactions.
282
+ *
283
+ */
284
+ export declare class Solver {
285
+ _apikey: string;
286
+ _pollingFrequency: number;
287
+ _headerACAO: number;
288
+ /**
289
+ * The constructor for the 2captcha Solver class.
290
+ *
291
+ * @param {string} apikey The API key to use
292
+ * @param {number} pollingFrequency The frequency to poll for requests
293
+ *
294
+ */
295
+ constructor(apikey: string, pollingFrequency?: number, enableACAO?: boolean);
296
+ /** The API key this instance is using */
297
+ get apikey(): string;
298
+ /** Frequency the instance polls for updates */
299
+ get pollingFrequency(): number;
300
+ /** Set the API key for this instance */
301
+ set apikey(update: string);
302
+ private get in();
303
+ private get res();
304
+ private get defaultPayload();
305
+ /**
306
+ * Returns the remaining account balance.
307
+ *
308
+ * @return {Promise<Number>} Remaining balance
309
+ * @throws APIError
310
+ * @example
311
+ * solver.balance()
312
+ * .then((res) => {
313
+ * console.log(res)
314
+ * })
315
+ */
316
+ balance(): Promise<number>;
317
+ /**
318
+ * @private
319
+ *
320
+ * Polls for a captcha, finding out if it's been completed
321
+ * @param {string} id Captcha ID
322
+ *
323
+ * @returns {Promise<CaptchaAnswer>}
324
+ * @throws APIError
325
+ */
326
+ private pollResponse;
327
+ /**
328
+ * ### Solves a google reCAPTCHA V2 | V3.
329
+ *
330
+ * [Read more about other reCAPTCHA parameters](https://2captcha.com/2captcha-api#solving_recaptchav2_new).
331
+ *
332
+ * @param {{pageurl, googlekey, cookies, proxy, proxytype, userAgent, invisible, datas, pingback, action, enterprise, min_score, version, domain}} params Object
333
+ * @param {string} params.pageurl The URL the captcha appears on.
334
+ * @param {string} params.googlekey Value of `k` or `data-sitekey` parameter you found on page.
335
+ * @param {string} params.cookies Your cookies that will be passed to our worker who solve the captha.
336
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128`. You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
337
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
338
+ * @param {string} params.userAgent Your `userAgent` that will be passed to our worker and used to solve the captcha.
339
+ * @param {number} params.invisible `1` - means that reCAPTCHA is invisible. `0` - normal reCAPTCHA.
340
+ * @param {string} params.datas Value of `data-s` parameter you found on page. Curenttly applicable for Google Search and other Google services.
341
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
342
+ * @param {string} params.action Value of `action` parameter you found on page.
343
+ * @param {number} params.enterprise `1` - defines that you're sending reCAPTCHA Enterpise.
344
+ * @param {number} params.min_score The score needed for resolution reCAPTCHA V3. Currently it's almost impossible to get token with score higher than `0.3`
345
+ * @param {string} params.version `v2` — defines that you're sending a reCAPTCHA V2. `v3` defines that you're sending a reCAPTCHA V3.
346
+ * @param {string} params.domain Domain used to load the captcha: `google.com` or `recaptcha.net`
347
+ *
348
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
349
+ * @throws APIError
350
+ * @example
351
+ * solver.recaptcha({
352
+ * pageurl: 'https://2captcha.com/demo/recaptcha-v2',
353
+ * googlekey: '6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u'
354
+ * })
355
+ * .then((res) => {
356
+ * console.log(res);
357
+ * })
358
+ * .catch((err) => {
359
+ * console.log(err);
360
+ * })
361
+ */
362
+ recaptcha(params: paramsRecaptcha): Promise<CaptchaAnswer>;
363
+ /**
364
+ * ### Solves a hCaptcha
365
+ *
366
+ * [Read more about other hCaptcha parameters](https://2captcha.com/2captcha-api#solving_hcaptcha).
367
+ *
368
+ * @param {{sitekey, pageurl, data, userAgent, invisible, pingback, proxy, proxytype, domain}} params Object
369
+ * @param {string} params.sitekey The hcaptcha site key. Value of `k` or `data-sitekey` parameter you found on page.
370
+ * @param {string} params.pageurl The URL the captcha appears on.
371
+ * @param {string} params.data Custom `data` that is used in some implementations of hCaptcha, mostly with `invisible=1`. In most cases you see it as `rqdata` inside network requests. IMPORTANT: you MUST provide `userAgent` if you submit captcha with `data` paramater. The value should match the User-Agent you use when interacting with the target website.
372
+ * @param {string} params.userAgent Your userAgent that will be passed to our worker and used to solve the captcha. Required for hCaptcha with `data` parameter.
373
+ * @param {number} params.invisible Use `1` for invisible version of hcaptcha. Currently it is a very rare case.
374
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. More info [here](https://2captcha.com/2captcha-api#pingback).
375
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
376
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
377
+ * @param {string} params.domain Domain used to load the captcha: `hcaptcha.com` or `js.hcaptcha.com`
378
+ *
379
+ * @returns {Promise<CaptchaAnswer>} The result from the solve
380
+ * @throws APIError
381
+ * @example
382
+ * solver.hcaptcha({
383
+ * pageurl: "https://2captcha.com/demo/hcaptcha",
384
+ * sitekey: "b76cd927-d266-4cfb-a328-3b03ae07ded6"
385
+ * .then((res) => {
386
+ * console.log(res);
387
+ * })
388
+ * .catch((err) => {
389
+ * console.log(err);
390
+ * })
391
+ */
392
+ hcaptcha(params: paramsHCaptcha): Promise<CaptchaAnswer>;
393
+ /**
394
+ * ### Solves a GeeTest Captcha.
395
+ *
396
+ * [Read more about parameters and solving for Geetest captcha](https://2captcha.com/2captcha-api#solving_geetest).
397
+ *
398
+ * @param {{ gt, challenge, api_server, offline, new_captcha,
399
+ * pageurl, pingback, proxy, proxytype, userAgent }} params
400
+ * @param {string} params.gt Value of gt parameter found on site
401
+ * @param {string} params.challenge Value of challenge parameter found on site
402
+ * @param {string} params.pageurl The URL the captcha appears on
403
+ * @param {string} params.api_server The URL of the api_server (recommended)
404
+ * @param {number} params.offline In rare cases `initGeetest` can be called with `offline` parameter on the target page. If the call uses offline: true, set the value to `1`.
405
+ * @param {number} params.new_captcha In rare cases `initGeetest` can be called with `new_captcha` parameter. If the call uses `new_captcha: true`, set the value to `1`. Mostly used with offline parameter.
406
+ * @param {string} params.pingback URL for `pingback` (callback) response that will be sent when captcha is solved. [More info here](https://2captcha.com/2captcha-api#pingback).
407
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128`. You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
408
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
409
+ * @param {string} params.userAgent Your `userAgent` that will be passed to our worker and used to solve the captcha.
410
+ *
411
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
412
+ * @throws APIError
413
+ * @example
414
+ * ;(async () => {
415
+ *
416
+ * // Warning: Attention, the `challenge` value is not static but dynamic.
417
+ * // You need to find the queries that makes the captcha on the page to API.
418
+ * // Then you need to make request to this API and get new `challenge`.
419
+ *
420
+ * // For page https://rucaptcha.com/demo/geetest, api address is https://rucaptcha.com/api/v1/captcha-demo/gee-test/init-params?t=${t}
421
+ * // Also note that when make request to API, the request uses the dynamic parameter `t`
422
+ *
423
+ * // You can read more about sending GeeTest here https://2captcha.com/2captcha-api#solving_geetest, or here https://2captcha.com/p/geetest
424
+ * // In this example I solve GeeTest from page https://2captcha.com/demo/geetest
425
+ *
426
+ * const t = new Date().getTime()
427
+ * // below i make a request to get a new `challenge`.
428
+ * const response = await fetch(`https://2captcha.com/api/v1/captcha-demo/gee-test/init-params?t=${t}`)
429
+ * const data = await response.json()
430
+ *
431
+ * const params = {
432
+ * pageurl: 'https://rucaptcha.com/demo/geetest',
433
+ * gt: data.gt,
434
+ * challenge: data.challenge
435
+ * }
436
+ *
437
+ * const res = await solver.geetest(params)
438
+ * try {
439
+ * console.log(res)
440
+ * } catch (error) {
441
+ * console.error(error);
442
+ * }
443
+ * })()
444
+ */
445
+ geetest(params: paramsGeetest): Promise<CaptchaAnswer>;
446
+ /**
447
+ * ### Solves a GeeTest V4 Captcha.
448
+ *
449
+ * This method accepts an object with the following fields: `pageurl`, `captcha_id`, `pingback`, `proxy`, `proxytype`, `userAgent`.
450
+ * The `pageurl` and `captcha_id` fields are required.
451
+ *
452
+ * @param {{pageurl, captcha_id, risk_type, pingback, proxy, proxytype, userAgent}} params The method geetestV4 takes arguments as an object.
453
+ * @param {string} params.pageurl Full URL of the page where you see Geetest V4 captcha.
454
+ * @param {string} params.captcha_id Required parameter. Value of `captcha_id` parameter you found on target website.
455
+ * @param {string} params.risk_type An optional param. Value of `risk_type` parameter is contained in the captcha loading request.
456
+ * @param {string} params.pingback An optional param. [More info here](https://2captcha.com/2captcha-api#pingback).
457
+ * @param {string} params.proxy An optional param. Format: `login:password@123.123.123.123:3128`. You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
458
+ * @param {string} params.proxytype An optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
459
+ * @param {string} params.userAgent An optional param. Your `userAgent` that will be passed to our worker and used to solve the captcha.
460
+ *
461
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
462
+ * @throws APIError
463
+ * @example
464
+ * solver.geetestV4({
465
+ * pageurl: 'https://2captcha.com/demo/geetest-v4',
466
+ * captcha_id: 'e392e1d7fd421dc63325744d5a2b9c73'
467
+ * })
468
+ * .then((res) => {
469
+ * console.log(res)
470
+ * })
471
+ * .catch((err) => {
472
+ * console.log(err);
473
+ * })
474
+ */
475
+ geetestV4(params: paramsGeeTestV4): Promise<CaptchaAnswer>;
476
+ /**
477
+ * ### Method for sending Yandex Smart Captcha.
478
+ *
479
+ * This method accepts an object with the following fields: `pageurl`, `sitekey`, `pingback`, `proxy`, `proxytype`.
480
+ * The `pageurl` and `sitekey` fields are required.
481
+ *
482
+ * @param {{pageurl, sitekey, pingback, proxy, proxytype, userAgent}} params The method takes arguments as an object.
483
+ * @param {string} params.pageurl Required parameter. URL of the page where the captcha is located.
484
+ * @param {string} params.sitekey Required parameter. The `sitekey` value you found on the captcha page.
485
+ * @param {string} params.pingback An optional param.
486
+ * @param {string} params.proxy An optional param. Format: `login:password@123.123.123.123:3128`.
487
+ * @param {string} params.proxytype An optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
488
+ * @param {string} params.userAgent An optional param. Your `userAgent` that will be passed to our worker and used to solve the captcha.
489
+ *
490
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
491
+ * @throws APIError
492
+ * @example
493
+ * solver.yandexSmart({
494
+ * pageurl: "https://captcha-api.yandex.ru/demo",
495
+ * sitekey: "FEXfAbHQsToo97VidNVk3j4dC74nGW1DgdxjtNB9"
496
+ * })
497
+ * .then((res) => {
498
+ * console.log(res)
499
+ * })
500
+ * .catch((err) => {
501
+ * console.log(err);
502
+ * })
503
+ */
504
+ yandexSmart(params: yandexSmart): Promise<CaptchaAnswer>;
505
+ /**
506
+ * ### Solves a image-based captcha.
507
+ *
508
+ * [Read more about parameters for image captcha](https://2captcha.com/2captcha-api#solving_normal_captcha).
509
+ *
510
+ * @param {{ body,
511
+ * phrase,
512
+ * regsense,
513
+ * numeric,
514
+ * calc,
515
+ * min_len,
516
+ * max_len,
517
+ * language,
518
+ * lang,
519
+ * textinstructions,
520
+ * pingback }} params Extra properties to pass to 2captcha.
521
+ * @param {string} params.body Base64 image data for the captcha.
522
+ * @param {number} params.phrase Captcha contains two or more words? `1` - Yes. `0` - No.
523
+ * @param {number} params.regsense Captcha is case sensitive? `1` - Yes. `0` - No.
524
+ * @param {number} params.numeric `0` - not specified. `1` - captcha contains only numbers. `2` - captcha contains only letters. `3` - captcha contains only numbers OR only letters. `4` - captcha MUST contain both numbers AND letters.
525
+ * @param {number} params.calc Does captcha require calculations? (e.g. type the result 4 + 8 = ) `1` - Yes. `0` - No.
526
+ * @param {number} params.min_len `1..20` - minimal number of symbols in captcha. `0` - not specified.
527
+ * @param {number} params.max_len `1..20` - maximal number of symbols in captcha. `0` - not specified.
528
+ * @param {number} params.language `0` - not specified. `1` - Cyrillic captcha. `2` - Latin captcha
529
+ * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
530
+ * @param {string} params.textinstructions Text will be shown to worker to help him to solve the captcha correctly. For example: type red symbols only.
531
+ * @param {string} params.pingback URL for `pingback` (callback) response that will be sent when captcha is solved. [More info here](https://2captcha.com/2captcha-api#pingback).
532
+ *
533
+ * @returns {Promise<CaptchaAnswer>} The result from the solve
534
+ * @throws APIError
535
+ * @example
536
+ * const imageBase64 = fs.readFileSync("./tests/media/imageCaptcha_6e584.png", "base64")
537
+ *
538
+ * solver.imageCaptcha({
539
+ * body: imageBase64,
540
+ * numeric: 4,
541
+ * min_len: 5,
542
+ * max_len: 5
543
+ * })
544
+ * .then((res) => {
545
+ * console.log(res);
546
+ * })
547
+ * .catch((err) => {
548
+ * console.log(err);
549
+ * })
550
+ */
551
+ imageCaptcha(params: paramsImageCaptcha): Promise<CaptchaAnswer>;
552
+ /**
553
+ * ### Solves Arkose Labs FunCaptcha.
554
+ *
555
+ * [Read more](https://2captcha.com/2captcha-api#solving_funcaptcha_new) about other solving and other parameters for Arkose Labs FunCaptcha.
556
+ *
557
+ * @param {{pageurl, publicKey, surl, data, pingback, proxy, proxytype, userAgent}} params Object
558
+ * @param {string} params.publicKey The FunCaptcha Public Key
559
+ * @param {string} params.pageurl The URL to the website the captcha is seen on
560
+ * @param {string} params.surl The FunCaptcha Service URL (recommended)
561
+ * @param {string} params.data Custom data to pass to FunCaptcha. For example: `'data': '{"blob": "foo"}'`.
562
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
563
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
564
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
565
+ * @param {string} params.userAgent Your `userAgent` that will be passed to our worker and used to solve the captcha.
566
+ *
567
+ * @returns {Promise<CaptchaAnswer>} The result from the solve
568
+ * @throws APIError
569
+ *
570
+ * @example
571
+ * solver.funCaptcha({
572
+ * pageurl: "https://funcaptcha.com/tile-game-lite-mode/fc/api/nojs/?pkey=804380F4-6844-FFA1-ED4E-5877CA1F1EA4&lang=en",
573
+ * publickey: "804380F4-6844-FFA1-ED4E-5877CA1F1EA4"
574
+ * })
575
+ * .then((res) => {
576
+ * console.log(res);
577
+ * })
578
+ * .catch((err) => {
579
+ * console.log(err);
580
+ * })
581
+ */
582
+ funCaptcha(params: paramsFunCaptcha): Promise<CaptchaAnswer>;
583
+ /**
584
+ *
585
+ * ### Solves a Lemin captcha
586
+ *
587
+ * [Read more about other Lemin captcha parameters](https://2captcha.com/2captcha-api#lemin).
588
+ *
589
+ * @param {{ pageurl, captcha_id, div_id, api_server, pingback, proxy, proxytype}} params Object
590
+ * @param {string} params.pageurl The URL the captcha appears on.
591
+ * @param {string} params.captcha_id Value of `captcha_id` parameter you found on page.
592
+ * @param {string} params.div_id Value `id` of captcha pareent `<div></div>` element.
593
+ * @param {string} params.api_server The domain part of script URL you found on page. Default value: `https://api.leminnow.com/`
594
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
595
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
596
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
597
+ *
598
+ * @example
599
+ * solver.lemin({
600
+ * pageurl:'https://2captcha.com/demo/lemin',
601
+ * captcha_id: 'CROPPED_3dfdd5c_d1872b526b794d83ba3b365eb15a200b',
602
+ * div_id: 'lemin-cropped-captcha',
603
+ * api_server: 'api.leminnow.com'
604
+ * })
605
+ * .then((res) => {
606
+ * console.log(res);
607
+ * })
608
+ * .catch((err) => {
609
+ * console.log(err);
610
+ * })
611
+ */
612
+ lemin(params: paramsLemin): Promise<CaptchaAnswer>;
613
+ /**
614
+ *
615
+ * ### Solves Amazon WAF captcha
616
+ *
617
+ * [Read more about "Amazon WAF" captcha](https://2captcha.com/2captcha-api#amazon-waf).
618
+ *
619
+ * @param {{ pageurl, sitekey, iv, context, challenge_script, captcha_script, pingback, proxy, proxytype}} params The `amazonWaf` method takes arguments as an object. Thus, the `pageurl`, `sitekey`, `iv`, `context` fields in the passed object are mandatory.
620
+ * @param {string} params.pageurl Is the full `URL` of page where you were challenged by the captcha.
621
+ * @param {string} params.sitekey Is a value of `key` parameter in the page source.
622
+ * @param {string} params.iv Is a value of `iv` parameter in the page source.
623
+ * @param {string} params.context Is a value of `context` parameter in the page source.
624
+ * @param {string} params.challenge_script The source URL of `challenge.js` script on the page.
625
+ * @param {string} params.captcha_script The source URL of `captcha.js` script on the page.
626
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
627
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
628
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
629
+ *
630
+ * @example
631
+ * solver.amazonWaf({
632
+ * pageurl: "https://non-existent-example.execute-api.us-east-1.amazonaws.com/latest",
633
+ * sitekey: "AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AHMDLodoefdvyOnsHMRtEKQAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMUX+ZqwwuANRnZujSAgEQgDvHSxUQmVBuyUtumoW2n4ccTG7xQN1r3X/zz41qmQaYv9SSSvQrjIoDXKaUQ23tVb4ii8+uljuRdz/HPA==",
634
+ * context: "9BUgmlm48F92WUoqv97a49ZuEJJ50TCk9MVr3C7WMtQ0X6flVbufM4n8mjFLmbLVAPgaQ1Jydeaja94iAS49ljb+sUNLoukWedAQZKrlY4RdbOOzvcFqmD/ZepQFS9N5w15Exr4VwnVq+HIxTsDJwRviElWCdzKDebN/mk8/eX2n7qJi5G3Riq0tdQw9+C4diFZU5E97RSeahejOAAJTDqduqW6uLw9NsjJBkDRBlRjxjn5CaMMo5pYOxYbGrM8Un1JH5DMOLeXbq1xWbC17YSEoM1cRFfTgOoc+VpCe36Ai9Kc=",
635
+ * iv: "CgAHbCe2GgAAAAAj",
636
+ * })
637
+ * .then((res) => {
638
+ * console.log(res);
639
+ * })
640
+ * .catch((err) => {
641
+ * console.log(err);
642
+ * })
643
+ */
644
+ amazonWaf(params: paramsAmazonWAF): Promise<CaptchaAnswer>;
645
+ /**
646
+ *
647
+ * ### Solves Cloudflare Turnstile captcha
648
+ *
649
+ * [Read more about Cloudflare Turnstile captcha](https://2captcha.com/2captcha-api#turnstile).
650
+ *
651
+ * @param {{ pageurl, sitekey, action, data, pingback, proxy, proxytype}} params The `cloudflareTurnstile` method takes arguments as an object. Thus, the `pageurl`, `sitekey` fields in the passed object are mandatory.
652
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
653
+ * @param {string} params.sitekey Is a value of `sitekey` parameter in the page source.
654
+ * @param {string} params.action Value of optional `action` parameter you found on page.
655
+ * @param {string} params.data Value of optional `data` parameter you found on page.
656
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
657
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
658
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
659
+ *
660
+ * @example
661
+ * solver.cloudflareTurnstile({
662
+ * pageurl: "https://app.nodecraft.com/login",
663
+ * sitekey: "0x4AAAAAAAAkg0s3VIOD10y4"
664
+ * })
665
+ * .then((res) => {
666
+ * console.log(res);
667
+ * })
668
+ * .catch((err) => {
669
+ * console.log(err);
670
+ * })
671
+ */
672
+ cloudflareTurnstile(params: paramsTurnstile): Promise<CaptchaAnswer>;
673
+ /**
674
+ * ### Solves a Coordinates captcha.
675
+ *
676
+ * @param {{ body, imginstructions, textinstructions, language, lang, pingback }} params parameters Coordinates Captcha as an object.
677
+ * @param {string} params.body Base64-encoded captcha image.
678
+ * @param {string} params.imginstructions Base64-encoded image with instruction for solving captcha.
679
+ * @param {string} params.textinstructions Text will be shown to worker to help him to solve the captcha correctly. For example: click on all objects in red color.
680
+ * @param {number} params.language `0` - not specified. `1` - Cyrillic captcha. `2` - Latin captcha
681
+ * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
682
+ * @param {string} params.pingback URL for `pingback` (callback) response that will be sent when captcha is solved. [More info here](https://2captcha.com/2captcha-api#pingback).
683
+ *
684
+ * @returns {Promise<CaptchaAnswer>} The result from the solve
685
+ *
686
+ * @example
687
+ * const imageBase64 = fs.readFileSync("./tests/media/hCaptchaImage.jpg", "base64")
688
+ *
689
+ * solver.coordinates({
690
+ * body: imageBase64,
691
+ * textinstructions: 'Select all photos containing the boat'
692
+ * })
693
+ * .then((res) => {
694
+ * console.log(res);
695
+ * })
696
+ * .catch((err) => {
697
+ * console.log(err);
698
+ * })
699
+ */
700
+ coordinates(params: paramsCoordinates): Promise<CaptchaAnswer>;
701
+ /**
702
+ * ### Solves Capy Puzzle captcha
703
+ *
704
+ * @param {{ pageurl, captchakey, api_server, version, pingback, proxy, proxytype}} params Parameters Capy Puzzle Captcha as an object.
705
+ * @param {string} params.pageurl Full `URL`of the page where you see the captcha.
706
+ * @param {string} params.captchakey Value of `captchakey` parameter you found on page.
707
+ * @param {string} params.api_server The domain part of script URL you found on page. Default value: `https://jp.api.capy.me/`.
708
+ * @param {string} params.version The version of captcha task: `puzzle` (assemble a puzzle) or `avatar` (drag an object)..
709
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
710
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
711
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
712
+ *
713
+ * @example
714
+ * solver.capyPuzzle({
715
+ * pageurl: "https://www.capy.me/account/register/",
716
+ * captchakey: "PUZZLE_Cme4hZLjuZRMYC3uh14C52D3uNms5w"
717
+ * })
718
+ * .then((res) => {
719
+ * console.log(res);
720
+ * })
721
+ * .catch((err) => {
722
+ * console.log(err);
723
+ * })
724
+ */
725
+ capyPuzzle(params: paramsCapyPuzzle): Promise<CaptchaAnswer>;
726
+ /**
727
+ * ### Solves DataDome captcha
728
+ *
729
+ * @param {{ pageurl, captcha_url, userAgent, pingback, proxy, proxytype}} params Parameters DataDome Captcha as an object.
730
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
731
+ * @param {string} params.captcha_url The value of the `src` parameter for the `iframe` element containing the captcha on the page.
732
+ * @param {string} params.userAgent ser-Agent of your MODERN browser
733
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
734
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
735
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
736
+ *
737
+ * @example
738
+ * solver.dataDome({
739
+ * pageurl: "https://rendezvousparis.hermes.com/client/register",
740
+ * captcha_url: "https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAEuQtkf4k1c0ABZhYZA%3D%3D&hash=789361B674144528D0B7EE76B35826&cid=mY4z7GNmh7Nt1lAFwpbNHAOcWPhyPgjHD2K1Pm~Od1iEKYLUnK3t7N2ZGUj8OqDK65cnwJHtHwd~t902vlwpSBA5l4ZHbS1Qszv~jEuEUJNQ_jMAjar2Kj3kq20MRJYh&t=fe&referer=https%3A%2F%2Frendezvousparis.hermes.com%2Fclient%2Fregister&s=40119&e=67fef144ac1a54dbd7507776367d2f9d5e36ec3add17fa22f3cb881db8385838",
741
+ * userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
742
+ * proxy: "1.2.3.4:8888:user:password",
743
+ * proxytype: "http"
744
+ * })
745
+ * .then((res) => {
746
+ * console.log(res);
747
+ * })
748
+ * .catch((err) => {
749
+ * console.log(err);
750
+ * })
751
+ */
752
+ dataDome(params: paramsDataDome): Promise<CaptchaAnswer>;
753
+ /**
754
+ * ### Solves CyberSiARA captcha
755
+ *
756
+ * @param {{ pageurl, master_url_id, userAgent, pingback, proxy, proxytype}} params Parameters CyberSiARA Captcha as an object.
757
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
758
+ * @param {string} params.master_url_id The value of `MasterUrlId` parameter obtained from the request to the endpoint `API/CyberSiara/GetCyberSiara`.
759
+ * @param {string} params.userAgent ser-Agent of your MODERN browser
760
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
761
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
762
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
763
+ *
764
+ * @example
765
+ * solver.cyberSiARA({
766
+ * pageurl: "https://www.cybersiara.com/book-a-demo",
767
+ * master_url_id: "OXR2LVNvCuXykkZbB8KZIfh162sNT8S2",
768
+ * userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
769
+ * })
770
+ * .then((res) => {
771
+ * console.log(res);
772
+ * })
773
+ * .catch((err) => {
774
+ * console.log(err);
775
+ * })
776
+ */
777
+ cyberSiARA(params: paramsCyberSiARA): Promise<CaptchaAnswer>;
778
+ /**
779
+ * ### Solves MTCaptcha
780
+ *
781
+ * @param {{ pageurl, sitekey, userAgent, pingback, proxy, proxytype}} params Parameters MTCaptcha as an object.
782
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
783
+ * @param {string} params.sitekey TThe value of `sitekey` parameter found on the page.
784
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
785
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
786
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
787
+ *
788
+ * @example
789
+ * solver.mtCaptcha({
790
+ * pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
791
+ * sitekey: "MTPublic-DemoKey9M"
792
+ * })
793
+ * .then((res) => {
794
+ * console.log(res);
795
+ * })
796
+ * .catch((err) => {
797
+ * console.log(err);
798
+ * })
799
+ */
800
+ mtCaptcha(params: paramsMTCaptcha): Promise<CaptchaAnswer>;
801
+ /**
802
+ * ### Solves a Cutcaptcha.
803
+ *
804
+ * Use this method to solve Cutcaptcha. Returns the response in JSON.
805
+ * [Read more about Cutcaptcha Method](https://2captcha.com/2captcha-api#cutcaptcha).
806
+ *
807
+ * @param {{ pageurl, miseryKey, apiKey, pingback, proxy, proxytype }} params Parameters for solving Cutcaptcha as an object.
808
+ * @param {string} params.pageurl The URL where the captcha is located.
809
+ * @param {string} params.miseryKey The value of `CUTCAPTCHA_MISERY_KEY` variable defined on page.
810
+ * @param {string} params.apiKey The value of `data-apikey` attribute of iframe's body. Also the name of javascript file included on the page
811
+ * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
812
+ * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
813
+ * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
814
+ *
815
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
816
+ * @throws APIError
817
+ *
818
+ * @example
819
+ * solver.cutCaptcha({
820
+ * pageurl: "https://mysite.com/page/with/cutcaptcha",
821
+ * miseryKey: "098e6a849af406142e3150dbf4e6d0538db2b51f",
822
+ * apiKey: "SAs61IAI",
823
+ * })
824
+ * .then((res) => {
825
+ * console.log(res);
826
+ * })
827
+ * .catch((err) => {
828
+ * console.log(err);
829
+ * })
830
+ */
831
+ cutCaptcha(params: paramsCutcaptcha): Promise<CaptchaAnswer>;
832
+ /**
833
+ * ### Solves Friendly Captcha
834
+ *
835
+ * @param {{ pageurl, sitekey, pingback, proxy, proxytype}} params Parameters Friendly Captcha as an object.
836
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
837
+ * @param {string} params.sitekey The value of `data-apikey` or `data-sitekey` parameter found on the page.
838
+ * @param {string} params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
839
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
840
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
841
+ *
842
+ * @example
843
+ * solver.friendlyCaptcha({
844
+ * pageurl: "https://geizhals.de/?liftban=1&from=/455973138?fsean=5901747021356",
845
+ * sitekey: "FCMST5VUMCBOCGQ9"
846
+ * })
847
+ * .then((res) => {
848
+ * console.log(res);
849
+ * })
850
+ * .catch((err) => {
851
+ * console.log(err);
852
+ * })
853
+ */
854
+ friendlyCaptcha(params: friendlyCaptcha): Promise<CaptchaAnswer>;
855
+ /**
856
+ * ### Bounding Box Method
857
+ *
858
+ * @param {{ image, textinstructions, imginstructions }} params Parameters Bounding Box Method as an object.
859
+ * @param {string} params.image Image containing data for markup. The image must be encoded in `Base64` format.
860
+ * @param {string} params.textinstructions Text will be shown to worker to help him to select object on the image correctly. For example: "*Select cars in the image*". **Optional parameter**, if the instruction already exists in the form of the `imginstructions`.
861
+ * @param {string} params.imginstructions Image with instruction for worker to help him to select object on the image correctly. The image must be encoded in `Base64` format. **Optional parameter**, if the instruction already exists in the form of the `textinstructions`.
862
+ *
863
+ * @example
864
+ * solver.boundingBox({
865
+ * image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgG...",
866
+ * textinstructions: "Select cars in the image"
867
+ * })
868
+ * .then((res) => {
869
+ * console.log(res);
870
+ * })
871
+ * .catch((err) => {
872
+ * console.log(err);
873
+ * })
874
+ */
875
+ boundingBox(params: paramsBoundingBox): Promise<CaptchaAnswer>;
876
+ /**
877
+ * ### Grid method
878
+ *
879
+ * The method can be used to bypass tasks where a grid is applied to an image and you need to click on grid tiles, like reCAPTCHA or hCaptcha images.
880
+ *
881
+ * @param {{ body, textinstructions, imginstructions, rows, cols, minClicks, maxClicks, imgType, previousId, canSkip, lang, pingback}} params Parameters Grid Method as an object.
882
+ * @param {string} params.body `Base64`- encoded captcha image.
883
+ * @param {string} params.textinstructions Text will be shown to worker to help him to select object on the image correctly. For example: "*Select cars in the image*". **Optional parameter**, if the instruction already exists in the form of the `imginstructions`.
884
+ * @param {string} params.imginstructions Image with instruction for worker to help him to select object on the image correctly. The image must be encoded in `Base64` format. **Optional parameter**, if the instruction already exists in the form of the `textinstructions`.
885
+ * @param {number} params.rows Number of rows in grid captcha.
886
+ * @param {number} params.cols Number of columns in grid captcdha.
887
+ * @param {number} params.minClicks The minimum number of tiles that must be selected. Can't be more than `rows` * `cols`.
888
+ * @param {number} params.maxClicks The maximum number of tiles that can be selected on the image.
889
+ * @param {string} params.imgType The image will be recognized using Computer Vision. Supported value options: `recaptcha`, `hcaptcha`, `funcaptcha`, `funcaptcha_compare`. [More info here](https://2captcha.com/2captcha-api#grid).
890
+ * @param {string} params.previousId Id of your previous request with the same captcha challenge.
891
+ * @param {number} params.canSkip Set the value to `1` only if it's possible that there's no images matching to the instruction. We'll provide a button "No matching images" to worker and you will receive `No_matching_images` as answer.
892
+ * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
893
+ * @param {string} params.pingback params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
894
+ *
895
+ * @example
896
+ * solver.grid({
897
+ * body: 'iVBORw0KGgoAAAANSUhEUgAAAcIA...',
898
+ * textinstructions: "Select cars in the image",
899
+ * imginstructions: '/9j/4AAQSkZJRgABAQEA...'
900
+ * })
901
+ * .then((res) => {
902
+ * console.log(res);
903
+ * })
904
+ * .catch((err) => {
905
+ * console.log(err);
906
+ * })
907
+ */
908
+ grid(params: paramsGrid): Promise<CaptchaAnswer>;
909
+ /**
910
+ * ### Text Captcha method
911
+ *
912
+ * Text Captcha is a type of captcha that is represented as text and doesn't contain images. Usually you have to answer a question to pass the verification. For example: "If tomorrow is Saturday, what day is today?".
913
+ * [Read more about Text Captcha Method](https://2captcha.com/2captcha-api#text-captcha).
914
+ *
915
+ * @param {{ textcaptcha, lang, pingback}} params Parameters Text Captcha Method as an object.
916
+ * @param {string} params.textcaptcha Text Captcha is a type of captcha that is represented as text and doesn't contain images. Usually you have to answer a question to pass the verification.
917
+ * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
918
+ * @param {string} params.pingback params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
919
+ *
920
+ * @example
921
+ * solver.text({
922
+ * textcaptcha: "If tomorrow is Saturday, what day is today?",
923
+ * lang: 'en'
924
+ * })
925
+ * .then((res) => {
926
+ * console.log(res);
927
+ * })
928
+ * .catch((err) => {
929
+ * console.log(err);
930
+ * })
931
+ */
932
+ text(params: paramsTextcaptcha): Promise<CaptchaAnswer>;
933
+ /**
934
+ * ### Canvas method
935
+ *
936
+ * This method can be used to bypass tasks in which you need to circle an object or line in an image.
937
+ * [Read more about Canvas Method](https://2captcha.com/2captcha-api#canvas).
938
+ *
939
+ * @param {{ body, textinstructions, imginstructions, canSkip, lang, pingback}} params Parameters Canvas as an object.
940
+ * @param {string} params.body `Base64`- encoded captcha image.
941
+ * @param {string} params.textinstructions Text will be shown to worker to help him to select object on the image correctly. For example: "*Select cars in the image*". **Optional parameter**, if the instruction already exists in the form of the `imginstructions`.
942
+ * @param {string} params.imginstructions Image with instruction for worker to help him to select object on the image correctly. The image must be encoded in `Base64` format. **Optional parameter**, if the instruction already exists in the form of the `textinstructions`.
943
+ * @param {number} params.canSkip Set the value to `1` only if it's possible that there's no images matching to the instruction. We'll provide a button "No matching images" to worker and you will receive `No_matching_images` as answer.
944
+ * @param {string} params.lang Language code. [See the list of supported languages](https://2captcha.com/2captcha-api#language).
945
+ * @param {string} params.pingback params.pingback URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. [More info here](https://2captcha.com/2captcha-api#pingback).
946
+ *
947
+ * @example
948
+ * solver.canvas({
949
+ * body: 'iVBORw0KGgoAAAANSgAAAcIA...',
950
+ * imginstructions: '/9j/4AAQSkZJRgABAQEA...',
951
+ * textinstructions: 'Highlight the red CIRCLE'
952
+ * })
953
+ * .then((res) => {
954
+ * console.log(res);
955
+ * })
956
+ * .catch((err) => {
957
+ * console.log(err);
958
+ * })
959
+ */
960
+ canvas(params: paramsGrid): Promise<CaptchaAnswer>;
961
+ /**
962
+ * ### Rotate method
963
+ *
964
+ * This method can be used to solve a captcha that asks to rotate an object. It is mostly used to bypass FunCaptcha. Returns the rotation angle.
965
+ * [Read more about Rotate Method](https://2captcha.com/2captcha-api#solving_rotatecaptcha).
966
+ *
967
+ * @param {{ body, angle, pingback, lang, textinstructions, imginstructions }} params Parameters for solving Rotate Captcha as an object.
968
+ * @param {string} params.body Base64-encoded image of the captcha that needs to be rotated.
969
+ * @param {number} params.angle Angle to which the captcha needs to be rotated to solve it correctly. Value between `0` to `360`.
970
+ * @param {string} params.textinstructions Optional param. Text instruction that will be shown to worker to help solve the captcha correctly.
971
+ * @param {string} params.imginstructions Optional param. Base64-encoded image instruction that will be shown to worker to help solve the captcha correctly.
972
+ * @param {string} params.lang Optional param. Language code for worker to use while solving the captcha.
973
+ * @param {string} params.pingback Optional param. URL for pingback (callback) response when captcha is solved.
974
+ *
975
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
976
+ * @throws APIError
977
+ *
978
+ * @example
979
+ * solver.rotate({
980
+ * body: "iVBORw0KGgoAAAANSUhEUgAAAcIA...",
981
+ * angle: 15,
982
+ * textinstructions: "Rotate the object to the correct position"
983
+ * })
984
+ * .then((res) => {
985
+ * console.log(res);
986
+ * })
987
+ * .catch((err) => {
988
+ * console.log(err);
989
+ * })
990
+ */
991
+ rotate(params: paramsRotateCaptcha): Promise<CaptchaAnswer>;
992
+ /**
993
+ * ### Solves a KeyCaptcha.
994
+ *
995
+ * This method can be used to solve a KeyCaptcha. It is mostly used to bypass captchas that use KeyCaptcha technology.
996
+ * [Read more about KeyCaptcha Method](https://2captcha.com/2captcha-api#solving_keycaptcha).
997
+ *
998
+ * @param {{ pageurl, userId, sessionId, webServerSign, webServerSign2, pingback, proxy, proxytype }} params Parameters for solving KeyCaptcha as an object.
999
+ * @param {string} params.pageurl The URL where the captcha is located.
1000
+ * @param {string} params.userId Value of `s_s_c_user_id` parameter you found on page.
1001
+ * @param {string} params.sessionId Value of `s_s_c_session_id` parameter you found on page.
1002
+ * @param {string} params.webServerSign Value of `s_s_c_web_server_sign` parameter you found on page.
1003
+ * @param {string} params.webServerSign2 Value of `s_s_c_web_server_sign2` parameter you found on page.
1004
+ * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
1005
+ * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
1006
+ * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1007
+ *
1008
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
1009
+ * @throws APIError
1010
+ *
1011
+ * @example
1012
+ * solver.keyCaptcha({
1013
+ * pageurl: "https://2captcha.com/demo/keycaptcha",
1014
+ * userId: "184015",
1015
+ * sessionId: "11975dc265ce9174a54edb1619af15b7",
1016
+ * webServerSign: "73ef77fd3cf0ce02947d9088bdc8412a",
1017
+ * webServerSign2: "93836d9e7007f38f072ce07d89bb7e2b"
1018
+ * })
1019
+ * .then((res) => {
1020
+ * console.log(res);
1021
+ * })
1022
+ * .catch((err) => {
1023
+ * console.log(err);
1024
+ * })
1025
+ */
1026
+ keyCaptcha(params: paramsKeyCaptcha): Promise<CaptchaAnswer>;
1027
+ /**
1028
+ * ### Solves a Tencent.
1029
+ *
1030
+ * Use this method to solve Tencent captcha. Returns a token.
1031
+ * [Read more about Tencent Method](https://2captcha.com/2captcha-api#tencent).
1032
+ *
1033
+ * @param {{ pageurl, appId, pingback, proxy, proxytype }} params Parameters for solving Tencent as an object.
1034
+ * @param {string} params.pageurl The URL where the captcha is located.
1035
+ * @param {string} params.appId The value of `appId` parameter in the website source code.
1036
+ * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
1037
+ * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
1038
+ * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1039
+ *
1040
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
1041
+ * @throws APIError
1042
+ *
1043
+ * @example
1044
+ * solver.tencent({
1045
+ * pageurl: "https://mysite.com/page/with/tencent",
1046
+ * appId: "189956587"
1047
+ * })
1048
+ * .then((res) => {
1049
+ * console.log(res);
1050
+ * })
1051
+ * .catch((err) => {
1052
+ * console.log(err);
1053
+ * })
1054
+ */
1055
+ tencent(params: paramsTencent): Promise<CaptchaAnswer>;
1056
+ /**
1057
+ * ### Solves a atbCAPTCHA.
1058
+ *
1059
+ * Use this method to solve atbCAPTCHA captcha. Returns a token.
1060
+ * [Read more about atbCAPTCHA Method](https://2captcha.com/2captcha-api#atb-captcha).
1061
+ *
1062
+ * @param {{ pageurl, appId, apiServer, pingback, proxy, proxytype }} params Parameters for solving atbCAPTCHA as an object.
1063
+ * @param {string} params.pageurl The URL where the captcha is located.
1064
+ * @param {string} params.appId The value of `appId` parameter in the website source code.
1065
+ * @param {string} params.apiServer The value of `apiServer` parameter in the website source code.
1066
+ * @param {string} [params.pingback] Optional param. URL for pingback (callback) response when captcha is solved.
1067
+ * @param {string} [params.proxy] Optional param. Proxy to use while solving the captcha. Format: `login:password@123.123.123.123:3128`.
1068
+ * @param {string} [params.proxytype] Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1069
+ *
1070
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
1071
+ * @throws APIError
1072
+ *
1073
+ * @example
1074
+ * solver.atbCaptcha({
1075
+ * pageurl: "https://mysite.com/page/with/tencent",
1076
+ * appId: "af25e409b33d722a95e56a230ff8771c",
1077
+ apiServer: "https://cap.aisecurius.com"
1078
+ * })
1079
+ * .then((res) => {
1080
+ * console.log(res);
1081
+ * })
1082
+ * .catch((err) => {
1083
+ * console.log(err);
1084
+ * })
1085
+ */
1086
+ atbCaptcha(params: paramsAtbCaptcha): Promise<CaptchaAnswer>;
1087
+ /**
1088
+ * ### Solves Prosopo
1089
+ *
1090
+ * Use this method to solve Prosopo. Returns a token.
1091
+ * [Read more about Prosopo Method](https://2captcha.com/2captcha-api#prosopo-procaptcha).
1092
+ *
1093
+ * @param {{ pageurl, sitekey, proxy, proxytype}} params Parameters Prosopo as an object.
1094
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
1095
+ * @param {string} params.sitekey The value of `data-apikey` or `data-sitekey` parameter found on the page.
1096
+ * @param {string} params.proxy Optional param. Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
1097
+ * @param {string} params.proxytype Optional param. Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1098
+ *
1099
+ * @example
1100
+ * solver.prosopo({
1101
+ * pageurl: "https://geizhals.de/?liftban=1&from=/455973138?fsean=5901747021356",
1102
+ * sitekey: "FCMST5VUMCBOCGQ9"
1103
+ * })
1104
+ * .then((res) => {
1105
+ * console.log(res);
1106
+ * })
1107
+ * .catch((err) => {
1108
+ * console.log(err);
1109
+ * })
1110
+ */
1111
+ prosopo(params: paramsProsopo): Promise<CaptchaAnswer>;
1112
+ /**
1113
+ * ### Solves CaptchaFox
1114
+ *
1115
+ * Use this method to solve CaptchaFox. Returns a token.
1116
+ * [Read more about CaptchaFox Method](https://2captcha.com/2captcha-api#captchafox).
1117
+ *
1118
+ * @param {{ pageurl, sitekey, userAgent, proxy, proxytype}} params Parameters CaptchaFox as an object.
1119
+ * @param {string} params.pageurl Full `URL` of the page where you see the captcha.
1120
+ * @param {string} params.sitekey The value of `sitekey` parameter found on the page.
1121
+ * @param {string} params.userAgent User-Agent of your MODERN browser
1122
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
1123
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1124
+ *
1125
+ * @example
1126
+ * solver.captchaFox({
1127
+ * pageurl: "https://mysite.com/page/with/captchafox",
1128
+ * sitekey: "sk_ILKWN...",
1129
+ * userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit...",
1130
+ * proxy: "login:password@1.2.3.4:8888",
1131
+ * proxytype: "HTTP"
1132
+ * })
1133
+ * .then((res) => {
1134
+ * console.log(res);
1135
+ * })
1136
+ * .catch((err) => {
1137
+ * console.log(err);
1138
+ * })
1139
+ */
1140
+ captchaFox(params: paramsCaptchaFox): Promise<CaptchaAnswer>;
1141
+ /**
1142
+ * ### VkImage method
1143
+ *
1144
+ * This method can be used to solve a captcha VkImage. Returns the number of steps and solution value in the target site's API format.
1145
+ * [Read more about VkImage Method](https://2captcha.com/2captcha-api#vkcaptcha).
1146
+ *
1147
+ * @param {{ body, steps }} params Parameters for solving VkImage Captcha.
1148
+ * @param {string} params.body Captcha image as a base64 string.
1149
+ * @param {string} params.steps Array of steps.
1150
+ *
1151
+ * @returns {Promise<CaptchaAnswer>} The result from the solve.
1152
+ * @throws APIError
1153
+ *
1154
+ * @example
1155
+ * solver.vkimage({
1156
+ * body: "iVBORw0KGgoAAAANSUhEUgAAAcIA...",
1157
+ * steps: "[5,19,4,3,23,8,20,4,18,10,6,10,5,12,13,18,9,14,9,15,12,19,3,12,...]",
1158
+ * })
1159
+ * .then((res) => {
1160
+ * console.log(res);
1161
+ * })
1162
+ * .catch((err) => {
1163
+ * console.log(err);
1164
+ * })
1165
+ */
1166
+ vkimage(params: paramsVkImage): Promise<CaptchaAnswer>;
1167
+ /**
1168
+ * ### Solves VkCaptcha
1169
+ *
1170
+ * This method can be used to solve VK Captcha using a token. Returns a token.
1171
+ * [Read more about VkCaptcha Method](https://2captcha.com/2captcha-api#vkcaptcha).
1172
+ *
1173
+ * @param {{ redirect_uri, userAgent, proxy, proxytype}} params Parameters VkCaptcha as an object.
1174
+ * @param {string} params.redirect_uri The URL that is returned for requests to the captchas API.
1175
+ * @param {string} params.userAgent User-Agent of your MODERN browser
1176
+ * @param {string} params.proxy Format: `login:password@123.123.123.123:3128` You can find more info about proxies [here](https://2captcha.com/2captcha-api#proxies).
1177
+ * @param {string} params.proxytype Type of your proxy: `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`.
1178
+ *
1179
+ * @example
1180
+ * solver.vkcaptcha({
1181
+ * redirect_uri: "https://id.vk.com/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBM...",
1182
+ * userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit...",
1183
+ * proxy: "login:password@1.2.3.4:8888",
1184
+ * proxytype: "HTTP"
1185
+ * })
1186
+ * .then((res) => {
1187
+ * console.log(res);
1188
+ * })
1189
+ * .catch((err) => {
1190
+ * console.log(err);
1191
+ * })
1192
+ */
1193
+ vkcaptcha(params: paramsVkCaptcha): Promise<CaptchaAnswer>;
1194
+ /**
1195
+ * ### Solves Temu
1196
+ *
1197
+ * This method can be used to solve Temu captcha. Returns a coordinates.
1198
+ * [Read more about Temu Method](https://2captcha.com/2captcha-api#temucaptcha).
1199
+ *
1200
+ * @param {{ body, part1, part2, part3}} params Parameters Temu as an object.
1201
+ * @param {string} params.body Main captcha image as a base64 string.
1202
+ * @param {string} params.part1 Tile element as a base64 string.
1203
+ * @param {string} params.part2 Tile element as a base64 string.
1204
+ * @param {string} params.part3 Tile element as a base64 string.
1205
+ *
1206
+ * @example
1207
+ * solver.temu({
1208
+ * body: "data:image/png;base64,iVBORw0KG...",
1209
+ * part1: "data:image/png;base64,iVBORw0KG...",
1210
+ * part2: "data:image/png;base64,iVBORw0KG...",
1211
+ * part3: "data:image/png;base64,iVBORw0KG..."
1212
+ * })
1213
+ * .then((res) => {
1214
+ * console.log(res);
1215
+ * })
1216
+ * .catch((err) => {
1217
+ * console.log(err);
1218
+ * })
1219
+ */
1220
+ temu(params: paramsTemu): Promise<CaptchaAnswer>;
1221
+ /**
1222
+ * ### Method for solving Audio captcha.
1223
+ *
1224
+ * Use the following method to bypass an audio captcha (`mp3` formats only). You must provide the language as `lang = 'en'`. Supported languages are "en", "ru", "de", "el", "pt", "fr".
1225
+ * [Read more about Audio recognition Method](https://2captcha.com/2captcha-api#audio-recognition).
1226
+ *
1227
+ * @param {{ body, lang, pingback }} params Object containing parameters for the audio captcha.
1228
+ * @param {string} params.body Base64 encoded audio file in `mp3` format. Max file size: 1 MB.
1229
+ * @param {string} params.lang The language of audio record. Supported languages are: "en", "ru", "de", "el", "pt", "fr".
1230
+ * @param {string} [params.pingback] URL for pingback response once captcha is solved.
1231
+ *
1232
+ * @returns {Promise<CaptchaAnswer>} The result from solving the audio captcha.
1233
+ * @throws APIError
1234
+ * @example
1235
+ * solver.audio({
1236
+ * body: "SUQzBAAAAAAAHFRTU0UAAAA...",
1237
+ * lang: "en"
1238
+ * })
1239
+ * .then((res) => {
1240
+ * console.log(res);
1241
+ * })
1242
+ * .catch((err) => {
1243
+ * console.log(err);
1244
+ * })
1245
+ */
1246
+ audio(params: paramsAudioCaptcha): Promise<CaptchaAnswer>;
1247
+ /**
1248
+ * Reports a captcha as correctly solved.
1249
+ *
1250
+ * @param {string} id The ID of the captcha
1251
+ * @throws APIError
1252
+ * @example
1253
+ * solver.goodReport("7031854546")
1254
+ *
1255
+ */
1256
+ goodReport(id: string): Promise<void>;
1257
+ /**
1258
+ * Report an unsuccessful solve
1259
+ *
1260
+ * @param {string} id The id of the captcha solve
1261
+ *
1262
+ * @returns {Promise<void>} Resolves on completion
1263
+ * @throws APIError
1264
+ * @example
1265
+ * solver.badReport("7031854546")
1266
+ */
1267
+ badReport(id: string): Promise<void>;
1268
+ }
1269
+ export {};
1105
1270
  //# sourceMappingURL=2captcha.d.ts.map