@apifreaks/openapi-specs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +44663 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +44631 -0
- package/package.json +81 -0
- package/specs/commodity/commodity-fluctuation.json +301 -0
- package/specs/commodity/commodity-prices.json +317 -0
- package/specs/commodity/commodity-symbols.json +215 -0
- package/specs/commodity/commodity-time-series.json +329 -0
- package/specs/commodity/historical-commodity-prices.json +273 -0
- package/specs/currency/currency-converter.json +261 -0
- package/specs/currency/currency-fluctuation.json +282 -0
- package/specs/currency/currency-historical-data-limit.json +158 -0
- package/specs/currency/currency-rate.json +229 -0
- package/specs/currency/currency-supported.json +234 -0
- package/specs/currency/currency-symbols.json +161 -0
- package/specs/currency/currency-time-series.json +325 -0
- package/specs/currency/geolocalized-currency-conversion.json +287 -0
- package/specs/currency/historical-currency-converter.json +269 -0
- package/specs/currency/historical-currency-rate.json +246 -0
- package/specs/dns/bulk-dns-lookup.json +624 -0
- package/specs/dns/dns-history-lookup.json +579 -0
- package/specs/dns/dns-lookup.json +466 -0
- package/specs/dns/reverse-dns-lookup.json +414 -0
- package/specs/domain/bulk-domain-checker.json +284 -0
- package/specs/domain/domain-search-with-suggestions.json +280 -0
- package/specs/domain/domain-search.json +206 -0
- package/specs/domain/subdomain-lookup.json +343 -0
- package/specs/email-validation/bulk-email-validation.json +534 -0
- package/specs/email-validation/email-checker.json +586 -0
- package/specs/financial/bulk-vat-rates-country.json +341 -0
- package/specs/financial/financial-apis-supported-countries.json +204 -0
- package/specs/financial/iban-validation.json +328 -0
- package/specs/financial/swift-code-finder.json +192 -0
- package/specs/financial/swift-code-lookup.json +220 -0
- package/specs/financial/vat-number-validation.json +283 -0
- package/specs/financial/vat-rates-by-ip.json +275 -0
- package/specs/financial/vat-rates-country.json +288 -0
- package/specs/general/usage-credits.json +218 -0
- package/specs/geocoding/forward-geocoding.json +402 -0
- package/specs/geocoding/reverse-geocoding.json +326 -0
- package/specs/geodb/administrative-units-details.json +250 -0
- package/specs/geodb/administrative-units-levels.json +198 -0
- package/specs/geodb/administrative-units.json +237 -0
- package/specs/geodb/cities.json +288 -0
- package/specs/geodb/countries-details.json +274 -0
- package/specs/geodb/countries.json +276 -0
- package/specs/geodb/flags-supported.json +166 -0
- package/specs/geodb/flags.json +227 -0
- package/specs/geodb/regions.json +109 -0
- package/specs/geodb/subregions.json +217 -0
- package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
- package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
- package/specs/ip-intelligence/ip-locator.json +941 -0
- package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
- package/specs/other/astronomy-data.json +803 -0
- package/specs/pdf/delete-pdf-page.json +286 -0
- package/specs/pdf/linearize-pdf.json +277 -0
- package/specs/pdf/merge-pdf.json +285 -0
- package/specs/pdf/pdf-compress.json +304 -0
- package/specs/pdf/pdf-decrypt.json +297 -0
- package/specs/pdf/pdf-encrypt.json +314 -0
- package/specs/pdf/pdf-extract-pages.json +295 -0
- package/specs/pdf/pdf-file-status.json +208 -0
- package/specs/pdf/pdf-file.json +190 -0
- package/specs/pdf/pdf-files.json +126 -0
- package/specs/pdf/pdf-resource-download.json +168 -0
- package/specs/pdf/pdf-resource-upload-binary.json +218 -0
- package/specs/pdf/pdf-resource-upload.json +248 -0
- package/specs/pdf/pdf-restrict.json +343 -0
- package/specs/pdf/pdf-split-pages.json +281 -0
- package/specs/pdf/pdf-task-status.json +252 -0
- package/specs/pdf/pdf-to-image.json +1219 -0
- package/specs/pdf/pdf-unrestrict.json +324 -0
- package/specs/pdf/rotate-pdf-pages.json +305 -0
- package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
- package/specs/phone-validation/phone-number-validation.json +456 -0
- package/specs/scraper/web-scraper.json +674 -0
- package/specs/screenshot/bulk-screenshot.json +949 -0
- package/specs/screenshot/website-screenshot.json +1147 -0
- package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
- package/specs/ssl/ssl-certificate-lookup.json +634 -0
- package/specs/timezone/timezone-converter.json +362 -0
- package/specs/timezone/timezone-lookup.json +910 -0
- package/specs/user-agent/bulk-user-agent-parser.json +441 -0
- package/specs/user-agent/user-agent-parser.json +346 -0
- package/specs/weather/air-quality.json +779 -0
- package/specs/weather/bulk-live-weather.json +834 -0
- package/specs/weather/flood-forecast.json +693 -0
- package/specs/weather/historical-weather.json +1019 -0
- package/specs/weather/live-weather.json +789 -0
- package/specs/weather/marine-weather.json +940 -0
- package/specs/weather/time-series-weather.json +1056 -0
- package/specs/weather/weather-forecast.json +1202 -0
- package/specs/whois/asn-lookup.json +729 -0
- package/specs/whois/bulk-whois-lookup.json +698 -0
- package/specs/whois/domain-whois-history-lookup.json +500 -0
- package/specs/whois/reverse-whois.json +625 -0
- package/specs/whois/whois-domain-lookup.json +533 -0
- package/specs/whois/whois-ip-lookup.json +1110 -0
- package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
- package/specs/zip-code/zip-code-api.json +299 -0
- package/specs/zip-code/zip-code-distance-match.json +311 -0
- package/specs/zip-code/zip-code-distance.json +307 -0
- package/specs/zip-code/zip-codes-by-city.json +279 -0
- package/specs/zip-code/zip-codes-by-region.json +278 -0
- package/specs/zip-code/zip-codes-radius-search.json +349 -0
|
@@ -0,0 +1,674 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Web Scraper API - JavaScript Rendering, Proxy Rotation & CAPTCHA Solving",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Executes a sequence of scraping instructions against a target URL and returns the extracted data. Two modes are available via the `jsEnabled` query parameter: `jsEnabled=true` renders the page in a real browser and supports `fill`, `click`, `wait`, iframe switching, image/audio CAPTCHA solving, and other interactive instructions, plus request-level `blockUrl` and `cookies`; `jsEnabled=false` fetches static HTML and supports `postForm`, `getForm`, `getPage`, and `extract`. Every mode's response is an `extractedData` object keyed by the field names used in your `extract` instructions --- each value is a string when its selector matched exactly one element, or an array of strings when it matched more than one; a selector that matches nothing is omitted from the response entirely. The `text` query parameter strips HTML tags from extracted values; under `jsEnabled=true`, single-element matches are always returned as plain text regardless of `text`, while multi-element matches keep tags unless `text=true` is set.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "Web Scraper API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/scraping": {
|
|
21
|
+
"post": {
|
|
22
|
+
"tags": ["Scraping APIs"],
|
|
23
|
+
"summary": "Execute a sequence of web scraping instructions against a target URL",
|
|
24
|
+
"description": "Runs form-filling, clicking, data-extraction, and CAPTCHA-solving instructions against a target URL and returns the extracted data. Behavior and available instructions depend on the jsEnabled query parameter.",
|
|
25
|
+
"operationId": "performScraping",
|
|
26
|
+
"parameters": [
|
|
27
|
+
{
|
|
28
|
+
"name": "url",
|
|
29
|
+
"in": "query",
|
|
30
|
+
"required": true,
|
|
31
|
+
"description": "Target URL to scrape.",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "uri"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "text",
|
|
39
|
+
"in": "query",
|
|
40
|
+
"required": false,
|
|
41
|
+
"description": "Set to true to strip HTML tags from extracted values (plain text). Set to false to keep HTML tags. Default is false. Under jsEnabled=true, single-element matches are always plain text regardless of this flag.",
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "jsEnabled",
|
|
49
|
+
"in": "query",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "Set to true to render the page in a real browser for dynamic/JavaScript-driven pages (enables fill, click, wait, CAPTCHA-solving, and related instructions). Set to false to fetch static HTML only (enables postForm, getForm, getPage, extract). Default is false.",
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "proxy",
|
|
59
|
+
"in": "query",
|
|
60
|
+
"required": false,
|
|
61
|
+
"description": "Use a proxy for the request. Pass true/false to toggle the default proxy pool, or a proxy URL string to use a specific proxy.",
|
|
62
|
+
"schema": {
|
|
63
|
+
"oneOf": [
|
|
64
|
+
{
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "sslIgnore",
|
|
75
|
+
"in": "query",
|
|
76
|
+
"required": false,
|
|
77
|
+
"description": "Set to true to ignore SSL certificate errors on the target site. Only works when jsEnabled is true.",
|
|
78
|
+
"schema": {
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "windowSize",
|
|
84
|
+
"in": "query",
|
|
85
|
+
"required": false,
|
|
86
|
+
"description": "Browser window size in the format 'width,height' (e.g. '1920,1080'). Only works when jsEnabled is true.",
|
|
87
|
+
"schema": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "adBlock",
|
|
93
|
+
"in": "query",
|
|
94
|
+
"required": false,
|
|
95
|
+
"description": "Set to true to block ads on the target page. Only works when jsEnabled is true.",
|
|
96
|
+
"schema": {
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "captcha",
|
|
102
|
+
"in": "query",
|
|
103
|
+
"required": false,
|
|
104
|
+
"description": "Set to true to allow CAPTCHA-solving instructions (generalImageCaptcha, fillImageCaptcha, resolveAudioCaptcha) in the request body. Only works when jsEnabled is true.",
|
|
105
|
+
"schema": {
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"requestBody": {
|
|
111
|
+
"required": false,
|
|
112
|
+
"description": "The request body shape depends on the jsEnabled query parameter, not on any field inside the body itself. Pass jsEnabled=true for the interactive/browser instruction set (JsEnabledTrueBody: fill, click, wait, blockUrl, cookies, CAPTCHA solving, and more). Pass jsEnabled=false (or omit it) for the static-HTML instruction set (JsEnabledFalseBody: postForm, getForm, getPage, extract). instructions is an ordered array executed sequentially.",
|
|
113
|
+
"content": {
|
|
114
|
+
"application/json": {
|
|
115
|
+
"schema": {
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{
|
|
118
|
+
"$ref": "#/components/schemas/JsEnabledTrueBody"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"$ref": "#/components/schemas/JsEnabledFalseBody"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"examples": {
|
|
126
|
+
"jsEnabledTrue": {
|
|
127
|
+
"summary": "Example body for jsEnabled=true (fill, click, wait, extract)",
|
|
128
|
+
"value": {
|
|
129
|
+
"blockUrl": [
|
|
130
|
+
"https://example.com/ads.js",
|
|
131
|
+
"https://tracker.example.com/*"
|
|
132
|
+
],
|
|
133
|
+
"cookies": [
|
|
134
|
+
{
|
|
135
|
+
"name": "sessionid",
|
|
136
|
+
"value": "abc123"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"instructions": [
|
|
140
|
+
{
|
|
141
|
+
"fill": {
|
|
142
|
+
"place": "#username",
|
|
143
|
+
"value": "myuser"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"fill": {
|
|
148
|
+
"place": "#password",
|
|
149
|
+
"value": "mypassword"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"click": "input[type=submit]"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"wait": 1000
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"extract": {
|
|
160
|
+
"pageTitle": "title",
|
|
161
|
+
"welcomeText": "h1"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"jsEnabledFalse": {
|
|
168
|
+
"summary": "Example body for jsEnabled=false (extract only)",
|
|
169
|
+
"value": {
|
|
170
|
+
"instructions": [
|
|
171
|
+
{
|
|
172
|
+
"extract": {
|
|
173
|
+
"pageTitle": "title",
|
|
174
|
+
"paragraphs": "p"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"responses": {
|
|
185
|
+
"200": {
|
|
186
|
+
"description": "Successful scraping operation",
|
|
187
|
+
"content": {
|
|
188
|
+
"application/json": {
|
|
189
|
+
"schema": {
|
|
190
|
+
"$ref": "#/components/schemas/ScrapingResponse"
|
|
191
|
+
},
|
|
192
|
+
"examples": {
|
|
193
|
+
"jsEnabledFalseResult": {
|
|
194
|
+
"summary": "Static HTML extract (jsEnabled=false)",
|
|
195
|
+
"value": {
|
|
196
|
+
"extractedData": {
|
|
197
|
+
"pageTitle": "<title>Example Domain</title>",
|
|
198
|
+
"paragraphs": [
|
|
199
|
+
"<p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p>",
|
|
200
|
+
"<p><a href=\"https://iana.org/domains/example\">Learn more</a></p>"
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"jsEnabledTrueResult": {
|
|
206
|
+
"summary": "Rendered-page extract with a single-match and a multi-match field (jsEnabled=true)",
|
|
207
|
+
"value": {
|
|
208
|
+
"extractedData": {
|
|
209
|
+
"firstQuote": "“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”",
|
|
210
|
+
"authors": [
|
|
211
|
+
"<small class=\"author\" itemprop=\"author\">Albert Einstein</small>",
|
|
212
|
+
"<small class=\"author\" itemprop=\"author\">J.K. Rowling</small>",
|
|
213
|
+
"<small class=\"author\" itemprop=\"author\">Albert Einstein</small>",
|
|
214
|
+
"<small class=\"author\" itemprop=\"author\">Jane Austen</small>",
|
|
215
|
+
"<small class=\"author\" itemprop=\"author\">Marilyn Monroe</small>",
|
|
216
|
+
"<small class=\"author\" itemprop=\"author\">Albert Einstein</small>",
|
|
217
|
+
"<small class=\"author\" itemprop=\"author\">André Gide</small>",
|
|
218
|
+
"<small class=\"author\" itemprop=\"author\">Thomas A. Edison</small>",
|
|
219
|
+
"<small class=\"author\" itemprop=\"author\">Eleanor Roosevelt</small>",
|
|
220
|
+
"<small class=\"author\" itemprop=\"author\">Steve Martin</small>"
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"400": {
|
|
230
|
+
"description": "Bad Request — Missing/invalid parameters, malformed request body, unparseable selectors, or the target URL could not be fetched",
|
|
231
|
+
"content": {
|
|
232
|
+
"application/json": {
|
|
233
|
+
"schema": {
|
|
234
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
235
|
+
},
|
|
236
|
+
"examples": {
|
|
237
|
+
"missingOrInvalidParams": {
|
|
238
|
+
"summary": "Missing or invalid url parameter",
|
|
239
|
+
"value": {
|
|
240
|
+
"error": "Invalid Param Exception",
|
|
241
|
+
"message": "please pass correct parameters",
|
|
242
|
+
"path": "/v1.0/scraping",
|
|
243
|
+
"status": 400,
|
|
244
|
+
"timestamp": "2026-07-23T11:50:14.427Z"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"malformedRequestBody": {
|
|
248
|
+
"summary": "Malformed JSON request body",
|
|
249
|
+
"value": {
|
|
250
|
+
"timestamp": "2026-07-23T11:47:47.907+00:00",
|
|
251
|
+
"status": 400,
|
|
252
|
+
"error": "JSON Parse Error",
|
|
253
|
+
"message": "Invalid or malformed JSON. Please check your request body format and ensure it's valid JSON.",
|
|
254
|
+
"path": "/v1/scraping/params"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"missingInstructions": {
|
|
258
|
+
"summary": "Empty or missing instructions body",
|
|
259
|
+
"value": {
|
|
260
|
+
"timestamp": "2026-07-23T11:47:54.568+00:00",
|
|
261
|
+
"status": 400,
|
|
262
|
+
"error": "Bad Request",
|
|
263
|
+
"message": "Arguments are missing or wrong",
|
|
264
|
+
"path": "/v1/scraping/params"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"invalidSelector": {
|
|
268
|
+
"summary": "Unparseable CSS or XPath selector",
|
|
269
|
+
"value": {
|
|
270
|
+
"timestamp": "2026-07-23T11:50:15.539+00:00",
|
|
271
|
+
"status": 400,
|
|
272
|
+
"error": "Bad Request",
|
|
273
|
+
"message": "Check the Css Selectors or Xpath, Some of them are wrong",
|
|
274
|
+
"path": "/v1/scraping/params"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"targetUnreachable": {
|
|
278
|
+
"summary": "Target URL could not be reached (DNS/connection failure)",
|
|
279
|
+
"value": {
|
|
280
|
+
"timestamp": "2026-07-23T11:50:16.120+00:00",
|
|
281
|
+
"status": 400,
|
|
282
|
+
"error": "IO Exception",
|
|
283
|
+
"message": "Error while reading the datathisdomaindoesnotexist12345xyz.com",
|
|
284
|
+
"path": "/v1/scraping/params"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"targetNonOkStatus": {
|
|
288
|
+
"summary": "Target URL returned a non-200 HTTP response",
|
|
289
|
+
"value": {
|
|
290
|
+
"timestamp": "2026-07-23T11:50:26.224+00:00",
|
|
291
|
+
"status": 400,
|
|
292
|
+
"error": "Bad Request",
|
|
293
|
+
"message": "Check the url or links",
|
|
294
|
+
"path": "/v1/scraping/params"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"404": {
|
|
302
|
+
"description": "Not Found — Wrong HTTP method or path used against this endpoint",
|
|
303
|
+
"content": {
|
|
304
|
+
"application/json": {
|
|
305
|
+
"schema": {
|
|
306
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
307
|
+
},
|
|
308
|
+
"examples": {
|
|
309
|
+
"wrongMethodOrPath": {
|
|
310
|
+
"summary": "Endpoint called with a non-POST method",
|
|
311
|
+
"value": {
|
|
312
|
+
"error": "Resource Not Found",
|
|
313
|
+
"message": "The requested resource could not be found. Please verify the URL and try again.",
|
|
314
|
+
"path": "/v1.0/scraping",
|
|
315
|
+
"status": 404,
|
|
316
|
+
"timestamp": "2026-07-23T11:51:33.926Z"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"components": {
|
|
328
|
+
"securitySchemes": {
|
|
329
|
+
"ApiKeyAuthHeader": {
|
|
330
|
+
"type": "apiKey",
|
|
331
|
+
"in": "header",
|
|
332
|
+
"name": "X-apiKey",
|
|
333
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
334
|
+
},
|
|
335
|
+
"ApiKeyAuthQuery": {
|
|
336
|
+
"type": "apiKey",
|
|
337
|
+
"in": "query",
|
|
338
|
+
"name": "apiKey",
|
|
339
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"schemas": {
|
|
343
|
+
"JsEnabledTrueBody": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"description": "Request body for jsEnabled=true: renders the page in a real browser and supports interactive instructions.",
|
|
346
|
+
"properties": {
|
|
347
|
+
"blockUrl": {
|
|
348
|
+
"type": "array",
|
|
349
|
+
"items": {
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"description": "List of script or URL patterns to block during network requests."
|
|
353
|
+
},
|
|
354
|
+
"cookies": {
|
|
355
|
+
"type": "array",
|
|
356
|
+
"items": {
|
|
357
|
+
"$ref": "#/components/schemas/Cookie"
|
|
358
|
+
},
|
|
359
|
+
"description": "List of cookies to be set in the browser session."
|
|
360
|
+
},
|
|
361
|
+
"instructions": {
|
|
362
|
+
"type": "array",
|
|
363
|
+
"description": "An ordered list of step-by-step scraping instructions to be executed in the browser. Each item is one Instruction object, with exactly one action field set.",
|
|
364
|
+
"items": {
|
|
365
|
+
"$ref": "#/components/schemas/Instruction"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"Instruction": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"description": "A single browser scraping step. Exactly one of these action fields is set per instruction; every other field is absent.",
|
|
373
|
+
"properties": {
|
|
374
|
+
"fill": {
|
|
375
|
+
"$ref": "#/components/schemas/PlaceValue",
|
|
376
|
+
"description": "Fill action: fills an input field with a value using a CSS or XPath selector."
|
|
377
|
+
},
|
|
378
|
+
"click": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "Click action: CSS selector or XPath identifying the element to click."
|
|
381
|
+
},
|
|
382
|
+
"clickIfExist": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"description": "Click if exists action: CSS selector or XPath identifying the element to click, only if it appears on the page within a short timeout."
|
|
385
|
+
},
|
|
386
|
+
"enter": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"description": "Enter key action: CSS selector or XPath identifying the element to send an Enter keystroke to."
|
|
389
|
+
},
|
|
390
|
+
"newTab": {
|
|
391
|
+
"type": "boolean",
|
|
392
|
+
"description": "New tab action: set to true to switch focus to a newly opened browser tab."
|
|
393
|
+
},
|
|
394
|
+
"moveToRelativeTab": {
|
|
395
|
+
"type": "integer",
|
|
396
|
+
"description": "Move to relative tab action: relative tab index to move to (e.g. 1 for the next tab, -1 for the previous tab)."
|
|
397
|
+
},
|
|
398
|
+
"wait": {
|
|
399
|
+
"type": "integer",
|
|
400
|
+
"description": "Wait action: pauses execution for this many milliseconds."
|
|
401
|
+
},
|
|
402
|
+
"waitFor": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"description": "Wait for element action: CSS selector or XPath identifying the element to wait for before continuing."
|
|
405
|
+
},
|
|
406
|
+
"select": {
|
|
407
|
+
"$ref": "#/components/schemas/PlaceValue",
|
|
408
|
+
"description": "Select dropdown action: selects an option from a dropdown element by selector and matching value."
|
|
409
|
+
},
|
|
410
|
+
"jsExe": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"description": "Execute JavaScript action: JavaScript code to execute inside the page context."
|
|
413
|
+
},
|
|
414
|
+
"conditionalCheck": {
|
|
415
|
+
"type": "array",
|
|
416
|
+
"description": "Conditional check action: list of conditional steps, each supporting if-<method> and else-<method> keys with conditions, executed based on element state.",
|
|
417
|
+
"items": {
|
|
418
|
+
"type": "object",
|
|
419
|
+
"description": "A single conditional step, supporting if-<method> and else-<method> keys with conditions."
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"clickButtonByValue": {
|
|
423
|
+
"$ref": "#/components/schemas/PlaceValue",
|
|
424
|
+
"description": "Click button by value action: clicks a button that matches a specific text or value attribute."
|
|
425
|
+
},
|
|
426
|
+
"generalImageCaptcha": {
|
|
427
|
+
"type": "array",
|
|
428
|
+
"description": "Image captcha solver action: instructions for solving image-based captchas using a selected model.",
|
|
429
|
+
"items": {
|
|
430
|
+
"$ref": "#/components/schemas/ImageCaptchaInstruction"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"blockElement": {
|
|
434
|
+
"type": "array",
|
|
435
|
+
"description": "Block element action: list of CSS selectors or XPaths for elements to block or hide on the page.",
|
|
436
|
+
"items": {
|
|
437
|
+
"type": "string"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"extract": {
|
|
441
|
+
"$ref": "#/components/schemas/ExtractInstruction",
|
|
442
|
+
"description": "Extract data action: defines what data to extract and how, keyed by whatever field names you choose."
|
|
443
|
+
},
|
|
444
|
+
"fillImageCaptcha": {
|
|
445
|
+
"type": "array",
|
|
446
|
+
"description": "Fill image captcha action: captures and fills image-based captcha values automatically.",
|
|
447
|
+
"items": {
|
|
448
|
+
"$ref": "#/components/schemas/ImageCaptchaInstruction"
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"switchToIframe": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"description": "Switch to iframe action: switches the browser context into an iframe identified by name or ID."
|
|
454
|
+
},
|
|
455
|
+
"switchToParentFrame": {
|
|
456
|
+
"type": "boolean",
|
|
457
|
+
"description": "Switch to parent frame action: returns the browser context from an iframe back to its parent frame."
|
|
458
|
+
},
|
|
459
|
+
"resolveAudioCaptcha": {
|
|
460
|
+
"$ref": "#/components/schemas/AudioCaptchaInstruction",
|
|
461
|
+
"description": "Resolve audio captcha action: solves audio-based captcha challenges and fills the resolved text into the target field."
|
|
462
|
+
},
|
|
463
|
+
"screenshot": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"description": "Screenshot action: captures a screenshot of the current page state. Can be a boolean-like value or a selector."
|
|
466
|
+
},
|
|
467
|
+
"saveimage": {
|
|
468
|
+
"type": "string",
|
|
469
|
+
"description": "Save image action: saves an image from the page by CSS selector or element ID."
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"Cookie": {
|
|
474
|
+
"type": "object",
|
|
475
|
+
"description": "A single cookie to set in the browser session before running instructions.",
|
|
476
|
+
"required": ["name", "value"],
|
|
477
|
+
"properties": {
|
|
478
|
+
"name": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"description": "Cookie name."
|
|
481
|
+
},
|
|
482
|
+
"value": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"description": "Cookie value."
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"PlaceValue": {
|
|
489
|
+
"type": "object",
|
|
490
|
+
"description": "A selector/value pair used by fill, select, and clickButtonByValue instructions.",
|
|
491
|
+
"required": ["place", "value"],
|
|
492
|
+
"properties": {
|
|
493
|
+
"place": {
|
|
494
|
+
"type": "string",
|
|
495
|
+
"description": "CSS or XPath selector identifying the target element."
|
|
496
|
+
},
|
|
497
|
+
"value": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"description": "Value to fill, select, or match against."
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"ImageCaptchaInstruction": {
|
|
504
|
+
"type": "object",
|
|
505
|
+
"description": "Instructions for locating and solving a single image CAPTCHA challenge.",
|
|
506
|
+
"properties": {
|
|
507
|
+
"imagePath": {
|
|
508
|
+
"type": "string",
|
|
509
|
+
"description": "Selector for the CAPTCHA image element."
|
|
510
|
+
},
|
|
511
|
+
"textField": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"description": "Selector for the field where the CAPTCHA text is entered."
|
|
514
|
+
},
|
|
515
|
+
"imageUpdatePath": {
|
|
516
|
+
"type": "string",
|
|
517
|
+
"description": "Selector to refresh or update the CAPTCHA image."
|
|
518
|
+
},
|
|
519
|
+
"captchaFailedPath": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"description": "Selector indicating a CAPTCHA failure so the solver can retry."
|
|
522
|
+
},
|
|
523
|
+
"model": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"description": "Model used for CAPTCHA solving.",
|
|
526
|
+
"enum": [
|
|
527
|
+
"Model_1",
|
|
528
|
+
"Model_2",
|
|
529
|
+
"Model_3",
|
|
530
|
+
"Model_4",
|
|
531
|
+
"Model_5",
|
|
532
|
+
"Model_6",
|
|
533
|
+
"basicTnImageProcessing",
|
|
534
|
+
"basicPhImageProcessing"
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"AudioCaptchaInstruction": {
|
|
540
|
+
"type": "object",
|
|
541
|
+
"description": "Selectors for locating and solving a single audio CAPTCHA challenge.",
|
|
542
|
+
"properties": {
|
|
543
|
+
"audioPath": {
|
|
544
|
+
"type": "string",
|
|
545
|
+
"description": "Selector for the audio CAPTCHA element."
|
|
546
|
+
},
|
|
547
|
+
"textField": {
|
|
548
|
+
"type": "string",
|
|
549
|
+
"description": "Selector for the field where the resolved audio CAPTCHA text is entered."
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"ExtractInstruction": {
|
|
554
|
+
"type": "object",
|
|
555
|
+
"description": "Maps arbitrary output field names to CSS or XPath selectors. Each key becomes a field in the response's extractedData object.",
|
|
556
|
+
"additionalProperties": {
|
|
557
|
+
"title": "SelectorForField",
|
|
558
|
+
"type": "string",
|
|
559
|
+
"description": "CSS selector or XPath identifying the element(s) to extract for this output field. Example: 'h1' or '/html/body/div/div[2]'."
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"JsEnabledFalseBody": {
|
|
563
|
+
"type": "object",
|
|
564
|
+
"description": "Request body for jsEnabled=false (or omitted): fetches static HTML only, no browser rendering.",
|
|
565
|
+
"properties": {
|
|
566
|
+
"instructions": {
|
|
567
|
+
"type": "array",
|
|
568
|
+
"description": "A list of sequential instructions to execute against the static HTML response. Each item is one StaticInstruction object, with exactly one action field set.",
|
|
569
|
+
"items": {
|
|
570
|
+
"$ref": "#/components/schemas/StaticInstruction"
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"StaticInstruction": {
|
|
576
|
+
"type": "object",
|
|
577
|
+
"description": "A single static-HTML scraping step. Exactly one of these action fields is set per instruction; every other field is absent.",
|
|
578
|
+
"properties": {
|
|
579
|
+
"postForm": {
|
|
580
|
+
"$ref": "#/components/schemas/FormSubmission",
|
|
581
|
+
"description": "POST form action: submits a form using the POST method. Provide the form's XPath/CSS selector and input values."
|
|
582
|
+
},
|
|
583
|
+
"getForm": {
|
|
584
|
+
"$ref": "#/components/schemas/FormSubmission",
|
|
585
|
+
"description": "GET form action: submits a form using the GET method. Provide the form's XPath/CSS selector and input values."
|
|
586
|
+
},
|
|
587
|
+
"extract": {
|
|
588
|
+
"$ref": "#/components/schemas/ExtractInstruction",
|
|
589
|
+
"description": "Extract data action: defines what data to extract and how, keyed by whatever field names you choose."
|
|
590
|
+
},
|
|
591
|
+
"getPage": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"description": "Get page action: retrieves the full page content. Optionally provide a URL or selector to target a specific page."
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"FormSubmission": {
|
|
598
|
+
"type": "object",
|
|
599
|
+
"description": "Form selector and field values to submit via postForm or getForm.",
|
|
600
|
+
"properties": {
|
|
601
|
+
"selector": {
|
|
602
|
+
"type": "string",
|
|
603
|
+
"description": "CSS or XPath selector identifying the form element."
|
|
604
|
+
},
|
|
605
|
+
"data": {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"description": "Form field name/value pairs to submit.",
|
|
608
|
+
"additionalProperties": {
|
|
609
|
+
"title": "FormFieldValue",
|
|
610
|
+
"type": "string",
|
|
611
|
+
"description": "Value to submit for this form field."
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"ScrapingResponse": {
|
|
617
|
+
"type": "object",
|
|
618
|
+
"description": "Result of running the scraping instructions against the target URL.",
|
|
619
|
+
"required": ["extractedData"],
|
|
620
|
+
"properties": {
|
|
621
|
+
"extractedData": {
|
|
622
|
+
"type": "object",
|
|
623
|
+
"description": "Container keyed by the field names used in your extract instructions. A field is present only if its selector matched at least one element on the page.",
|
|
624
|
+
"$ref": "#/components/schemas/ExtractedField"
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
"ExtractedField": {
|
|
629
|
+
"type": ["string", "array"],
|
|
630
|
+
"title": "ExtractedField",
|
|
631
|
+
"description": "The value scraped for one field of an extract instruction. A string when the selector matched exactly one element (content depends on the text query parameter and, under jsEnabled=true, is always plain text). An array of strings, in document order, when the selector matched more than one element (each entry keeps HTML tags unless text=true is set). A field whose selector matched nothing is omitted from extractedData entirely rather than appearing as an empty value.",
|
|
632
|
+
"items": {
|
|
633
|
+
"type": "string"
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
"ErrorResponse": {
|
|
637
|
+
"type": "object",
|
|
638
|
+
"description": "Standard error response returned when a request fails.",
|
|
639
|
+
"required": ["error", "message", "path", "status", "timestamp"],
|
|
640
|
+
"properties": {
|
|
641
|
+
"error": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"description": "Short error category or exception type."
|
|
644
|
+
},
|
|
645
|
+
"message": {
|
|
646
|
+
"type": "string",
|
|
647
|
+
"description": "Human-readable error message describing the failure."
|
|
648
|
+
},
|
|
649
|
+
"path": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"description": "API endpoint path that produced the error."
|
|
652
|
+
},
|
|
653
|
+
"status": {
|
|
654
|
+
"type": "integer",
|
|
655
|
+
"description": "HTTP status code returned with the error."
|
|
656
|
+
},
|
|
657
|
+
"timestamp": {
|
|
658
|
+
"type": "string",
|
|
659
|
+
"format": "date-time",
|
|
660
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"security": [
|
|
667
|
+
{
|
|
668
|
+
"ApiKeyAuthHeader": []
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"ApiKeyAuthQuery": []
|
|
672
|
+
}
|
|
673
|
+
]
|
|
674
|
+
}
|