@apifreaks/openapi-specs 0.4.24 → 0.4.26
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/dist/index.cjs +3912 -757
- package/dist/index.js +3912 -757
- package/dist/specs/commodity/commodity-fluctuation.yaml +33 -2
- package/dist/specs/commodity/commodity-intraday-rates.yaml +33 -2
- package/dist/specs/commodity/commodity-prices.yaml +33 -2
- package/dist/specs/commodity/commodity-symbols.yaml +68 -1
- package/dist/specs/commodity/commodity-time-series.yaml +33 -2
- package/dist/specs/commodity/historical-commodity-prices.yaml +33 -2
- package/dist/specs/dns/bulk-dns-lookup.yaml +45 -3
- package/dist/specs/dns/dns-history-lookup.yaml +76 -3
- package/dist/specs/dns/dns-lookup.yaml +72 -6
- package/dist/specs/dns/reverse-dns-lookup.yaml +91 -2
- package/dist/specs/financial/bulk-vat-rates-country.yaml +18 -0
- package/dist/specs/financial/financial-apis-supported-countries.yaml +75 -17
- package/dist/specs/financial/iban-validation.yaml +19 -1
- package/dist/specs/financial/swift-code-finder.yaml +18 -0
- package/dist/specs/financial/swift-code-lookup.yaml +18 -0
- package/dist/specs/financial/vat-number-validation.yaml +48 -0
- package/dist/specs/financial/vat-rates-by-ip.yaml +18 -0
- package/dist/specs/financial/vat-rates-country.yaml +18 -0
- package/dist/specs/geocoding/forward-geocoding.yaml +95 -2
- package/dist/specs/geocoding/reverse-geocoding.yaml +71 -0
- package/dist/specs/phone-number-validation/bulk-phone-number-validation.yaml +25 -3
- package/dist/specs/phone-number-validation/phone-validation.yaml +49 -3
- package/dist/specs/scraper/web-scraper.yaml +85 -7
- package/dist/specs/weather/air-quality.yaml +71 -5
- package/dist/specs/weather/astronomy-data.yaml +84 -1
- package/dist/specs/weather/bulk-live-weather.yaml +159 -3
- package/dist/specs/weather/flood-forecast.yaml +61 -11
- package/dist/specs/weather/historical-weather.yaml +53 -3
- package/dist/specs/weather/live-weather.yaml +66 -15
- package/dist/specs/weather/marine-weather.yaml +74 -8
- package/dist/specs/weather/time-series-weather.yaml +60 -8
- package/dist/specs/weather/weather-forecast.yaml +76 -6
- package/dist/specs/whois/reverse-whois.yaml +78 -75
- package/package.json +1 -1
- package/specs/commodity/commodity-fluctuation.json +44 -2
- package/specs/commodity/commodity-intraday-rates.json +44 -2
- package/specs/commodity/commodity-prices.json +44 -2
- package/specs/commodity/commodity-symbols.json +95 -1
- package/specs/commodity/commodity-time-series.json +44 -2
- package/specs/commodity/historical-commodity-prices.json +44 -2
- package/specs/dns/bulk-dns-lookup.json +63 -4
- package/specs/dns/dns-history-lookup.json +102 -3
- package/specs/dns/dns-lookup.json +96 -6
- package/specs/dns/reverse-dns-lookup.json +121 -2
- package/specs/financial/bulk-vat-rates-country.json +27 -0
- package/specs/financial/financial-apis-supported-countries.json +114 -23
- package/specs/financial/iban-validation.json +28 -1
- package/specs/financial/swift-code-finder.json +27 -0
- package/specs/financial/swift-code-lookup.json +27 -0
- package/specs/financial/vat-number-validation.json +72 -0
- package/specs/financial/vat-rates-by-ip.json +27 -0
- package/specs/financial/vat-rates-country.json +27 -0
- package/specs/geocoding/forward-geocoding.json +127 -2
- package/specs/geocoding/reverse-geocoding.json +102 -0
- package/specs/phone-number-validation/bulk-phone-number-validation.json +35 -3
- package/specs/phone-number-validation/phone-validation.json +65 -3
- package/specs/scraper/web-scraper.json +110 -7
- package/specs/weather/air-quality.json +92 -5
- package/specs/weather/astronomy-data.json +122 -1
- package/specs/weather/bulk-live-weather.json +227 -3
- package/specs/weather/flood-forecast.json +78 -11
- package/specs/weather/historical-weather.json +70 -3
- package/specs/weather/live-weather.json +85 -17
- package/specs/weather/marine-weather.json +95 -8
- package/specs/weather/time-series-weather.json +82 -8
- package/specs/weather/weather-forecast.json +107 -6
- package/specs/whois/reverse-whois.json +71 -92
|
@@ -25,10 +25,19 @@ paths:
|
|
|
25
25
|
description: Free-form search query, e.g. `Wembley Stadium, London`.
|
|
26
26
|
schema:
|
|
27
27
|
type: string
|
|
28
|
+
- name: format
|
|
29
|
+
in: query
|
|
30
|
+
required: false
|
|
31
|
+
description: Response format. Only `json` is supported; any other value is ignored and the response is still returned as JSON.
|
|
32
|
+
schema:
|
|
33
|
+
type: string
|
|
34
|
+
enum:
|
|
35
|
+
- json
|
|
36
|
+
default: json
|
|
28
37
|
- name: limit
|
|
29
38
|
in: query
|
|
30
39
|
required: false
|
|
31
|
-
description: Maximum number of results to return. May return fewer if matches are weak.
|
|
40
|
+
description: Maximum number of results to return. Must be an integer between 1 and 40. May return fewer if matches are weak.
|
|
32
41
|
schema:
|
|
33
42
|
type: integer
|
|
34
43
|
minimum: 1
|
|
@@ -152,11 +161,69 @@ paths:
|
|
|
152
161
|
path: /v1.0/geocoder/search
|
|
153
162
|
status: 400
|
|
154
163
|
timestamp: '2026-07-22T14:30:11.104Z'
|
|
164
|
+
missingViewboxParams:
|
|
165
|
+
summary: Only some of the four viewbox parameters supplied
|
|
166
|
+
value:
|
|
167
|
+
error: Invalid Param Exception
|
|
168
|
+
message: please pass correct parameters
|
|
169
|
+
path: /v1.0/geocoder/search
|
|
170
|
+
status: 400
|
|
171
|
+
timestamp: '2026-11-25T10:00:59.575Z'
|
|
172
|
+
invalidViewboxLatitudeRange:
|
|
173
|
+
summary: '`min_lat` or `max_lat` outside the -90 to 90 range'
|
|
174
|
+
value:
|
|
175
|
+
error: Invalid Latitude Provided
|
|
176
|
+
message: Latitude must be between -90 and 90.
|
|
177
|
+
path: /v1.0/geocoder/search
|
|
178
|
+
status: 400
|
|
179
|
+
timestamp: '2026-11-25T10:01:01.969Z'
|
|
180
|
+
invalidViewboxLongitudeRange:
|
|
181
|
+
summary: '`min_lon` or `max_lon` outside the -180 to 180 range'
|
|
182
|
+
value:
|
|
183
|
+
error: Invalid Longitude Provided
|
|
184
|
+
message: Longitude must be between -180 and 180.
|
|
185
|
+
path: /v1.0/geocoder/search
|
|
186
|
+
status: 400
|
|
187
|
+
timestamp: '2026-11-25T10:01:12.506Z'
|
|
188
|
+
invalidParameters:
|
|
189
|
+
summary: A numeric parameter is not a valid number
|
|
190
|
+
value:
|
|
191
|
+
error: Invalid Parameters Provided
|
|
192
|
+
message: Please provide valid parameters.
|
|
193
|
+
path: /v1.0/geocoder/search
|
|
194
|
+
status: 400
|
|
195
|
+
timestamp: '2026-11-25T10:01:01.358Z'
|
|
196
|
+
missingApiKey:
|
|
197
|
+
summary: No API key supplied
|
|
198
|
+
value:
|
|
199
|
+
error: Invalid Param Exception
|
|
200
|
+
message: Please provide apiKey
|
|
201
|
+
path: /v1.0/geocoder/search
|
|
202
|
+
status: 400
|
|
203
|
+
timestamp: '2026-11-25T10:01:15.099Z'
|
|
204
|
+
headers:
|
|
205
|
+
X-AF-Credits-Cost:
|
|
206
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
207
|
+
'401':
|
|
208
|
+
description: Unauthorized — The API key is invalid
|
|
209
|
+
content:
|
|
210
|
+
application/json:
|
|
211
|
+
schema:
|
|
212
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
213
|
+
examples:
|
|
214
|
+
invalidApiKey:
|
|
215
|
+
summary: Invalid API key
|
|
216
|
+
value:
|
|
217
|
+
error: API Access Exception
|
|
218
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
219
|
+
path: /v1.0/geocoder/search
|
|
220
|
+
status: 401
|
|
221
|
+
timestamp: '2026-11-25T10:01:15.616Z'
|
|
155
222
|
headers:
|
|
156
223
|
X-AF-Credits-Cost:
|
|
157
224
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
158
225
|
'404':
|
|
159
|
-
description: Not Found — No results matched the query
|
|
226
|
+
description: Not Found — No results matched the query, or an unsupported HTTP method was used
|
|
160
227
|
content:
|
|
161
228
|
application/json:
|
|
162
229
|
schema:
|
|
@@ -170,6 +237,32 @@ paths:
|
|
|
170
237
|
path: /v1.0/geocoder/search
|
|
171
238
|
status: 404
|
|
172
239
|
timestamp: '2026-07-22T14:29:58.349Z'
|
|
240
|
+
methodNotAllowed:
|
|
241
|
+
summary: Non-GET HTTP method used
|
|
242
|
+
value:
|
|
243
|
+
error: Resource Not Found
|
|
244
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
245
|
+
path: /v1.0/geocoder/search
|
|
246
|
+
status: 404
|
|
247
|
+
timestamp: '2026-11-25T10:01:04.916Z'
|
|
248
|
+
headers:
|
|
249
|
+
X-AF-Credits-Cost:
|
|
250
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
251
|
+
'500':
|
|
252
|
+
description: Internal Server Error — Returned when the request cannot be processed
|
|
253
|
+
content:
|
|
254
|
+
application/json:
|
|
255
|
+
schema:
|
|
256
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
257
|
+
examples:
|
|
258
|
+
internalError:
|
|
259
|
+
summary: Internal server error, e.g. a zero-width viewbox where `min_lon` equals `max_lon`
|
|
260
|
+
value:
|
|
261
|
+
error: Internal Server Error
|
|
262
|
+
message: Internal Server Error Occurred.
|
|
263
|
+
path: /v1.0/geocoder/search
|
|
264
|
+
status: 500
|
|
265
|
+
timestamp: '2026-11-25T10:01:14.559Z'
|
|
173
266
|
headers:
|
|
174
267
|
X-AF-Credits-Cost:
|
|
175
268
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -33,6 +33,15 @@ paths:
|
|
|
33
33
|
schema:
|
|
34
34
|
type: number
|
|
35
35
|
format: float
|
|
36
|
+
- name: format
|
|
37
|
+
in: query
|
|
38
|
+
required: false
|
|
39
|
+
description: Response format. Only `json` is supported; any other value is ignored and the response is still returned as JSON.
|
|
40
|
+
schema:
|
|
41
|
+
type: string
|
|
42
|
+
enum:
|
|
43
|
+
- json
|
|
44
|
+
default: json
|
|
36
45
|
- name: Accept-Language
|
|
37
46
|
in: header
|
|
38
47
|
required: false
|
|
@@ -118,6 +127,68 @@ paths:
|
|
|
118
127
|
path: /v1.0/geocoder/reverse
|
|
119
128
|
status: 400
|
|
120
129
|
timestamp: '2026-07-22T14:29:46.809Z'
|
|
130
|
+
missingApiKey:
|
|
131
|
+
summary: No API key supplied
|
|
132
|
+
value:
|
|
133
|
+
error: Invalid Param Exception
|
|
134
|
+
message: Please provide apiKey
|
|
135
|
+
path: /v1.0/geocoder/reverse
|
|
136
|
+
status: 400
|
|
137
|
+
timestamp: '2026-11-25T10:01:15.099Z'
|
|
138
|
+
headers:
|
|
139
|
+
X-AF-Credits-Cost:
|
|
140
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
141
|
+
'401':
|
|
142
|
+
description: Unauthorized — The API key is invalid
|
|
143
|
+
content:
|
|
144
|
+
application/json:
|
|
145
|
+
schema:
|
|
146
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
147
|
+
examples:
|
|
148
|
+
invalidApiKey:
|
|
149
|
+
summary: Invalid API key
|
|
150
|
+
value:
|
|
151
|
+
error: API Access Exception
|
|
152
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
153
|
+
path: /v1.0/geocoder/reverse
|
|
154
|
+
status: 401
|
|
155
|
+
timestamp: '2026-11-25T10:01:15.616Z'
|
|
156
|
+
headers:
|
|
157
|
+
X-AF-Credits-Cost:
|
|
158
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
159
|
+
'404':
|
|
160
|
+
description: Not Found — An unsupported HTTP method was used
|
|
161
|
+
content:
|
|
162
|
+
application/json:
|
|
163
|
+
schema:
|
|
164
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
165
|
+
examples:
|
|
166
|
+
methodNotAllowed:
|
|
167
|
+
summary: Non-GET HTTP method used
|
|
168
|
+
value:
|
|
169
|
+
error: Resource Not Found
|
|
170
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
171
|
+
path: /v1.0/geocoder/reverse
|
|
172
|
+
status: 404
|
|
173
|
+
timestamp: '2026-11-25T10:01:28.856Z'
|
|
174
|
+
headers:
|
|
175
|
+
X-AF-Credits-Cost:
|
|
176
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
177
|
+
'500':
|
|
178
|
+
description: Internal Server Error — No address could be resolved for the coordinates (e.g. open ocean) or the request failed
|
|
179
|
+
content:
|
|
180
|
+
application/json:
|
|
181
|
+
schema:
|
|
182
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
183
|
+
examples:
|
|
184
|
+
internalError:
|
|
185
|
+
summary: No address found for the coordinates, e.g. `lat=0&lon=0` in open ocean
|
|
186
|
+
value:
|
|
187
|
+
error: Internal Server Error
|
|
188
|
+
message: Internal Server Error Occurred.
|
|
189
|
+
path: /v1.0/geocoder/reverse
|
|
190
|
+
status: 500
|
|
191
|
+
timestamp: '2026-11-25T10:01:25.626Z'
|
|
121
192
|
headers:
|
|
122
193
|
X-AF-Credits-Cost:
|
|
123
194
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -25,9 +25,8 @@ paths:
|
|
|
25
25
|
type: string
|
|
26
26
|
enum:
|
|
27
27
|
- json
|
|
28
|
-
- xml
|
|
29
28
|
default: json
|
|
30
|
-
description:
|
|
29
|
+
description: Response format. Only `json` is supported; the default is `json`.
|
|
31
30
|
requestBody:
|
|
32
31
|
required: true
|
|
33
32
|
description: |-
|
|
@@ -129,7 +128,7 @@ paths:
|
|
|
129
128
|
X-AF-Credits-Cost:
|
|
130
129
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
131
130
|
'400':
|
|
132
|
-
description: Bad Request – Missing or malformed request body
|
|
131
|
+
description: Bad Request – Missing or malformed request body (missing or empty `numbers`, non-array value, or invalid JSON), or missing API key
|
|
133
132
|
content:
|
|
134
133
|
application/json:
|
|
135
134
|
schema:
|
|
@@ -143,9 +142,32 @@ paths:
|
|
|
143
142
|
path: /v1.0/phone/validation/bulk
|
|
144
143
|
status: 400
|
|
145
144
|
timestamp: '2026-07-27T12:56:50.387Z'
|
|
145
|
+
missingApiKey:
|
|
146
|
+
summary: API key not sent
|
|
147
|
+
value:
|
|
148
|
+
error: Invalid Param Exception
|
|
149
|
+
message: Please provide apiKey
|
|
150
|
+
path: /v1.0/phone/validation/bulk
|
|
151
|
+
status: 400
|
|
152
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
146
153
|
headers:
|
|
147
154
|
X-AF-Credits-Cost:
|
|
148
155
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
156
|
+
'401':
|
|
157
|
+
description: Unauthorized — API key invalid
|
|
158
|
+
content:
|
|
159
|
+
application/json:
|
|
160
|
+
schema:
|
|
161
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
162
|
+
examples:
|
|
163
|
+
invalidApiKey:
|
|
164
|
+
summary: Invalid API key
|
|
165
|
+
value:
|
|
166
|
+
error: API Access Exception
|
|
167
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
168
|
+
path: /v1.0/phone/validation/bulk
|
|
169
|
+
status: 401
|
|
170
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
149
171
|
'404':
|
|
150
172
|
description: Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)
|
|
151
173
|
content:
|
|
@@ -25,9 +25,8 @@ paths:
|
|
|
25
25
|
type: string
|
|
26
26
|
enum:
|
|
27
27
|
- json
|
|
28
|
-
- xml
|
|
29
28
|
default: json
|
|
30
|
-
description:
|
|
29
|
+
description: Response format. Only `json` is supported; the default is `json`.
|
|
31
30
|
requestBody:
|
|
32
31
|
required: true
|
|
33
32
|
description: |-
|
|
@@ -97,7 +96,7 @@ paths:
|
|
|
97
96
|
X-AF-Credits-Cost:
|
|
98
97
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
99
98
|
'400':
|
|
100
|
-
description: Bad Request – e.g. missing required field
|
|
99
|
+
description: Bad Request – e.g. missing required field, both region codes provided, malformed body, or missing API key
|
|
101
100
|
content:
|
|
102
101
|
application/json:
|
|
103
102
|
schema:
|
|
@@ -151,9 +150,56 @@ paths:
|
|
|
151
150
|
error: Number Too Long
|
|
152
151
|
message: The phone number has more digits than any valid phone number can have.
|
|
153
152
|
path: /v1.0/phone-number/info
|
|
153
|
+
number_too_short:
|
|
154
|
+
summary: Number too short after removing the international dialing prefix (e.g. `00`)
|
|
155
|
+
value:
|
|
156
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
157
|
+
status: 400
|
|
158
|
+
error: Number Too Short
|
|
159
|
+
message: The number is too short after removing the international dialing prefix.
|
|
160
|
+
path: /v1.0/phone-number/info
|
|
161
|
+
too_short_national_number:
|
|
162
|
+
summary: National number shorter than allowed (e.g. `00923` with `region` PK)
|
|
163
|
+
value:
|
|
164
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
165
|
+
status: 400
|
|
166
|
+
error: Too Short National Number
|
|
167
|
+
message: The national number part is shorter than allowed for valid phone numbers.
|
|
168
|
+
path: /v1.0/phone-number/info
|
|
169
|
+
invalid_parameters:
|
|
170
|
+
summary: Malformed JSON, missing body, or a non-string number
|
|
171
|
+
value:
|
|
172
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
173
|
+
status: 400
|
|
174
|
+
error: Invalid Parameters Provided
|
|
175
|
+
message: Please provide valid parameters.
|
|
176
|
+
path: /v1.0/phone-number/info
|
|
177
|
+
missingApiKey:
|
|
178
|
+
summary: API key not sent
|
|
179
|
+
value:
|
|
180
|
+
error: Invalid Param Exception
|
|
181
|
+
message: Please provide apiKey
|
|
182
|
+
path: /v1.0/phone/validation
|
|
183
|
+
status: 400
|
|
184
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
154
185
|
headers:
|
|
155
186
|
X-AF-Credits-Cost:
|
|
156
187
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
188
|
+
'401':
|
|
189
|
+
description: Unauthorized — API key invalid
|
|
190
|
+
content:
|
|
191
|
+
application/json:
|
|
192
|
+
schema:
|
|
193
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
194
|
+
examples:
|
|
195
|
+
invalidApiKey:
|
|
196
|
+
summary: Invalid API key
|
|
197
|
+
value:
|
|
198
|
+
error: API Access Exception
|
|
199
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
200
|
+
path: /v1.0/phone/validation
|
|
201
|
+
status: 401
|
|
202
|
+
timestamp: '2026-11-25T10:07:00.000Z'
|
|
157
203
|
'404':
|
|
158
204
|
description: Not Found – Wrong HTTP method used on the endpoint (e.g. GET instead of POST)
|
|
159
205
|
content:
|
|
@@ -2,7 +2,7 @@ openapi: 3.1.1
|
|
|
2
2
|
info:
|
|
3
3
|
title: Web Scraper API - JavaScript Rendering, Proxy Rotation & CAPTCHA Solving
|
|
4
4
|
version: 1.0.0
|
|
5
|
-
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
|
|
5
|
+
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` (the default) 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` (must be set explicitly) 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` (the default), single-element matches are always returned as plain text regardless of `text`, while multi-element matches keep tags unless `text=true` is set.'
|
|
6
6
|
contact:
|
|
7
7
|
name: APIFreaks Support
|
|
8
8
|
url: https://apifreaks.com/contact
|
|
@@ -36,10 +36,10 @@ paths:
|
|
|
36
36
|
- name: jsEnabled
|
|
37
37
|
in: query
|
|
38
38
|
required: false
|
|
39
|
-
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.
|
|
39
|
+
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 true, so static mode must be requested explicitly with jsEnabled=false. Any value other than false is treated as true.
|
|
40
40
|
schema:
|
|
41
41
|
type: boolean
|
|
42
|
-
default:
|
|
42
|
+
default: true
|
|
43
43
|
- name: proxy
|
|
44
44
|
in: query
|
|
45
45
|
required: false
|
|
@@ -74,7 +74,7 @@ paths:
|
|
|
74
74
|
type: boolean
|
|
75
75
|
requestBody:
|
|
76
76
|
required: false
|
|
77
|
-
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
|
|
77
|
+
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 for the static-HTML instruction set (JsEnabledFalseBody: postForm, getForm, getPage, extract). instructions is an ordered array executed sequentially. If jsEnabled is omitted, the interactive/browser instruction set applies (jsEnabled defaults to true).'
|
|
78
78
|
content:
|
|
79
79
|
application/json:
|
|
80
80
|
schema:
|
|
@@ -83,7 +83,7 @@ paths:
|
|
|
83
83
|
- $ref: '#/components/schemas/JsEnabledFalseBody'
|
|
84
84
|
examples:
|
|
85
85
|
jsEnabledTrue:
|
|
86
|
-
summary: Example body for jsEnabled=true (fill, click, wait, extract)
|
|
86
|
+
summary: Example body for jsEnabled=true, the default (fill, click, wait, extract)
|
|
87
87
|
value:
|
|
88
88
|
blockUrl:
|
|
89
89
|
- https://example.com/ads.js
|
|
@@ -104,7 +104,7 @@ paths:
|
|
|
104
104
|
pageTitle: title
|
|
105
105
|
welcomeText: h1
|
|
106
106
|
jsEnabledFalse:
|
|
107
|
-
summary: Example body for jsEnabled=false (extract only)
|
|
107
|
+
summary: Example body for jsEnabled=false, set explicitly (extract only)
|
|
108
108
|
value:
|
|
109
109
|
instructions:
|
|
110
110
|
- extract:
|
|
@@ -204,6 +204,62 @@ paths:
|
|
|
204
204
|
error: Bad Request
|
|
205
205
|
message: Check the url or links
|
|
206
206
|
path: /v1/scraping/params
|
|
207
|
+
jsInvalidSelector:
|
|
208
|
+
summary: Unparseable CSS or XPath selector (jsEnabled=true)
|
|
209
|
+
value:
|
|
210
|
+
timestamp: '2026-11-25T10:02:47.975+00:00'
|
|
211
|
+
status: 400
|
|
212
|
+
error: Bad Request
|
|
213
|
+
message: Scraping stopped due to an Unknown Exception [Unexpected token "!" while parsing selector "!!["]
|
|
214
|
+
path: /v1/scraping/params
|
|
215
|
+
jsTargetUnreachable:
|
|
216
|
+
summary: Target URL could not be resolved (jsEnabled=true)
|
|
217
|
+
value:
|
|
218
|
+
timestamp: '2026-11-25T10:02:49.424+00:00'
|
|
219
|
+
status: 400
|
|
220
|
+
error: Bad Request
|
|
221
|
+
message: Scraping stopped due to an Unknown Exception [net::ERR_NAME_NOT_RESOLVED at https://thisdomaindoesnotexist12345xyz.com/]
|
|
222
|
+
path: /v1/scraping/params
|
|
223
|
+
jsInvalidUrl:
|
|
224
|
+
summary: url is not a valid absolute URL (jsEnabled=true)
|
|
225
|
+
value:
|
|
226
|
+
timestamp: '2026-11-25T10:02:45.069+00:00'
|
|
227
|
+
status: 400
|
|
228
|
+
error: Bad Request
|
|
229
|
+
message: 'Scraping stopped due to an Unknown Exception [Protocol error (Page.navigate): Cannot navigate to invalid URL]'
|
|
230
|
+
path: /v1/scraping/params
|
|
231
|
+
invalidBooleanParam:
|
|
232
|
+
summary: A boolean query parameter (for example text) has a non-boolean value
|
|
233
|
+
value:
|
|
234
|
+
timestamp: '2026-11-25T10:02:43.043+00:00'
|
|
235
|
+
status: 400
|
|
236
|
+
error: Bad Request
|
|
237
|
+
message: Scraping stopped due to an Unknown Exception [Failed to convert value of type 'java.lang.String' to required type 'boolean'; Invalid boolean value [foo]]
|
|
238
|
+
path: /v1/scraping/params
|
|
239
|
+
instructionsNotAppropriate:
|
|
240
|
+
summary: Unknown instruction, or an instruction not supported by the selected mode (for example wait with jsEnabled=false)
|
|
241
|
+
value:
|
|
242
|
+
timestamp: '2026-11-25T10:02:36.923+00:00'
|
|
243
|
+
status: 400
|
|
244
|
+
error: Bad Request
|
|
245
|
+
message: Instructions fields are not appropriate
|
|
246
|
+
path: /v1/scraping/params
|
|
247
|
+
captchaDisabled:
|
|
248
|
+
summary: CAPTCHA instruction sent without captcha=true
|
|
249
|
+
value:
|
|
250
|
+
timestamp: '2026-11-25T10:08:09.382+00:00'
|
|
251
|
+
status: 400
|
|
252
|
+
error: Bad Request
|
|
253
|
+
message: Set 'captcha' to 'true' in the parameters to enable captcha solving
|
|
254
|
+
path: /v1/scraping/params
|
|
255
|
+
formFieldsMissing:
|
|
256
|
+
summary: getForm/postForm instruction missing its link/selector or data (jsEnabled=false)
|
|
257
|
+
value:
|
|
258
|
+
timestamp: '2026-11-25T10:08:10.293+00:00'
|
|
259
|
+
status: 400
|
|
260
|
+
error: Bad Request
|
|
261
|
+
message: check your postForm or getForm fields, Either they are missing the link/selector or data
|
|
262
|
+
path: /v1/scraping/params
|
|
207
263
|
headers:
|
|
208
264
|
X-AF-Credits-Cost:
|
|
209
265
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -233,6 +289,28 @@ paths:
|
|
|
233
289
|
$ref: '#/components/headers/X-Concurrent-Threads'
|
|
234
290
|
X-Concurrent-Threads-Active:
|
|
235
291
|
$ref: '#/components/headers/X-Concurrent-Threads-Active'
|
|
292
|
+
'503':
|
|
293
|
+
description: Service Unavailable — the scraping service could not complete the request (for example a click or fill instruction targeting an element that never appears, which runs until the browser times out)
|
|
294
|
+
content:
|
|
295
|
+
application/json:
|
|
296
|
+
schema:
|
|
297
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
298
|
+
examples:
|
|
299
|
+
serviceUnavailable:
|
|
300
|
+
summary: Scraping service unavailable or timed out
|
|
301
|
+
value:
|
|
302
|
+
error: Service Unavailable
|
|
303
|
+
message: Service is unavailable. Please try after some time or contact support@apifreaks.com
|
|
304
|
+
path: /v1.0/scraping
|
|
305
|
+
status: 503
|
|
306
|
+
timestamp: '2026-11-25T10:04:14.938Z'
|
|
307
|
+
headers:
|
|
308
|
+
X-AF-Credits-Cost:
|
|
309
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
310
|
+
X-Concurrent-Threads:
|
|
311
|
+
$ref: '#/components/headers/X-Concurrent-Threads'
|
|
312
|
+
X-Concurrent-Threads-Active:
|
|
313
|
+
$ref: '#/components/headers/X-Concurrent-Threads-Active'
|
|
236
314
|
components:
|
|
237
315
|
securitySchemes:
|
|
238
316
|
ApiKeyAuthHeader:
|
|
@@ -414,7 +492,7 @@ components:
|
|
|
414
492
|
description: 'CSS selector or XPath identifying the element(s) to extract for this output field. Example: ''h1'' or ''/html/body/div/div[2]''.'
|
|
415
493
|
JsEnabledFalseBody:
|
|
416
494
|
type: object
|
|
417
|
-
description: 'Request body for jsEnabled=false
|
|
495
|
+
description: 'Request body for jsEnabled=false: fetches static HTML only, no browser rendering.'
|
|
418
496
|
properties:
|
|
419
497
|
instructions:
|
|
420
498
|
type: array
|
|
@@ -22,7 +22,7 @@ paths:
|
|
|
22
22
|
- name: format
|
|
23
23
|
in: query
|
|
24
24
|
required: false
|
|
25
|
-
description:
|
|
25
|
+
description: Format of the response. Only json is supported.
|
|
26
26
|
schema:
|
|
27
27
|
type: string
|
|
28
28
|
enum:
|
|
@@ -46,26 +46,34 @@ paths:
|
|
|
46
46
|
in: query
|
|
47
47
|
schema:
|
|
48
48
|
type: string
|
|
49
|
-
description: City name, place name, or full address.
|
|
49
|
+
description: City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.
|
|
50
50
|
required: false
|
|
51
51
|
- name: lat
|
|
52
52
|
in: query
|
|
53
53
|
schema:
|
|
54
54
|
type: number
|
|
55
|
-
description: Latitude of the location. Must be supplied together with long
|
|
55
|
+
description: Latitude of the location. Must be supplied together with long. lat=0 together with long=0 is treated as missing and the location falls back to the requester IP (or to location/ip if given); use a small non-zero value (for example 0.0001) to query the equator or prime meridian.
|
|
56
56
|
required: false
|
|
57
57
|
- name: long
|
|
58
58
|
in: query
|
|
59
59
|
schema:
|
|
60
60
|
type: number
|
|
61
|
-
description: Longitude of the location. Must be supplied together with lat
|
|
61
|
+
description: Longitude of the location. Must be supplied together with lat. lat=0 together with long=0 is treated as missing and the location falls back to the requester IP (or to location/ip if given); use a small non-zero value (for example 0.0001) to query the equator or prime meridian.
|
|
62
62
|
required: false
|
|
63
63
|
- name: ip
|
|
64
64
|
in: query
|
|
65
65
|
schema:
|
|
66
66
|
type: string
|
|
67
|
-
description: IP(v4 or v6) address for location inference.
|
|
67
|
+
description: IP(v4 or v6) address for location inference. Ignored when location or lat/long is provided; if no location parameter is supplied at all, the requester's own IP is used.
|
|
68
68
|
required: false
|
|
69
|
+
- name: precision
|
|
70
|
+
in: query
|
|
71
|
+
required: false
|
|
72
|
+
description: 'Data granularity. Air quality data is only available hourly, so hourly is the only accepted value and the parameter is optional: omitting it (or passing an empty value) behaves the same as hourly (current readings, or hourly forecast data when startDate/endDate are given). The value is case-sensitive.'
|
|
73
|
+
schema:
|
|
74
|
+
type: string
|
|
75
|
+
enum:
|
|
76
|
+
- hourly
|
|
69
77
|
- name: timezone
|
|
70
78
|
in: query
|
|
71
79
|
schema:
|
|
@@ -223,6 +231,56 @@ paths:
|
|
|
223
231
|
message: Forecast date range must be within 2026-07-24 to 2026-07-29
|
|
224
232
|
error: params-exception-error
|
|
225
233
|
path: /v1.0/weather/air-quality
|
|
234
|
+
InvalidPrecision:
|
|
235
|
+
summary: Unknown or wrongly-cased precision value (e.g. precision=foo or precision=HOURLY)
|
|
236
|
+
value:
|
|
237
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
238
|
+
status: 400
|
|
239
|
+
message: Invalid precision
|
|
240
|
+
error: invalid-params
|
|
241
|
+
path: /v1.0/weather/air-quality
|
|
242
|
+
UnsupportedPrecision:
|
|
243
|
+
summary: Precision that exists on other weather endpoints but not here (daily or minutely)
|
|
244
|
+
value:
|
|
245
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
246
|
+
status: 400
|
|
247
|
+
message: '''daily'' precision is not supported on this endpoint'
|
|
248
|
+
error: invalid-params
|
|
249
|
+
path: /v1.0/weather/air-quality
|
|
250
|
+
UnresolvedCoordinates:
|
|
251
|
+
summary: lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)
|
|
252
|
+
value:
|
|
253
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
254
|
+
status: 400
|
|
255
|
+
message: Please provide both lat and long parameters.
|
|
256
|
+
error: invalid-params
|
|
257
|
+
path: /v1.0/weather/air-quality
|
|
258
|
+
MissingApiKey:
|
|
259
|
+
summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
|
|
260
|
+
value:
|
|
261
|
+
error: Invalid Param Exception
|
|
262
|
+
message: Please provide apiKey
|
|
263
|
+
path: /v1.0/weather/air-quality
|
|
264
|
+
status: 400
|
|
265
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
266
|
+
headers:
|
|
267
|
+
X-AF-Credits-Cost:
|
|
268
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
269
|
+
'401':
|
|
270
|
+
description: Unauthorized — The API key is invalid
|
|
271
|
+
content:
|
|
272
|
+
application/json:
|
|
273
|
+
schema:
|
|
274
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
275
|
+
examples:
|
|
276
|
+
invalidApiKey:
|
|
277
|
+
summary: Invalid API key
|
|
278
|
+
value:
|
|
279
|
+
error: API Access Exception
|
|
280
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
281
|
+
path: /v1.0/weather/air-quality
|
|
282
|
+
status: 401
|
|
283
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
226
284
|
headers:
|
|
227
285
|
X-AF-Credits-Cost:
|
|
228
286
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -241,6 +299,14 @@ paths:
|
|
|
241
299
|
message: Location not found
|
|
242
300
|
error: error
|
|
243
301
|
path: /v1.0/weather/air-quality
|
|
302
|
+
ResourceNotFound:
|
|
303
|
+
summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
|
|
304
|
+
value:
|
|
305
|
+
error: Resource Not Found
|
|
306
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
307
|
+
path: /v1.0/weather/air-quality
|
|
308
|
+
status: 404
|
|
309
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
244
310
|
headers:
|
|
245
311
|
X-AF-Credits-Cost:
|
|
246
312
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|