@apifreaks/openapi-specs 0.4.24 → 0.4.25

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.
Files changed (67) hide show
  1. package/dist/index.cjs +3722 -546
  2. package/dist/index.js +3722 -546
  3. package/dist/specs/commodity/commodity-fluctuation.yaml +33 -2
  4. package/dist/specs/commodity/commodity-intraday-rates.yaml +33 -2
  5. package/dist/specs/commodity/commodity-prices.yaml +33 -2
  6. package/dist/specs/commodity/commodity-symbols.yaml +68 -1
  7. package/dist/specs/commodity/commodity-time-series.yaml +33 -2
  8. package/dist/specs/commodity/historical-commodity-prices.yaml +33 -2
  9. package/dist/specs/dns/bulk-dns-lookup.yaml +45 -3
  10. package/dist/specs/dns/dns-history-lookup.yaml +76 -3
  11. package/dist/specs/dns/dns-lookup.yaml +72 -6
  12. package/dist/specs/dns/reverse-dns-lookup.yaml +91 -2
  13. package/dist/specs/financial/bulk-vat-rates-country.yaml +18 -0
  14. package/dist/specs/financial/financial-apis-supported-countries.yaml +75 -17
  15. package/dist/specs/financial/iban-validation.yaml +19 -1
  16. package/dist/specs/financial/swift-code-finder.yaml +18 -0
  17. package/dist/specs/financial/swift-code-lookup.yaml +18 -0
  18. package/dist/specs/financial/vat-number-validation.yaml +48 -0
  19. package/dist/specs/financial/vat-rates-by-ip.yaml +18 -0
  20. package/dist/specs/financial/vat-rates-country.yaml +18 -0
  21. package/dist/specs/geocoding/forward-geocoding.yaml +95 -2
  22. package/dist/specs/geocoding/reverse-geocoding.yaml +71 -0
  23. package/dist/specs/phone-number-validation/bulk-phone-number-validation.yaml +25 -3
  24. package/dist/specs/phone-number-validation/phone-validation.yaml +49 -3
  25. package/dist/specs/scraper/web-scraper.yaml +85 -7
  26. package/dist/specs/weather/air-quality.yaml +71 -5
  27. package/dist/specs/weather/astronomy-data.yaml +84 -1
  28. package/dist/specs/weather/bulk-live-weather.yaml +159 -3
  29. package/dist/specs/weather/flood-forecast.yaml +61 -11
  30. package/dist/specs/weather/historical-weather.yaml +53 -3
  31. package/dist/specs/weather/live-weather.yaml +66 -15
  32. package/dist/specs/weather/marine-weather.yaml +74 -8
  33. package/dist/specs/weather/time-series-weather.yaml +60 -8
  34. package/dist/specs/weather/weather-forecast.yaml +76 -6
  35. package/package.json +1 -1
  36. package/specs/commodity/commodity-fluctuation.json +44 -2
  37. package/specs/commodity/commodity-intraday-rates.json +44 -2
  38. package/specs/commodity/commodity-prices.json +44 -2
  39. package/specs/commodity/commodity-symbols.json +95 -1
  40. package/specs/commodity/commodity-time-series.json +44 -2
  41. package/specs/commodity/historical-commodity-prices.json +44 -2
  42. package/specs/dns/bulk-dns-lookup.json +63 -4
  43. package/specs/dns/dns-history-lookup.json +102 -3
  44. package/specs/dns/dns-lookup.json +96 -6
  45. package/specs/dns/reverse-dns-lookup.json +121 -2
  46. package/specs/financial/bulk-vat-rates-country.json +27 -0
  47. package/specs/financial/financial-apis-supported-countries.json +114 -23
  48. package/specs/financial/iban-validation.json +28 -1
  49. package/specs/financial/swift-code-finder.json +27 -0
  50. package/specs/financial/swift-code-lookup.json +27 -0
  51. package/specs/financial/vat-number-validation.json +72 -0
  52. package/specs/financial/vat-rates-by-ip.json +27 -0
  53. package/specs/financial/vat-rates-country.json +27 -0
  54. package/specs/geocoding/forward-geocoding.json +127 -2
  55. package/specs/geocoding/reverse-geocoding.json +102 -0
  56. package/specs/phone-number-validation/bulk-phone-number-validation.json +35 -3
  57. package/specs/phone-number-validation/phone-validation.json +65 -3
  58. package/specs/scraper/web-scraper.json +110 -7
  59. package/specs/weather/air-quality.json +92 -5
  60. package/specs/weather/astronomy-data.json +122 -1
  61. package/specs/weather/bulk-live-weather.json +227 -3
  62. package/specs/weather/flood-forecast.json +78 -11
  63. package/specs/weather/historical-weather.json +70 -3
  64. package/specs/weather/live-weather.json +85 -17
  65. package/specs/weather/marine-weather.json +95 -8
  66. package/specs/weather/time-series-weather.json +82 -8
  67. package/specs/weather/weather-forecast.json +107 -6
@@ -2,7 +2,7 @@ openapi: 3.1.1
2
2
  info:
3
3
  title: Live Weather API
4
4
  version: 1.0.0
5
- description: Retrieve real-time weather conditions for any location worldwide. Supports lookup by city name or address, GPS coordinates, or IP address. Returns current temperature at 2m, apparent temperature, precipitation (rain, showers, snowfall), cloud cover, pressure at MSL and surface, wind speed and gusts at 10m, WMO weather code, air quality (European and US AQI indices plus pollutant concentrations), and astronomical data (sunrise/sunset, moon phase, day length). Pass a timezone to override the resolved location timezone. When no parameter is supplied the API auto-detects the requesting IP address. latitude, longitude, and elevation in the location object are always strings, never numbers. An extreme out-of-range coordinate (e.g. lat=999) returns a different, less specific error message than a moderately out-of-range one (e.g. lat=91).
5
+ description: Retrieve real-time weather conditions for any location worldwide. Supports lookup by city name or address, GPS coordinates, or IP address. Returns current temperature at 2m, apparent temperature, precipitation (rain, showers, snowfall), cloud cover, pressure at MSL and surface, wind speed and gusts at 10m, WMO weather code, air quality (European and US AQI indices plus pollutant concentrations), and astronomical data (sunrise/sunset, moon phase, day length). Pass a timezone to override the resolved location timezone. When no parameter is supplied the API auto-detects the requesting IP address. latitude, longitude, and elevation in the location object are always strings, never numbers. lat or long outside the valid range returns a 400 (lat=91 or lat=999 both return the same message), while a non-numeric value, or exactly one of lat/long being 0, returns "Please provide both lat and long parameters.". Query parameter format is accepted but only JSON is returned.
6
6
  contact:
7
7
  name: APIFreaks Support
8
8
  url: https://apifreaks.com/contact
@@ -19,29 +19,38 @@ paths:
19
19
  description: Get current weather data including temperature, humidity, precipitation, wind conditions, atmospheric pressure, and air quality for any location. Accepts city names, coordinates, or IP addresses. Also includes astronomy data and timezone-aware timestamps.
20
20
  operationId: getLiveWeather
21
21
  parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: Format of the response. Only json is supported.
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ default: json
22
31
  - name: location
23
32
  in: query
24
33
  schema:
25
34
  type: string
26
- description: City name, place name, or full address.
35
+ description: City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.
27
36
  required: false
28
37
  - name: lat
29
38
  in: query
30
39
  schema:
31
40
  type: number
32
- description: Latitude of the location.
41
+ 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.
33
42
  required: false
34
43
  - name: long
35
44
  in: query
36
45
  schema:
37
46
  type: number
38
- description: Longitude of the location.
47
+ 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.
39
48
  required: false
40
49
  - name: ip
41
50
  in: query
42
51
  schema:
43
52
  type: string
44
- description: IP(v4 or v6) address for location inference.
53
+ 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.
45
54
  required: false
46
55
  - name: timezone
47
56
  in: query
@@ -127,28 +136,20 @@ paths:
127
136
  X-AF-Credits-Cost:
128
137
  $ref: '#/components/headers/X-AF-Credits-Cost'
129
138
  '400':
130
- description: Bad Request — Missing/incomplete lat+long pair, coordinates out of range, invalid timezone, or invalid IP address
139
+ description: Bad Request — Missing/incomplete lat+long pair, coordinates out of range or non-numeric, invalid timezone, invalid IP address, or missing API key
131
140
  content:
132
141
  application/json:
133
142
  schema:
134
143
  $ref: '#/components/schemas/ErrorResponse'
135
144
  examples:
136
145
  InvalidCoordinates:
137
- summary: Latitude or longitude out of range (e.g. lat=91)
146
+ summary: Latitude or longitude out of range (e.g. lat=91 or lat=999 with a non-zero long)
138
147
  value:
139
148
  timestamp: '2026-07-24T11:09:43.616Z'
140
149
  status: 400
141
150
  message: Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
142
151
  error: invalid-params
143
152
  path: /v1.0/weather/current
144
- ExtremeCoordinateValue:
145
- summary: Extreme out-of-range value (e.g. lat=999) hits a different, misleading message than a moderate out-of-range value like lat=91
146
- value:
147
- timestamp: '2026-07-24T11:09:30.501Z'
148
- status: 400
149
- message: Please provide both lat and long parameters.
150
- error: invalid-params
151
- path: /v1.0/weather/current
152
153
  InvalidTimezone:
153
154
  summary: Invalid timezone
154
155
  value:
@@ -165,6 +166,48 @@ paths:
165
166
  message: Invalid IP address
166
167
  error: invalid-params
167
168
  path: /v1.0/weather/current
169
+ UnresolvedCoordinates:
170
+ summary: lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)
171
+ value:
172
+ timestamp: '2026-11-25T10:01:00.000Z'
173
+ status: 400
174
+ message: Please provide both lat and long parameters.
175
+ error: invalid-params
176
+ path: /v1.0/weather/current
177
+ IncompleteCoordinates:
178
+ summary: Only one of lat/long supplied
179
+ value:
180
+ error: Invalid Param Exception
181
+ message: please pass correct parameters
182
+ path: /v1.0/weather/current
183
+ status: 400
184
+ timestamp: '2026-11-25T10:01:00.000Z'
185
+ MissingApiKey:
186
+ summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
187
+ value:
188
+ error: Invalid Param Exception
189
+ message: Please provide apiKey
190
+ path: /v1.0/weather/current
191
+ status: 400
192
+ timestamp: '2026-11-25T10:01:00.000Z'
193
+ headers:
194
+ X-AF-Credits-Cost:
195
+ $ref: '#/components/headers/X-AF-Credits-Cost'
196
+ '401':
197
+ description: Unauthorized — The API key is invalid
198
+ content:
199
+ application/json:
200
+ schema:
201
+ $ref: '#/components/schemas/ErrorResponse'
202
+ examples:
203
+ invalidApiKey:
204
+ summary: Invalid API key
205
+ value:
206
+ error: API Access Exception
207
+ message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
208
+ path: /v1.0/weather/current
209
+ status: 401
210
+ timestamp: '2026-11-25T10:01:00.000Z'
168
211
  headers:
169
212
  X-AF-Credits-Cost:
170
213
  $ref: '#/components/headers/X-AF-Credits-Cost'
@@ -183,6 +226,14 @@ paths:
183
226
  message: Location not found
184
227
  error: error
185
228
  path: /v1.0/weather/current
229
+ ResourceNotFound:
230
+ summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
231
+ value:
232
+ error: Resource Not Found
233
+ message: The requested resource could not be found. Please verify the URL and try again.
234
+ path: /v1.0/weather/current
235
+ status: 404
236
+ timestamp: '2026-11-25T10:01:00.000Z'
186
237
  headers:
187
238
  X-AF-Credits-Cost:
188
239
  $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: 'Format of the response. Possible values: json.'
25
+ description: Format of the response. Only json is supported.
26
26
  schema:
27
27
  type: string
28
28
  enum:
@@ -31,33 +31,33 @@ paths:
31
31
  - name: startDate
32
32
  in: query
33
33
  required: false
34
- description: Starting date for marine forecast data in YYYY-MM-DD format. Must be today or a future date, and must be supplied together with endDate — providing only one of the two returns a 400 error. The difference between endDate and startDate must not exceed 16 days.
34
+ description: Starting date for marine forecast data in YYYY-MM-DD format. Must be today or a future date, and must be supplied together with endDate. Both dates must fall within today through 15 days ahead (16 days inclusive).
35
35
  schema:
36
36
  type: string
37
37
  format: date
38
38
  - name: endDate
39
39
  in: query
40
40
  required: false
41
- description: End date for marine forecast data in YYYY-MM-DD format. Must be today or a future date, and must be supplied together with startDate — providing only one of the two returns a 400 error. The difference between endDate and startDate must not exceed 16 days.
41
+ description: End date for marine forecast data in YYYY-MM-DD format. Must be today or a future date, and must be supplied together with startDate. Both dates must fall within today through 15 days ahead (16 days inclusive).
42
42
  schema:
43
43
  type: string
44
44
  format: date
45
45
  - name: location
46
46
  in: query
47
47
  required: false
48
- description: City name, place name, or full address.
48
+ description: City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.
49
49
  schema:
50
50
  type: string
51
51
  - name: lat
52
52
  in: query
53
53
  required: false
54
- description: Latitude of the location.
54
+ 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.
55
55
  schema:
56
56
  type: number
57
57
  - name: long
58
58
  in: query
59
59
  required: false
60
- description: Longitude of the location.
60
+ 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.
61
61
  schema:
62
62
  type: number
63
63
  - name: ip
@@ -230,9 +230,9 @@ paths:
230
230
  invalidTimezone:
231
231
  summary: Invalid timezone
232
232
  value:
233
- timestamp: '2026-07-24T11:35:20.399Z'
233
+ timestamp: '2026-11-25T10:01:00.000Z'
234
234
  status: 400
235
- message: Invalid timezone
235
+ message: Check whether your input value is correct; timezone = NotATimezone
236
236
  error: error
237
237
  path: /v1.0/weather/marine
238
238
  dateRangeExceeded:
@@ -251,6 +251,64 @@ paths:
251
251
  path: /v1.0/weather/marine
252
252
  status: 400
253
253
  timestamp: '2026-07-24T11:35:30.525Z'
254
+ invalidDateFormat:
255
+ summary: startDate or endDate not in YYYY-MM-DD format
256
+ value:
257
+ timestamp: '2026-11-25T10:01:00.000Z'
258
+ status: 400
259
+ message: startDate must be in yyyy-mm-dd format
260
+ error: invalid-params
261
+ path: /v1.0/weather/marine
262
+ endBeforeStart:
263
+ summary: startDate later than endDate
264
+ value:
265
+ timestamp: '2026-11-25T10:01:00.000Z'
266
+ status: 400
267
+ message: startDate must be before or equal to endDate
268
+ error: params-exception-error
269
+ path: /v1.0/weather/marine
270
+ InvalidCalendarDate:
271
+ summary: Well-formed but impossible date (e.g. startDate=2026-13-45)
272
+ value:
273
+ timestamp: '2026-11-25T10:01:00.000Z'
274
+ status: 400
275
+ message: Bad Request
276
+ error: error
277
+ path: /v1.0/weather/marine
278
+ UnresolvedCoordinates:
279
+ summary: lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)
280
+ value:
281
+ timestamp: '2026-11-25T10:01:00.000Z'
282
+ status: 400
283
+ message: Please provide both lat and long parameters.
284
+ error: invalid-params
285
+ path: /v1.0/weather/marine
286
+ MissingApiKey:
287
+ summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
288
+ value:
289
+ error: Invalid Param Exception
290
+ message: Please provide apiKey
291
+ path: /v1.0/weather/marine
292
+ status: 400
293
+ timestamp: '2026-11-25T10:01:00.000Z'
294
+ headers:
295
+ X-AF-Credits-Cost:
296
+ $ref: '#/components/headers/X-AF-Credits-Cost'
297
+ '401':
298
+ description: Unauthorized — The API key is invalid
299
+ content:
300
+ application/json:
301
+ schema:
302
+ $ref: '#/components/schemas/ErrorResponse'
303
+ examples:
304
+ invalidApiKey:
305
+ summary: Invalid API key
306
+ value:
307
+ error: API Access Exception
308
+ message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
309
+ path: /v1.0/weather/marine
310
+ status: 401
311
+ timestamp: '2026-11-25T10:01:00.000Z'
254
312
  headers:
255
313
  X-AF-Credits-Cost:
256
314
  $ref: '#/components/headers/X-AF-Credits-Cost'
@@ -269,6 +327,14 @@ paths:
269
327
  message: Location not found
270
328
  error: error
271
329
  path: /v1.0/weather/marine
330
+ ResourceNotFound:
331
+ summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
332
+ value:
333
+ error: Resource Not Found
334
+ message: The requested resource could not be found. Please verify the URL and try again.
335
+ path: /v1.0/weather/marine
336
+ status: 404
337
+ timestamp: '2026-11-25T10:01:00.000Z'
272
338
  headers:
273
339
  X-AF-Credits-Cost:
274
340
  $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: 'Format of the response. Possible values: json.'
25
+ description: Format of the response. Only json is supported.
26
26
  schema:
27
27
  type: string
28
28
  enum:
@@ -34,37 +34,37 @@ paths:
34
34
  schema:
35
35
  type: string
36
36
  format: date
37
- description: Starting date for the data in YYYY-MM-DD format. Historical dates must be past dates only. Current or future dates are not allowed for historical data. Data available from 1940 onwards. For precision=daily, the difference between endDate and startDate must not exceed 90 days. For precision=hourly, the difference must not exceed 7 days.
37
+ description: Starting date for the data in YYYY-MM-DD format. Historical dates must be past dates only. Current or future dates are not allowed for historical data. Data available from 1940 onwards. For precision=daily, the range may span at most 90 days (endDate minus startDate of 89 days or less). For precision=hourly, the range may span at most 7 days (endDate minus startDate of 6 days or less).
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 the data in YYYY-MM-DD format. Historical dates must be past dates only. Current or future dates are not allowed for historical data. Data available from 1940 onwards. For precision=daily, the difference between endDate and startDate must not exceed 90 days. For precision=hourly, the difference must not exceed 7 days.
44
+ description: End date for the data in YYYY-MM-DD format. Historical dates must be past dates only. Current or future dates are not allowed for historical data. Data available from 1940 onwards. For precision=daily, the range may span at most 90 days (endDate minus startDate of 89 days or less). For precision=hourly, the range may span at most 7 days (endDate minus startDate of 6 days or less).
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, used together with long. A value of exactly 0 is treated as missing by the live API, and the location is then inferred from the requester IP instead of returning an error, so use a small non-zero value (e.g. 0.0001) for equator queries.
55
+ description: Latitude of the location, used 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, used together with lat. A value of exactly 0 is treated as missing by the live API, and the location is then inferred from the requester IP instead of returning an error, so use a small non-zero value (e.g. 0.0001) for prime-meridian queries.
61
+ description: Longitude of the location, used 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
69
  - name: precision
70
70
  in: query
@@ -74,7 +74,7 @@ paths:
74
74
  - hourly
75
75
  type: string
76
76
  default: daily
77
- description: Precision of the data. daily returns a daily aggregate per date; hourly returns 24 hourly readings per date instead and requires the date range to be 7 days or less.
77
+ description: Precision of the data. daily returns a daily aggregate per date; hourly returns 24 hourly readings per date instead and requires the date range to span at most 7 days (inclusive of both dates).
78
78
  required: false
79
79
  - name: timezone
80
80
  in: query
@@ -309,6 +309,58 @@ paths:
309
309
  message: Check whether your input value is correct; timezone = NotATimezone
310
310
  error: error
311
311
  path: /v1.0/weather/time-series
312
+ UnresolvedCoordinates:
313
+ summary: lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)
314
+ value:
315
+ timestamp: '2026-11-25T10:01:00.000Z'
316
+ status: 400
317
+ message: Please provide both lat and long parameters.
318
+ error: invalid-params
319
+ path: /v1.0/weather/time-series
320
+ MissingApiKey:
321
+ summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
322
+ value:
323
+ error: Invalid Param Exception
324
+ message: Please provide apiKey
325
+ path: /v1.0/weather/time-series
326
+ status: 400
327
+ timestamp: '2026-11-25T10:01:00.000Z'
328
+ headers:
329
+ X-AF-Credits-Cost:
330
+ $ref: '#/components/headers/X-AF-Credits-Cost'
331
+ '401':
332
+ description: Unauthorized — The API key is invalid
333
+ content:
334
+ application/json:
335
+ schema:
336
+ $ref: '#/components/schemas/ErrorResponse'
337
+ examples:
338
+ invalidApiKey:
339
+ summary: Invalid API key
340
+ value:
341
+ error: API Access Exception
342
+ message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
343
+ path: /v1.0/weather/time-series
344
+ status: 401
345
+ timestamp: '2026-11-25T10:01:00.000Z'
346
+ headers:
347
+ X-AF-Credits-Cost:
348
+ $ref: '#/components/headers/X-AF-Credits-Cost'
349
+ '404':
350
+ description: Not Found — Wrong HTTP method or unknown resource
351
+ content:
352
+ application/json:
353
+ schema:
354
+ $ref: '#/components/schemas/ErrorResponse'
355
+ examples:
356
+ ResourceNotFound:
357
+ summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
358
+ value:
359
+ error: Resource Not Found
360
+ message: The requested resource could not be found. Please verify the URL and try again.
361
+ path: /v1.0/weather/time-series
362
+ status: 404
363
+ timestamp: '2026-11-25T10:01:00.000Z'
312
364
  headers:
313
365
  X-AF-Credits-Cost:
314
366
  $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: 'Format of the response. Possible values: json.'
25
+ description: Format of the response. Only json is supported.
26
26
  schema:
27
27
  type: string
28
28
  enum:
@@ -37,13 +37,13 @@ paths:
37
37
  - name: lat
38
38
  in: query
39
39
  required: false
40
- description: Latitude of the location. Must be supplied together with long or the request fails with a 400. Takes priority over location and ip when combined with them.
40
+ description: Latitude of the location. Must be supplied together with long. Takes priority over location and ip when combined with them. 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.
41
41
  schema:
42
42
  type: number
43
43
  - name: long
44
44
  in: query
45
45
  required: false
46
- description: Longitude of the location. Must be supplied together with lat or the request fails with a 400.
46
+ 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.
47
47
  schema:
48
48
  type: number
49
49
  - name: ip
@@ -55,21 +55,21 @@ paths:
55
55
  - name: startDate
56
56
  in: query
57
57
  required: false
58
- description: Start date for the forecast in YYYY-MM-DD format. Must be supplied together with endDate — passing only one returns a 400. Forecast dates must be today or later, and the range between startDate and endDate must not exceed 16 days from today.
58
+ description: Start date for the forecast in YYYY-MM-DD format. Must be supplied together with endDate. Forecast dates must be today or later, and both dates must fall within today through 15 days ahead (16 days inclusive).
59
59
  schema:
60
60
  type: string
61
61
  format: date
62
62
  - name: endDate
63
63
  in: query
64
64
  required: false
65
- description: End date for the forecast in YYYY-MM-DD format. Must be supplied together with startDate — passing only one returns a 400. Forecast dates must be today or later, and the range between startDate and endDate must not exceed 16 days from today.
65
+ description: End date for the forecast in YYYY-MM-DD format. Must be supplied together with startDate. Forecast dates must be today or later, and both dates must fall within today through 15 days ahead (16 days inclusive).
66
66
  schema:
67
67
  type: string
68
68
  format: date
69
69
  - name: forecastDays
70
70
  in: query
71
71
  required: false
72
- description: Number of days to forecast starting today, from 1 to 16. Default is 7. Not used together with startDate/endDate.
72
+ description: Number of days to forecast starting today, from 1 to 16. Default is 7. Ignored when startDate/endDate are provided.
73
73
  schema:
74
74
  type: integer
75
75
  minimum: 1
@@ -311,6 +311,76 @@ paths:
311
311
  message: Check whether your input value is correct; timezone = NotATimezone
312
312
  error: error
313
313
  path: /v1.0/weather/forecast
314
+ ZeroForecastDays:
315
+ summary: forecastDays=0
316
+ value:
317
+ timestamp: '2026-11-25T10:01:00.000Z'
318
+ status: 400
319
+ message: End date must be on or after start date.
320
+ error: error
321
+ path: /v1.0/weather/forecast
322
+ MissingApiKey:
323
+ summary: No API key supplied (neither X-apiKey header nor apiKey query parameter)
324
+ value:
325
+ error: Invalid Param Exception
326
+ message: Please provide apiKey
327
+ path: /v1.0/weather/forecast
328
+ status: 400
329
+ timestamp: '2026-11-25T10:01:00.000Z'
330
+ headers:
331
+ X-AF-Credits-Cost:
332
+ $ref: '#/components/headers/X-AF-Credits-Cost'
333
+ '401':
334
+ description: Unauthorized — The API key is invalid
335
+ content:
336
+ application/json:
337
+ schema:
338
+ $ref: '#/components/schemas/ErrorResponse'
339
+ examples:
340
+ invalidApiKey:
341
+ summary: Invalid API key
342
+ value:
343
+ error: API Access Exception
344
+ message: 'Provided API key is invalid. [For Technical Support: support@apifreaks.com]'
345
+ path: /v1.0/weather/forecast
346
+ status: 401
347
+ timestamp: '2026-11-25T10:01:00.000Z'
348
+ headers:
349
+ X-AF-Credits-Cost:
350
+ $ref: '#/components/headers/X-AF-Credits-Cost'
351
+ '404':
352
+ description: Not Found — Wrong HTTP method or unknown resource
353
+ content:
354
+ application/json:
355
+ schema:
356
+ $ref: '#/components/schemas/ErrorResponse'
357
+ examples:
358
+ ResourceNotFound:
359
+ summary: Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)
360
+ value:
361
+ error: Resource Not Found
362
+ message: The requested resource could not be found. Please verify the URL and try again.
363
+ path: /v1.0/weather/forecast
364
+ status: 404
365
+ timestamp: '2026-11-25T10:01:00.000Z'
366
+ headers:
367
+ X-AF-Credits-Cost:
368
+ $ref: '#/components/headers/X-AF-Credits-Cost'
369
+ '500':
370
+ description: Internal Server Error — Returned when forecastDays is not a number
371
+ content:
372
+ application/json:
373
+ schema:
374
+ $ref: '#/components/schemas/ErrorResponse'
375
+ examples:
376
+ InvalidForecastDaysType:
377
+ summary: forecastDays=abc (non-numeric); note the path in this response is duplicated
378
+ value:
379
+ timestamp: '2026-11-25T10:01:00.000Z'
380
+ status: 500
381
+ message: Internal Server Error
382
+ error: internal-server-error
383
+ path: /v1.0/weather/v1.0/weather/forecast
314
384
  headers:
315
385
  X-AF-Credits-Cost:
316
386
  $ref: '#/components/headers/X-AF-Credits-Cost'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apifreaks/openapi-specs",
3
- "version": "0.4.24",
3
+ "version": "0.4.25",
4
4
  "description": "Public OpenAPI 3.1 specifications for all APIFreaks API products.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -142,7 +142,7 @@
142
142
  }
143
143
  },
144
144
  "400": {
145
- "description": "Bad Request — Missing parameters or invalid dates",
145
+ "description": "Bad Request — Missing parameters or invalid dates, or missing API key",
146
146
  "content": {
147
147
  "application/json": {
148
148
  "examples": {
@@ -185,6 +185,16 @@
185
185
  "error": "VALIDATION_ERROR",
186
186
  "message": "Start date cannot be after end date"
187
187
  }
188
+ },
189
+ "missingApiKey": {
190
+ "summary": "API key not sent",
191
+ "value": {
192
+ "error": "Invalid Param Exception",
193
+ "message": "Please provide apiKey",
194
+ "path": "/v2.0/commodity/fluctuation",
195
+ "status": 400,
196
+ "timestamp": "2026-11-25T10:07:00.000Z"
197
+ }
188
198
  }
189
199
  },
190
200
  "schema": {
@@ -198,6 +208,28 @@
198
208
  }
199
209
  }
200
210
  },
211
+ "401": {
212
+ "description": "Unauthorized — API key invalid",
213
+ "content": {
214
+ "application/json": {
215
+ "schema": {
216
+ "$ref": "#/components/schemas/ErrorResponse"
217
+ },
218
+ "examples": {
219
+ "invalidApiKey": {
220
+ "summary": "Invalid API key",
221
+ "value": {
222
+ "error": "API Access Exception",
223
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
224
+ "path": "/v2.0/commodity/fluctuation",
225
+ "status": 401,
226
+ "timestamp": "2026-11-25T10:07:00.000Z"
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ },
201
233
  "402": {
202
234
  "description": "Payment Required — Maximum symbols per request exceeded",
203
235
  "content": {
@@ -226,7 +258,7 @@
226
258
  }
227
259
  },
228
260
  "404": {
229
- "description": "Not found - Symbol or data not available",
261
+ "description": "Not found - Symbol or data not available, or wrong HTTP method",
230
262
  "content": {
231
263
  "application/json": {
232
264
  "schema": {
@@ -257,6 +289,16 @@
257
289
  "error": "DATA_NOT_FOUND",
258
290
  "message": "No data found for the given date range"
259
291
  }
292
+ },
293
+ "wrongMethod": {
294
+ "summary": "Wrong HTTP method used on the endpoint",
295
+ "value": {
296
+ "error": "Resource Not Found",
297
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
298
+ "path": "/v2.0/commodity/fluctuation",
299
+ "status": 404,
300
+ "timestamp": "2026-11-25T10:07:00.000Z"
301
+ }
260
302
  }
261
303
  }
262
304
  }