@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.
Files changed (69) hide show
  1. package/dist/index.cjs +3912 -757
  2. package/dist/index.js +3912 -757
  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/dist/specs/whois/reverse-whois.yaml +78 -75
  36. package/package.json +1 -1
  37. package/specs/commodity/commodity-fluctuation.json +44 -2
  38. package/specs/commodity/commodity-intraday-rates.json +44 -2
  39. package/specs/commodity/commodity-prices.json +44 -2
  40. package/specs/commodity/commodity-symbols.json +95 -1
  41. package/specs/commodity/commodity-time-series.json +44 -2
  42. package/specs/commodity/historical-commodity-prices.json +44 -2
  43. package/specs/dns/bulk-dns-lookup.json +63 -4
  44. package/specs/dns/dns-history-lookup.json +102 -3
  45. package/specs/dns/dns-lookup.json +96 -6
  46. package/specs/dns/reverse-dns-lookup.json +121 -2
  47. package/specs/financial/bulk-vat-rates-country.json +27 -0
  48. package/specs/financial/financial-apis-supported-countries.json +114 -23
  49. package/specs/financial/iban-validation.json +28 -1
  50. package/specs/financial/swift-code-finder.json +27 -0
  51. package/specs/financial/swift-code-lookup.json +27 -0
  52. package/specs/financial/vat-number-validation.json +72 -0
  53. package/specs/financial/vat-rates-by-ip.json +27 -0
  54. package/specs/financial/vat-rates-country.json +27 -0
  55. package/specs/geocoding/forward-geocoding.json +127 -2
  56. package/specs/geocoding/reverse-geocoding.json +102 -0
  57. package/specs/phone-number-validation/bulk-phone-number-validation.json +35 -3
  58. package/specs/phone-number-validation/phone-validation.json +65 -3
  59. package/specs/scraper/web-scraper.json +110 -7
  60. package/specs/weather/air-quality.json +92 -5
  61. package/specs/weather/astronomy-data.json +122 -1
  62. package/specs/weather/bulk-live-weather.json +227 -3
  63. package/specs/weather/flood-forecast.json +78 -11
  64. package/specs/weather/historical-weather.json +70 -3
  65. package/specs/weather/live-weather.json +85 -17
  66. package/specs/weather/marine-weather.json +95 -8
  67. package/specs/weather/time-series-weather.json +82 -8
  68. package/specs/weather/weather-forecast.json +107 -6
  69. package/specs/whois/reverse-whois.json +71 -92
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Live Weather API",
5
5
  "version": "1.0.0",
6
- "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).",
6
+ "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.",
7
7
  "contact": {
8
8
  "name": "APIFreaks Support",
9
9
  "url": "https://apifreaks.com/contact",
@@ -24,13 +24,24 @@
24
24
  "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.",
25
25
  "operationId": "getLiveWeather",
26
26
  "parameters": [
27
+ {
28
+ "name": "format",
29
+ "in": "query",
30
+ "required": false,
31
+ "description": "Format of the response. Only json is supported.",
32
+ "schema": {
33
+ "type": "string",
34
+ "enum": ["json"],
35
+ "default": "json"
36
+ }
37
+ },
27
38
  {
28
39
  "name": "location",
29
40
  "in": "query",
30
41
  "schema": {
31
42
  "type": "string"
32
43
  },
33
- "description": "City name, place name, or full address.",
44
+ "description": "City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.",
34
45
  "required": false
35
46
  },
36
47
  {
@@ -39,7 +50,7 @@
39
50
  "schema": {
40
51
  "type": "number"
41
52
  },
42
- "description": "Latitude of the location.",
53
+ "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.",
43
54
  "required": false
44
55
  },
45
56
  {
@@ -48,7 +59,7 @@
48
59
  "schema": {
49
60
  "type": "number"
50
61
  },
51
- "description": "Longitude of the location.",
62
+ "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.",
52
63
  "required": false
53
64
  },
54
65
  {
@@ -57,7 +68,7 @@
57
68
  "schema": {
58
69
  "type": "string"
59
70
  },
60
- "description": "IP(v4 or v6) address for location inference.",
71
+ "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.",
61
72
  "required": false
62
73
  },
63
74
  {
@@ -161,7 +172,7 @@
161
172
  }
162
173
  },
163
174
  "400": {
164
- "description": "Bad Request — Missing/incomplete lat+long pair, coordinates out of range, invalid timezone, or invalid IP address",
175
+ "description": "Bad Request — Missing/incomplete lat+long pair, coordinates out of range or non-numeric, invalid timezone, invalid IP address, or missing API key",
165
176
  "content": {
166
177
  "application/json": {
167
178
  "schema": {
@@ -169,7 +180,7 @@
169
180
  },
170
181
  "examples": {
171
182
  "InvalidCoordinates": {
172
- "summary": "Latitude or longitude out of range (e.g. lat=91)",
183
+ "summary": "Latitude or longitude out of range (e.g. lat=91 or lat=999 with a non-zero long)",
173
184
  "value": {
174
185
  "timestamp": "2026-07-24T11:09:43.616Z",
175
186
  "status": 400,
@@ -178,16 +189,6 @@
178
189
  "path": "/v1.0/weather/current"
179
190
  }
180
191
  },
181
- "ExtremeCoordinateValue": {
182
- "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",
183
- "value": {
184
- "timestamp": "2026-07-24T11:09:30.501Z",
185
- "status": 400,
186
- "message": "Please provide both lat and long parameters.",
187
- "error": "invalid-params",
188
- "path": "/v1.0/weather/current"
189
- }
190
- },
191
192
  "InvalidTimezone": {
192
193
  "summary": "Invalid timezone",
193
194
  "value": {
@@ -207,6 +208,36 @@
207
208
  "error": "invalid-params",
208
209
  "path": "/v1.0/weather/current"
209
210
  }
211
+ },
212
+ "UnresolvedCoordinates": {
213
+ "summary": "lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)",
214
+ "value": {
215
+ "timestamp": "2026-11-25T10:01:00.000Z",
216
+ "status": 400,
217
+ "message": "Please provide both lat and long parameters.",
218
+ "error": "invalid-params",
219
+ "path": "/v1.0/weather/current"
220
+ }
221
+ },
222
+ "IncompleteCoordinates": {
223
+ "summary": "Only one of lat/long supplied",
224
+ "value": {
225
+ "error": "Invalid Param Exception",
226
+ "message": "please pass correct parameters",
227
+ "path": "/v1.0/weather/current",
228
+ "status": 400,
229
+ "timestamp": "2026-11-25T10:01:00.000Z"
230
+ }
231
+ },
232
+ "MissingApiKey": {
233
+ "summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
234
+ "value": {
235
+ "error": "Invalid Param Exception",
236
+ "message": "Please provide apiKey",
237
+ "path": "/v1.0/weather/current",
238
+ "status": 400,
239
+ "timestamp": "2026-11-25T10:01:00.000Z"
240
+ }
210
241
  }
211
242
  }
212
243
  }
@@ -234,6 +265,43 @@
234
265
  "error": "error",
235
266
  "path": "/v1.0/weather/current"
236
267
  }
268
+ },
269
+ "ResourceNotFound": {
270
+ "summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
271
+ "value": {
272
+ "error": "Resource Not Found",
273
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
274
+ "path": "/v1.0/weather/current",
275
+ "status": 404,
276
+ "timestamp": "2026-11-25T10:01:00.000Z"
277
+ }
278
+ }
279
+ }
280
+ }
281
+ },
282
+ "headers": {
283
+ "X-AF-Credits-Cost": {
284
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
285
+ }
286
+ }
287
+ },
288
+ "401": {
289
+ "description": "Unauthorized — The API key is invalid",
290
+ "content": {
291
+ "application/json": {
292
+ "schema": {
293
+ "$ref": "#/components/schemas/ErrorResponse"
294
+ },
295
+ "examples": {
296
+ "invalidApiKey": {
297
+ "summary": "Invalid API key",
298
+ "value": {
299
+ "error": "API Access Exception",
300
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
301
+ "path": "/v1.0/weather/current",
302
+ "status": 401,
303
+ "timestamp": "2026-11-25T10:01:00.000Z"
304
+ }
237
305
  }
238
306
  }
239
307
  }
@@ -28,7 +28,7 @@
28
28
  "name": "format",
29
29
  "in": "query",
30
30
  "required": false,
31
- "description": "Format of the response. Possible values: json.",
31
+ "description": "Format of the response. Only json is supported.",
32
32
  "schema": {
33
33
  "type": "string",
34
34
  "enum": ["json"],
@@ -39,7 +39,7 @@
39
39
  "name": "startDate",
40
40
  "in": "query",
41
41
  "required": false,
42
- "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.",
42
+ "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).",
43
43
  "schema": {
44
44
  "type": "string",
45
45
  "format": "date"
@@ -49,7 +49,7 @@
49
49
  "name": "endDate",
50
50
  "in": "query",
51
51
  "required": false,
52
- "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.",
52
+ "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).",
53
53
  "schema": {
54
54
  "type": "string",
55
55
  "format": "date"
@@ -59,7 +59,7 @@
59
59
  "name": "location",
60
60
  "in": "query",
61
61
  "required": false,
62
- "description": "City name, place name, or full address.",
62
+ "description": "City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.",
63
63
  "schema": {
64
64
  "type": "string"
65
65
  }
@@ -68,7 +68,7 @@
68
68
  "name": "lat",
69
69
  "in": "query",
70
70
  "required": false,
71
- "description": "Latitude of the location.",
71
+ "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.",
72
72
  "schema": {
73
73
  "type": "number"
74
74
  }
@@ -77,7 +77,7 @@
77
77
  "name": "long",
78
78
  "in": "query",
79
79
  "required": false,
80
- "description": "Longitude of the location.",
80
+ "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.",
81
81
  "schema": {
82
82
  "type": "number"
83
83
  }
@@ -289,9 +289,9 @@
289
289
  "invalidTimezone": {
290
290
  "summary": "Invalid timezone",
291
291
  "value": {
292
- "timestamp": "2026-07-24T11:35:20.399Z",
292
+ "timestamp": "2026-11-25T10:01:00.000Z",
293
293
  "status": 400,
294
- "message": "Invalid timezone",
294
+ "message": "Check whether your input value is correct; timezone = NotATimezone",
295
295
  "error": "error",
296
296
  "path": "/v1.0/weather/marine"
297
297
  }
@@ -315,6 +315,56 @@
315
315
  "status": 400,
316
316
  "timestamp": "2026-07-24T11:35:30.525Z"
317
317
  }
318
+ },
319
+ "invalidDateFormat": {
320
+ "summary": "startDate or endDate not in YYYY-MM-DD format",
321
+ "value": {
322
+ "timestamp": "2026-11-25T10:01:00.000Z",
323
+ "status": 400,
324
+ "message": "startDate must be in yyyy-mm-dd format",
325
+ "error": "invalid-params",
326
+ "path": "/v1.0/weather/marine"
327
+ }
328
+ },
329
+ "endBeforeStart": {
330
+ "summary": "startDate later than endDate",
331
+ "value": {
332
+ "timestamp": "2026-11-25T10:01:00.000Z",
333
+ "status": 400,
334
+ "message": "startDate must be before or equal to endDate",
335
+ "error": "params-exception-error",
336
+ "path": "/v1.0/weather/marine"
337
+ }
338
+ },
339
+ "InvalidCalendarDate": {
340
+ "summary": "Well-formed but impossible date (e.g. startDate=2026-13-45)",
341
+ "value": {
342
+ "timestamp": "2026-11-25T10:01:00.000Z",
343
+ "status": 400,
344
+ "message": "Bad Request",
345
+ "error": "error",
346
+ "path": "/v1.0/weather/marine"
347
+ }
348
+ },
349
+ "UnresolvedCoordinates": {
350
+ "summary": "lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)",
351
+ "value": {
352
+ "timestamp": "2026-11-25T10:01:00.000Z",
353
+ "status": 400,
354
+ "message": "Please provide both lat and long parameters.",
355
+ "error": "invalid-params",
356
+ "path": "/v1.0/weather/marine"
357
+ }
358
+ },
359
+ "MissingApiKey": {
360
+ "summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
361
+ "value": {
362
+ "error": "Invalid Param Exception",
363
+ "message": "Please provide apiKey",
364
+ "path": "/v1.0/weather/marine",
365
+ "status": 400,
366
+ "timestamp": "2026-11-25T10:01:00.000Z"
367
+ }
318
368
  }
319
369
  }
320
370
  }
@@ -342,6 +392,43 @@
342
392
  "error": "error",
343
393
  "path": "/v1.0/weather/marine"
344
394
  }
395
+ },
396
+ "ResourceNotFound": {
397
+ "summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
398
+ "value": {
399
+ "error": "Resource Not Found",
400
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
401
+ "path": "/v1.0/weather/marine",
402
+ "status": 404,
403
+ "timestamp": "2026-11-25T10:01:00.000Z"
404
+ }
405
+ }
406
+ }
407
+ }
408
+ },
409
+ "headers": {
410
+ "X-AF-Credits-Cost": {
411
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
412
+ }
413
+ }
414
+ },
415
+ "401": {
416
+ "description": "Unauthorized — The API key is invalid",
417
+ "content": {
418
+ "application/json": {
419
+ "schema": {
420
+ "$ref": "#/components/schemas/ErrorResponse"
421
+ },
422
+ "examples": {
423
+ "invalidApiKey": {
424
+ "summary": "Invalid API key",
425
+ "value": {
426
+ "error": "API Access Exception",
427
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
428
+ "path": "/v1.0/weather/marine",
429
+ "status": 401,
430
+ "timestamp": "2026-11-25T10:01:00.000Z"
431
+ }
345
432
  }
346
433
  }
347
434
  }
@@ -28,7 +28,7 @@
28
28
  "name": "format",
29
29
  "in": "query",
30
30
  "required": false,
31
- "description": "Format of the response. Possible values: json.",
31
+ "description": "Format of the response. Only json is supported.",
32
32
  "schema": {
33
33
  "type": "string",
34
34
  "enum": ["json"],
@@ -43,7 +43,7 @@
43
43
  "type": "string",
44
44
  "format": "date"
45
45
  },
46
- "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."
46
+ "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)."
47
47
  },
48
48
  {
49
49
  "name": "endDate",
@@ -53,7 +53,7 @@
53
53
  "type": "string",
54
54
  "format": "date"
55
55
  },
56
- "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."
56
+ "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)."
57
57
  },
58
58
  {
59
59
  "name": "location",
@@ -61,7 +61,7 @@
61
61
  "schema": {
62
62
  "type": "string"
63
63
  },
64
- "description": "City name, place name, or full address.",
64
+ "description": "City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.",
65
65
  "required": false
66
66
  },
67
67
  {
@@ -70,7 +70,7 @@
70
70
  "schema": {
71
71
  "type": "number"
72
72
  },
73
- "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.",
73
+ "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.",
74
74
  "required": false
75
75
  },
76
76
  {
@@ -79,7 +79,7 @@
79
79
  "schema": {
80
80
  "type": "number"
81
81
  },
82
- "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.",
82
+ "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.",
83
83
  "required": false
84
84
  },
85
85
  {
@@ -88,7 +88,7 @@
88
88
  "schema": {
89
89
  "type": "string"
90
90
  },
91
- "description": "IP(v4 or v6) address for location inference.",
91
+ "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.",
92
92
  "required": false
93
93
  },
94
94
  {
@@ -99,7 +99,7 @@
99
99
  "type": "string",
100
100
  "default": "daily"
101
101
  },
102
- "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.",
102
+ "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).",
103
103
  "required": false
104
104
  },
105
105
  {
@@ -386,6 +386,80 @@
386
386
  "error": "error",
387
387
  "path": "/v1.0/weather/time-series"
388
388
  }
389
+ },
390
+ "UnresolvedCoordinates": {
391
+ "summary": "lat/long not a number, or exactly one of them is 0 (e.g. lat=abc&long=10 or lat=0&long=10)",
392
+ "value": {
393
+ "timestamp": "2026-11-25T10:01:00.000Z",
394
+ "status": 400,
395
+ "message": "Please provide both lat and long parameters.",
396
+ "error": "invalid-params",
397
+ "path": "/v1.0/weather/time-series"
398
+ }
399
+ },
400
+ "MissingApiKey": {
401
+ "summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
402
+ "value": {
403
+ "error": "Invalid Param Exception",
404
+ "message": "Please provide apiKey",
405
+ "path": "/v1.0/weather/time-series",
406
+ "status": 400,
407
+ "timestamp": "2026-11-25T10:01:00.000Z"
408
+ }
409
+ }
410
+ }
411
+ }
412
+ },
413
+ "headers": {
414
+ "X-AF-Credits-Cost": {
415
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
416
+ }
417
+ }
418
+ },
419
+ "401": {
420
+ "description": "Unauthorized — The API key is invalid",
421
+ "content": {
422
+ "application/json": {
423
+ "schema": {
424
+ "$ref": "#/components/schemas/ErrorResponse"
425
+ },
426
+ "examples": {
427
+ "invalidApiKey": {
428
+ "summary": "Invalid API key",
429
+ "value": {
430
+ "error": "API Access Exception",
431
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
432
+ "path": "/v1.0/weather/time-series",
433
+ "status": 401,
434
+ "timestamp": "2026-11-25T10:01:00.000Z"
435
+ }
436
+ }
437
+ }
438
+ }
439
+ },
440
+ "headers": {
441
+ "X-AF-Credits-Cost": {
442
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
443
+ }
444
+ }
445
+ },
446
+ "404": {
447
+ "description": "Not Found — Wrong HTTP method or unknown resource",
448
+ "content": {
449
+ "application/json": {
450
+ "schema": {
451
+ "$ref": "#/components/schemas/ErrorResponse"
452
+ },
453
+ "examples": {
454
+ "ResourceNotFound": {
455
+ "summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
456
+ "value": {
457
+ "error": "Resource Not Found",
458
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
459
+ "path": "/v1.0/weather/time-series",
460
+ "status": 404,
461
+ "timestamp": "2026-11-25T10:01:00.000Z"
462
+ }
389
463
  }
390
464
  }
391
465
  }
@@ -28,7 +28,7 @@
28
28
  "name": "format",
29
29
  "in": "query",
30
30
  "required": false,
31
- "description": "Format of the response. Possible values: json.",
31
+ "description": "Format of the response. Only json is supported.",
32
32
  "schema": {
33
33
  "type": "string",
34
34
  "enum": ["json"],
@@ -48,7 +48,7 @@
48
48
  "name": "lat",
49
49
  "in": "query",
50
50
  "required": false,
51
- "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.",
51
+ "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.",
52
52
  "schema": {
53
53
  "type": "number"
54
54
  }
@@ -57,7 +57,7 @@
57
57
  "name": "long",
58
58
  "in": "query",
59
59
  "required": false,
60
- "description": "Longitude of the location. Must be supplied together with lat or the request fails with a 400.",
60
+ "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.",
61
61
  "schema": {
62
62
  "type": "number"
63
63
  }
@@ -75,7 +75,7 @@
75
75
  "name": "startDate",
76
76
  "in": "query",
77
77
  "required": false,
78
- "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.",
78
+ "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).",
79
79
  "schema": {
80
80
  "type": "string",
81
81
  "format": "date"
@@ -85,7 +85,7 @@
85
85
  "name": "endDate",
86
86
  "in": "query",
87
87
  "required": false,
88
- "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.",
88
+ "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).",
89
89
  "schema": {
90
90
  "type": "string",
91
91
  "format": "date"
@@ -95,7 +95,7 @@
95
95
  "name": "forecastDays",
96
96
  "in": "query",
97
97
  "required": false,
98
- "description": "Number of days to forecast starting today, from 1 to 16. Default is 7. Not used together with startDate/endDate.",
98
+ "description": "Number of days to forecast starting today, from 1 to 16. Default is 7. Ignored when startDate/endDate are provided.",
99
99
  "schema": {
100
100
  "type": "integer",
101
101
  "minimum": 1,
@@ -386,6 +386,107 @@
386
386
  "error": "error",
387
387
  "path": "/v1.0/weather/forecast"
388
388
  }
389
+ },
390
+ "ZeroForecastDays": {
391
+ "summary": "forecastDays=0",
392
+ "value": {
393
+ "timestamp": "2026-11-25T10:01:00.000Z",
394
+ "status": 400,
395
+ "message": "End date must be on or after start date.",
396
+ "error": "error",
397
+ "path": "/v1.0/weather/forecast"
398
+ }
399
+ },
400
+ "MissingApiKey": {
401
+ "summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
402
+ "value": {
403
+ "error": "Invalid Param Exception",
404
+ "message": "Please provide apiKey",
405
+ "path": "/v1.0/weather/forecast",
406
+ "status": 400,
407
+ "timestamp": "2026-11-25T10:01:00.000Z"
408
+ }
409
+ }
410
+ }
411
+ }
412
+ },
413
+ "headers": {
414
+ "X-AF-Credits-Cost": {
415
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
416
+ }
417
+ }
418
+ },
419
+ "401": {
420
+ "description": "Unauthorized — The API key is invalid",
421
+ "content": {
422
+ "application/json": {
423
+ "schema": {
424
+ "$ref": "#/components/schemas/ErrorResponse"
425
+ },
426
+ "examples": {
427
+ "invalidApiKey": {
428
+ "summary": "Invalid API key",
429
+ "value": {
430
+ "error": "API Access Exception",
431
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
432
+ "path": "/v1.0/weather/forecast",
433
+ "status": 401,
434
+ "timestamp": "2026-11-25T10:01:00.000Z"
435
+ }
436
+ }
437
+ }
438
+ }
439
+ },
440
+ "headers": {
441
+ "X-AF-Credits-Cost": {
442
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
443
+ }
444
+ }
445
+ },
446
+ "404": {
447
+ "description": "Not Found — Wrong HTTP method or unknown resource",
448
+ "content": {
449
+ "application/json": {
450
+ "schema": {
451
+ "$ref": "#/components/schemas/ErrorResponse"
452
+ },
453
+ "examples": {
454
+ "ResourceNotFound": {
455
+ "summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
456
+ "value": {
457
+ "error": "Resource Not Found",
458
+ "message": "The requested resource could not be found. Please verify the URL and try again.",
459
+ "path": "/v1.0/weather/forecast",
460
+ "status": 404,
461
+ "timestamp": "2026-11-25T10:01:00.000Z"
462
+ }
463
+ }
464
+ }
465
+ }
466
+ },
467
+ "headers": {
468
+ "X-AF-Credits-Cost": {
469
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
470
+ }
471
+ }
472
+ },
473
+ "500": {
474
+ "description": "Internal Server Error — Returned when forecastDays is not a number",
475
+ "content": {
476
+ "application/json": {
477
+ "schema": {
478
+ "$ref": "#/components/schemas/ErrorResponse"
479
+ },
480
+ "examples": {
481
+ "InvalidForecastDaysType": {
482
+ "summary": "forecastDays=abc (non-numeric); note the path in this response is duplicated",
483
+ "value": {
484
+ "timestamp": "2026-11-25T10:01:00.000Z",
485
+ "status": 500,
486
+ "message": "Internal Server Error",
487
+ "error": "internal-server-error",
488
+ "path": "/v1.0/weather/v1.0/weather/forecast"
489
+ }
389
490
  }
390
491
  }
391
492
  }