@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
|
@@ -28,7 +28,7 @@ paths:
|
|
|
28
28
|
enum:
|
|
29
29
|
- json
|
|
30
30
|
- xml
|
|
31
|
-
description: Format of the response. Can be "json" or "xml".
|
|
31
|
+
description: Format of the response. Can be "json" or "xml" (case-insensitive).
|
|
32
32
|
- in: query
|
|
33
33
|
name: location
|
|
34
34
|
schema:
|
|
@@ -287,6 +287,9 @@ paths:
|
|
|
287
287
|
moon_parallactic_angle: 53.576490644915204
|
|
288
288
|
moon_illumination_percentage: '77.00'
|
|
289
289
|
moon_angle: 122.67689249117335
|
|
290
|
+
application/xml:
|
|
291
|
+
schema:
|
|
292
|
+
$ref: '#/components/schemas/AstronomyResponse'
|
|
290
293
|
headers:
|
|
291
294
|
X-AF-Credits-Cost:
|
|
292
295
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -309,6 +312,60 @@ paths:
|
|
|
309
312
|
summary: Invalid date format
|
|
310
313
|
value:
|
|
311
314
|
message: You must provide date in the 'yyyy-MM-dd' format
|
|
315
|
+
invalidLongitude:
|
|
316
|
+
summary: Longitude out of range
|
|
317
|
+
value:
|
|
318
|
+
message: Longitude must be between -180 and 180.
|
|
319
|
+
missingLong:
|
|
320
|
+
summary: lat supplied without long
|
|
321
|
+
value:
|
|
322
|
+
message: '''long'' must not be null'
|
|
323
|
+
missingLat:
|
|
324
|
+
summary: long supplied without lat
|
|
325
|
+
value:
|
|
326
|
+
message: '''lat'' must not be null'
|
|
327
|
+
nonNumericLat:
|
|
328
|
+
summary: Non-numeric lat, long or elevation (parameter name in the message)
|
|
329
|
+
value:
|
|
330
|
+
message: Invalid value 'abc' for parameter 'lat'.
|
|
331
|
+
elevationTooHigh:
|
|
332
|
+
summary: elevation above 10000
|
|
333
|
+
value:
|
|
334
|
+
message: Elevation cannot be greater than 10000 meters.
|
|
335
|
+
invalidLang:
|
|
336
|
+
summary: Unsupported lang value
|
|
337
|
+
value:
|
|
338
|
+
message: This 'zz' lang is not valid. Please use 'en' as the default language
|
|
339
|
+
invalidTimeZone:
|
|
340
|
+
summary: Unknown time_zone value
|
|
341
|
+
value:
|
|
342
|
+
message: Check whether your input value is correct; time_zone_name = Bad
|
|
343
|
+
missingApiKey:
|
|
344
|
+
summary: No API key supplied
|
|
345
|
+
value:
|
|
346
|
+
error: Invalid Param Exception
|
|
347
|
+
message: Please provide apiKey
|
|
348
|
+
path: /v2.0/geolocation/astronomy
|
|
349
|
+
status: 400
|
|
350
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
351
|
+
headers:
|
|
352
|
+
X-AF-Credits-Cost:
|
|
353
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
354
|
+
'401':
|
|
355
|
+
description: Unauthorized — The API key is invalid
|
|
356
|
+
content:
|
|
357
|
+
application/json:
|
|
358
|
+
schema:
|
|
359
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
360
|
+
examples:
|
|
361
|
+
invalidApiKey:
|
|
362
|
+
summary: Invalid API key
|
|
363
|
+
value:
|
|
364
|
+
error: API Access Exception
|
|
365
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
366
|
+
path: /v2.0/geolocation/astronomy
|
|
367
|
+
status: 401
|
|
368
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
312
369
|
headers:
|
|
313
370
|
X-AF-Credits-Cost:
|
|
314
371
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -323,6 +380,32 @@ paths:
|
|
|
323
380
|
summary: Location not found
|
|
324
381
|
value:
|
|
325
382
|
message: We couldn't find the location (ZZZNOTEXIST). Try a city or state level location address only.
|
|
383
|
+
resourceNotFound:
|
|
384
|
+
summary: Unsupported HTTP method (e.g. POST)
|
|
385
|
+
value:
|
|
386
|
+
error: Resource Not Found
|
|
387
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
388
|
+
path: /v2.0/geolocation/astronomy
|
|
389
|
+
status: 404
|
|
390
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
391
|
+
headers:
|
|
392
|
+
X-AF-Credits-Cost:
|
|
393
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
394
|
+
'406':
|
|
395
|
+
description: Not Acceptable — Unsupported format value
|
|
396
|
+
content:
|
|
397
|
+
application/json:
|
|
398
|
+
schema:
|
|
399
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
400
|
+
examples:
|
|
401
|
+
unsupportedFormat:
|
|
402
|
+
summary: format=csv (only json and xml are supported)
|
|
403
|
+
value:
|
|
404
|
+
error: Unsupported Media Type
|
|
405
|
+
message: The media type specified in the request is not supported. For more details, please refer to the API documentation.
|
|
406
|
+
path: /v2.0/geolocation/astronomy
|
|
407
|
+
status: 406
|
|
408
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
326
409
|
headers:
|
|
327
410
|
X-AF-Credits-Cost:
|
|
328
411
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -21,7 +21,7 @@ paths:
|
|
|
21
21
|
- name: format
|
|
22
22
|
in: query
|
|
23
23
|
required: false
|
|
24
|
-
description:
|
|
24
|
+
description: Format of the response. Only json is supported.
|
|
25
25
|
schema:
|
|
26
26
|
type: string
|
|
27
27
|
enum:
|
|
@@ -122,11 +122,23 @@ paths:
|
|
|
122
122
|
bulk:
|
|
123
123
|
- error: Missing required location parameters
|
|
124
124
|
- error: Location not found
|
|
125
|
+
invalidTimezone:
|
|
126
|
+
summary: timezone query parameter is invalid — request still returns 200 with an error object per item
|
|
127
|
+
value:
|
|
128
|
+
bulk:
|
|
129
|
+
- error: Check whether your input value is correct; timezone = Bad
|
|
130
|
+
partialFailureMixed:
|
|
131
|
+
summary: 'Per-item errors: unknown location, only one of lat/long, empty item, ip + lat/long'
|
|
132
|
+
value:
|
|
133
|
+
bulk:
|
|
134
|
+
- error: Location not found
|
|
135
|
+
- error: Missing required location parameters
|
|
136
|
+
- error: Missing required location parameters
|
|
125
137
|
headers:
|
|
126
138
|
X-AF-Credits-Cost:
|
|
127
139
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
128
140
|
'400':
|
|
129
|
-
description: Bad Request — Missing/malformed request body, or
|
|
141
|
+
description: Bad Request — Missing/malformed request body, an empty locations array, or an invalid item in the locations array (non-object item, unknown property, out-of-range or non-numeric lat/long, invalid ip, empty location)
|
|
130
142
|
content:
|
|
131
143
|
application/json:
|
|
132
144
|
schema:
|
|
@@ -148,6 +160,150 @@ paths:
|
|
|
148
160
|
message: '"locations[0]" must be of type object'
|
|
149
161
|
error: error
|
|
150
162
|
path: /v1.0/weather/current/bulk
|
|
163
|
+
EmptyLocations:
|
|
164
|
+
summary: locations missing, empty, not an array, or the body is not an object (same response as InvalidBody)
|
|
165
|
+
value:
|
|
166
|
+
error: Invalid request body Exception
|
|
167
|
+
message: Please provide data in required format in request body
|
|
168
|
+
path: /v1.0/weather/current
|
|
169
|
+
status: 400
|
|
170
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
171
|
+
ItemLatOutOfRange:
|
|
172
|
+
summary: lat outside -90..90 in an item (the whole request fails, unlike an unresolvable location)
|
|
173
|
+
value:
|
|
174
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
175
|
+
status: 400
|
|
176
|
+
message: '"locations[1].lat" must be less than or equal to 90'
|
|
177
|
+
error: error
|
|
178
|
+
path: /v1.0/weather/current/bulk
|
|
179
|
+
ItemLongOutOfRange:
|
|
180
|
+
summary: long outside -180..180 in an item
|
|
181
|
+
value:
|
|
182
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
183
|
+
status: 400
|
|
184
|
+
message: '"locations[0].long" must be less than or equal to 180'
|
|
185
|
+
error: error
|
|
186
|
+
path: /v1.0/weather/current/bulk
|
|
187
|
+
ItemLatNotNumber:
|
|
188
|
+
summary: lat or long not a number in an item
|
|
189
|
+
value:
|
|
190
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
191
|
+
status: 400
|
|
192
|
+
message: '"locations[0].lat" must be a number'
|
|
193
|
+
error: error
|
|
194
|
+
path: /v1.0/weather/current/bulk
|
|
195
|
+
ItemInvalidIp:
|
|
196
|
+
summary: Invalid ip in an item
|
|
197
|
+
value:
|
|
198
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
199
|
+
status: 400
|
|
200
|
+
message: '"locations[2].ip" must be a valid ip address of one of the following versions [ipv4, ipv6] with a optional CIDR'
|
|
201
|
+
error: error
|
|
202
|
+
path: /v1.0/weather/current/bulk
|
|
203
|
+
ItemUnknownField:
|
|
204
|
+
summary: Unknown property in an item
|
|
205
|
+
value:
|
|
206
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
207
|
+
status: 400
|
|
208
|
+
message: '"locations[0].bogus" is not allowed'
|
|
209
|
+
error: error
|
|
210
|
+
path: /v1.0/weather/current/bulk
|
|
211
|
+
ItemTimezoneNotAllowed:
|
|
212
|
+
summary: timezone set on an item instead of as a query parameter
|
|
213
|
+
value:
|
|
214
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
215
|
+
status: 400
|
|
216
|
+
message: '"locations[0].timezone" is not allowed'
|
|
217
|
+
error: error
|
|
218
|
+
path: /v1.0/weather/current/bulk
|
|
219
|
+
ItemEmptyLocation:
|
|
220
|
+
summary: Empty location string in an item
|
|
221
|
+
value:
|
|
222
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
223
|
+
status: 400
|
|
224
|
+
message: '"locations[0].location" is not allowed to be empty'
|
|
225
|
+
error: error
|
|
226
|
+
path: /v1.0/weather/current/bulk
|
|
227
|
+
MissingApiKey:
|
|
228
|
+
summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
|
|
229
|
+
value:
|
|
230
|
+
error: Invalid Param Exception
|
|
231
|
+
message: Please provide apiKey
|
|
232
|
+
path: /v1.0/weather/current
|
|
233
|
+
status: 400
|
|
234
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
235
|
+
headers:
|
|
236
|
+
X-AF-Credits-Cost:
|
|
237
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
238
|
+
'401':
|
|
239
|
+
description: Unauthorized — The API key is invalid
|
|
240
|
+
content:
|
|
241
|
+
application/json:
|
|
242
|
+
schema:
|
|
243
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
244
|
+
examples:
|
|
245
|
+
invalidApiKey:
|
|
246
|
+
summary: Invalid API key
|
|
247
|
+
value:
|
|
248
|
+
error: API Access Exception
|
|
249
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
250
|
+
path: /v1.0/weather/current
|
|
251
|
+
status: 401
|
|
252
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
253
|
+
headers:
|
|
254
|
+
X-AF-Credits-Cost:
|
|
255
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
256
|
+
'404':
|
|
257
|
+
description: Not Found — Unsupported HTTP method (e.g. PUT)
|
|
258
|
+
content:
|
|
259
|
+
application/json:
|
|
260
|
+
schema:
|
|
261
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
262
|
+
examples:
|
|
263
|
+
ResourceNotFound:
|
|
264
|
+
summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
|
|
265
|
+
value:
|
|
266
|
+
error: Resource Not Found
|
|
267
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
268
|
+
path: /v1.0/weather/current
|
|
269
|
+
status: 404
|
|
270
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
271
|
+
headers:
|
|
272
|
+
X-AF-Credits-Cost:
|
|
273
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
274
|
+
'413':
|
|
275
|
+
description: Payload Too Large — More than 50 locations in the request
|
|
276
|
+
content:
|
|
277
|
+
application/json:
|
|
278
|
+
schema:
|
|
279
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
280
|
+
examples:
|
|
281
|
+
tooManyLocations:
|
|
282
|
+
summary: 51 or more items in locations
|
|
283
|
+
value:
|
|
284
|
+
error: Payload too large Exception
|
|
285
|
+
message: Maximum request body size limit exceeded
|
|
286
|
+
path: /v1.0/weather/current
|
|
287
|
+
status: 413
|
|
288
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
289
|
+
headers:
|
|
290
|
+
X-AF-Credits-Cost:
|
|
291
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
292
|
+
'500':
|
|
293
|
+
description: Internal Server Error — Request body is not sent as JSON (missing or non-JSON Content-Type header)
|
|
294
|
+
content:
|
|
295
|
+
application/json:
|
|
296
|
+
schema:
|
|
297
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
298
|
+
examples:
|
|
299
|
+
missingContentType:
|
|
300
|
+
summary: 'POST without Content-Type: application/json; note the path in this response is duplicated'
|
|
301
|
+
value:
|
|
302
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
303
|
+
status: 500
|
|
304
|
+
message: Internal Server Error
|
|
305
|
+
error: internal-server-error
|
|
306
|
+
path: /v1.0/weather/v1.0/weather/current/bulk
|
|
151
307
|
headers:
|
|
152
308
|
X-AF-Credits-Cost:
|
|
153
309
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -179,7 +335,7 @@ components:
|
|
|
179
335
|
description: Request body for bulk live weather lookup, containing an array of location specifications.
|
|
180
336
|
BulkLocationItem:
|
|
181
337
|
type: object
|
|
182
|
-
description: 'Each object specifies one location using
|
|
338
|
+
description: 'Each object specifies one location using one of the supported lookup methods: location alone, lat+long together, or ip alone. If more than one is given, lat+long takes precedence over location, and location over ip. None of these fields is required at the schema level — an item missing all of them (or with only one of lat/long, or with lat or long equal to 0) is still accepted by the request, but resolves to a per-item error object in the response (see BulkCurrentResponse) rather than failing the whole request. Only the properties below are allowed (e.g. a per-item timezone is rejected with a 400; use the timezone query parameter instead), lat must be between -90 and 90, long between -180 and 180, ip a valid IPv4/IPv6 address, and location a non-empty string, otherwise the whole request fails with a 400.'
|
|
183
339
|
properties:
|
|
184
340
|
location:
|
|
185
341
|
type: string
|
|
@@ -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:
|
|
@@ -34,42 +34,42 @@ paths:
|
|
|
34
34
|
schema:
|
|
35
35
|
type: string
|
|
36
36
|
format: date
|
|
37
|
-
description: Starting date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
|
|
37
|
+
description: Starting date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data. Both dates must fall within today through 15 days ahead (16 days inclusive).
|
|
38
38
|
- name: endDate
|
|
39
39
|
in: query
|
|
40
40
|
required: true
|
|
41
41
|
schema:
|
|
42
42
|
type: string
|
|
43
43
|
format: date
|
|
44
|
-
description: End date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
|
|
44
|
+
description: End date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data. Both dates must fall within today through 15 days ahead (16 days inclusive).
|
|
45
45
|
- name: location
|
|
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.
|
|
55
|
+
description: Latitude of the location. 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.
|
|
61
|
+
description: Longitude of the location. 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
69
|
- name: precision
|
|
70
70
|
in: query
|
|
71
71
|
required: false
|
|
72
|
-
description: Forecast data granularity. Only 'daily' is supported
|
|
72
|
+
description: Forecast data granularity. Only 'daily' is supported.
|
|
73
73
|
schema:
|
|
74
74
|
type: string
|
|
75
75
|
enum:
|
|
@@ -211,11 +211,11 @@ paths:
|
|
|
211
211
|
error: invalid-params
|
|
212
212
|
path: /v1.0/weather/flood
|
|
213
213
|
InvalidPrecision:
|
|
214
|
-
summary:
|
|
214
|
+
summary: Unknown precision value (e.g. precision=foo)
|
|
215
215
|
value:
|
|
216
|
-
timestamp: '2026-
|
|
216
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
217
217
|
status: 400
|
|
218
|
-
message:
|
|
218
|
+
message: Invalid precision
|
|
219
219
|
error: invalid-params
|
|
220
220
|
path: /v1.0/weather/flood
|
|
221
221
|
BadDateFormat:
|
|
@@ -242,6 +242,48 @@ paths:
|
|
|
242
242
|
message: Forecast date range must be within 2026-07-24 to 2026-08-08
|
|
243
243
|
error: params-exception-error
|
|
244
244
|
path: /v1.0/weather/flood
|
|
245
|
+
InvalidTimezone:
|
|
246
|
+
summary: Invalid timezone
|
|
247
|
+
value:
|
|
248
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
249
|
+
status: 400
|
|
250
|
+
message: Check whether your input value is correct; timezone = NotATimezone
|
|
251
|
+
error: error
|
|
252
|
+
path: /v1.0/weather/flood
|
|
253
|
+
InvalidCalendarDate:
|
|
254
|
+
summary: Well-formed but impossible date (e.g. startDate=2026-13-45)
|
|
255
|
+
value:
|
|
256
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
257
|
+
status: 400
|
|
258
|
+
message: Bad Request
|
|
259
|
+
error: error
|
|
260
|
+
path: /v1.0/weather/flood
|
|
261
|
+
MissingApiKey:
|
|
262
|
+
summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
|
|
263
|
+
value:
|
|
264
|
+
error: Invalid Param Exception
|
|
265
|
+
message: Please provide apiKey
|
|
266
|
+
path: /v1.0/weather/flood
|
|
267
|
+
status: 400
|
|
268
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
269
|
+
headers:
|
|
270
|
+
X-AF-Credits-Cost:
|
|
271
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
272
|
+
'401':
|
|
273
|
+
description: Unauthorized — The API key is invalid
|
|
274
|
+
content:
|
|
275
|
+
application/json:
|
|
276
|
+
schema:
|
|
277
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
278
|
+
examples:
|
|
279
|
+
invalidApiKey:
|
|
280
|
+
summary: Invalid API key
|
|
281
|
+
value:
|
|
282
|
+
error: API Access Exception
|
|
283
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
284
|
+
path: /v1.0/weather/flood
|
|
285
|
+
status: 401
|
|
286
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
245
287
|
headers:
|
|
246
288
|
X-AF-Credits-Cost:
|
|
247
289
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -260,6 +302,14 @@ paths:
|
|
|
260
302
|
message: Location not found
|
|
261
303
|
error: error
|
|
262
304
|
path: /v1.0/weather/flood
|
|
305
|
+
ResourceNotFound:
|
|
306
|
+
summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
|
|
307
|
+
value:
|
|
308
|
+
error: Resource Not Found
|
|
309
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
310
|
+
path: /v1.0/weather/flood
|
|
311
|
+
status: 404
|
|
312
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
263
313
|
headers:
|
|
264
314
|
X-AF-Credits-Cost:
|
|
265
315
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -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:
|
|
@@ -44,13 +44,13 @@ paths:
|
|
|
44
44
|
- name: lat
|
|
45
45
|
in: query
|
|
46
46
|
required: false
|
|
47
|
-
description: Latitude of the location. Takes precedence over location and ip when more than one location parameter is supplied.
|
|
47
|
+
description: Latitude of the location. Takes precedence over location and ip when more than one location parameter is supplied. 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.
|
|
48
48
|
schema:
|
|
49
49
|
type: number
|
|
50
50
|
- name: long
|
|
51
51
|
in: query
|
|
52
52
|
required: false
|
|
53
|
-
description: Longitude of the location. Must be provided together with lat.
|
|
53
|
+
description: Longitude of the location. Must be provided 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.
|
|
54
54
|
schema:
|
|
55
55
|
type: number
|
|
56
56
|
- name: ip
|
|
@@ -268,6 +268,48 @@ paths:
|
|
|
268
268
|
message: Check whether your input value is correct; timezone = NotATimezone
|
|
269
269
|
error: error
|
|
270
270
|
path: /v1.0/weather/historical
|
|
271
|
+
UnsupportedPrecision:
|
|
272
|
+
summary: precision=minutely is not supported on this endpoint
|
|
273
|
+
value:
|
|
274
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
275
|
+
status: 400
|
|
276
|
+
message: '''minutely'' precision is not supported on this endpoint'
|
|
277
|
+
error: invalid-params
|
|
278
|
+
path: /v1.0/weather/historical
|
|
279
|
+
UnresolvedCoordinates:
|
|
280
|
+
summary: lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)
|
|
281
|
+
value:
|
|
282
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
283
|
+
status: 400
|
|
284
|
+
message: Please provide both lat and long parameters.
|
|
285
|
+
error: invalid-params
|
|
286
|
+
path: /v1.0/weather/historical
|
|
287
|
+
MissingApiKey:
|
|
288
|
+
summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
|
|
289
|
+
value:
|
|
290
|
+
error: Invalid Param Exception
|
|
291
|
+
message: Please provide apiKey
|
|
292
|
+
path: /v1.0/weather/historical
|
|
293
|
+
status: 400
|
|
294
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
295
|
+
headers:
|
|
296
|
+
X-AF-Credits-Cost:
|
|
297
|
+
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
298
|
+
'401':
|
|
299
|
+
description: Unauthorized — The API key is invalid
|
|
300
|
+
content:
|
|
301
|
+
application/json:
|
|
302
|
+
schema:
|
|
303
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
304
|
+
examples:
|
|
305
|
+
invalidApiKey:
|
|
306
|
+
summary: Invalid API key
|
|
307
|
+
value:
|
|
308
|
+
error: API Access Exception
|
|
309
|
+
message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
|
|
310
|
+
path: /v1.0/weather/historical
|
|
311
|
+
status: 401
|
|
312
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
271
313
|
headers:
|
|
272
314
|
X-AF-Credits-Cost:
|
|
273
315
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|
|
@@ -286,6 +328,14 @@ paths:
|
|
|
286
328
|
message: Location not found
|
|
287
329
|
error: error
|
|
288
330
|
path: /v1.0/weather/historical
|
|
331
|
+
ResourceNotFound:
|
|
332
|
+
summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
|
|
333
|
+
value:
|
|
334
|
+
error: Resource Not Found
|
|
335
|
+
message: The requested resource could not be found. Please verify the URL and try again.
|
|
336
|
+
path: /v1.0/weather/historical
|
|
337
|
+
status: 404
|
|
338
|
+
timestamp: '2026-11-25T10:01:00.000Z'
|
|
289
339
|
headers:
|
|
290
340
|
X-AF-Credits-Cost:
|
|
291
341
|
$ref: '#/components/headers/X-AF-Credits-Cost'
|