@2captcha/captcha-solver 1.3.0 → 1.3.1

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