@apifreaks/openapi-specs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/index.cjs +44663 -0
  4. package/dist/index.d.cts +30 -0
  5. package/dist/index.d.ts +30 -0
  6. package/dist/index.js +44631 -0
  7. package/package.json +81 -0
  8. package/specs/commodity/commodity-fluctuation.json +301 -0
  9. package/specs/commodity/commodity-prices.json +317 -0
  10. package/specs/commodity/commodity-symbols.json +215 -0
  11. package/specs/commodity/commodity-time-series.json +329 -0
  12. package/specs/commodity/historical-commodity-prices.json +273 -0
  13. package/specs/currency/currency-converter.json +261 -0
  14. package/specs/currency/currency-fluctuation.json +282 -0
  15. package/specs/currency/currency-historical-data-limit.json +158 -0
  16. package/specs/currency/currency-rate.json +229 -0
  17. package/specs/currency/currency-supported.json +234 -0
  18. package/specs/currency/currency-symbols.json +161 -0
  19. package/specs/currency/currency-time-series.json +325 -0
  20. package/specs/currency/geolocalized-currency-conversion.json +287 -0
  21. package/specs/currency/historical-currency-converter.json +269 -0
  22. package/specs/currency/historical-currency-rate.json +246 -0
  23. package/specs/dns/bulk-dns-lookup.json +624 -0
  24. package/specs/dns/dns-history-lookup.json +579 -0
  25. package/specs/dns/dns-lookup.json +466 -0
  26. package/specs/dns/reverse-dns-lookup.json +414 -0
  27. package/specs/domain/bulk-domain-checker.json +284 -0
  28. package/specs/domain/domain-search-with-suggestions.json +280 -0
  29. package/specs/domain/domain-search.json +206 -0
  30. package/specs/domain/subdomain-lookup.json +343 -0
  31. package/specs/email-validation/bulk-email-validation.json +534 -0
  32. package/specs/email-validation/email-checker.json +586 -0
  33. package/specs/financial/bulk-vat-rates-country.json +341 -0
  34. package/specs/financial/financial-apis-supported-countries.json +204 -0
  35. package/specs/financial/iban-validation.json +328 -0
  36. package/specs/financial/swift-code-finder.json +192 -0
  37. package/specs/financial/swift-code-lookup.json +220 -0
  38. package/specs/financial/vat-number-validation.json +283 -0
  39. package/specs/financial/vat-rates-by-ip.json +275 -0
  40. package/specs/financial/vat-rates-country.json +288 -0
  41. package/specs/general/usage-credits.json +218 -0
  42. package/specs/geocoding/forward-geocoding.json +402 -0
  43. package/specs/geocoding/reverse-geocoding.json +326 -0
  44. package/specs/geodb/administrative-units-details.json +250 -0
  45. package/specs/geodb/administrative-units-levels.json +198 -0
  46. package/specs/geodb/administrative-units.json +237 -0
  47. package/specs/geodb/cities.json +288 -0
  48. package/specs/geodb/countries-details.json +274 -0
  49. package/specs/geodb/countries.json +276 -0
  50. package/specs/geodb/flags-supported.json +166 -0
  51. package/specs/geodb/flags.json +227 -0
  52. package/specs/geodb/regions.json +109 -0
  53. package/specs/geodb/subregions.json +217 -0
  54. package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
  55. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
  56. package/specs/ip-intelligence/ip-locator.json +941 -0
  57. package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
  58. package/specs/other/astronomy-data.json +803 -0
  59. package/specs/pdf/delete-pdf-page.json +286 -0
  60. package/specs/pdf/linearize-pdf.json +277 -0
  61. package/specs/pdf/merge-pdf.json +285 -0
  62. package/specs/pdf/pdf-compress.json +304 -0
  63. package/specs/pdf/pdf-decrypt.json +297 -0
  64. package/specs/pdf/pdf-encrypt.json +314 -0
  65. package/specs/pdf/pdf-extract-pages.json +295 -0
  66. package/specs/pdf/pdf-file-status.json +208 -0
  67. package/specs/pdf/pdf-file.json +190 -0
  68. package/specs/pdf/pdf-files.json +126 -0
  69. package/specs/pdf/pdf-resource-download.json +168 -0
  70. package/specs/pdf/pdf-resource-upload-binary.json +218 -0
  71. package/specs/pdf/pdf-resource-upload.json +248 -0
  72. package/specs/pdf/pdf-restrict.json +343 -0
  73. package/specs/pdf/pdf-split-pages.json +281 -0
  74. package/specs/pdf/pdf-task-status.json +252 -0
  75. package/specs/pdf/pdf-to-image.json +1219 -0
  76. package/specs/pdf/pdf-unrestrict.json +324 -0
  77. package/specs/pdf/rotate-pdf-pages.json +305 -0
  78. package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
  79. package/specs/phone-validation/phone-number-validation.json +456 -0
  80. package/specs/scraper/web-scraper.json +674 -0
  81. package/specs/screenshot/bulk-screenshot.json +949 -0
  82. package/specs/screenshot/website-screenshot.json +1147 -0
  83. package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
  84. package/specs/ssl/ssl-certificate-lookup.json +634 -0
  85. package/specs/timezone/timezone-converter.json +362 -0
  86. package/specs/timezone/timezone-lookup.json +910 -0
  87. package/specs/user-agent/bulk-user-agent-parser.json +441 -0
  88. package/specs/user-agent/user-agent-parser.json +346 -0
  89. package/specs/weather/air-quality.json +779 -0
  90. package/specs/weather/bulk-live-weather.json +834 -0
  91. package/specs/weather/flood-forecast.json +693 -0
  92. package/specs/weather/historical-weather.json +1019 -0
  93. package/specs/weather/live-weather.json +789 -0
  94. package/specs/weather/marine-weather.json +940 -0
  95. package/specs/weather/time-series-weather.json +1056 -0
  96. package/specs/weather/weather-forecast.json +1202 -0
  97. package/specs/whois/asn-lookup.json +729 -0
  98. package/specs/whois/bulk-whois-lookup.json +698 -0
  99. package/specs/whois/domain-whois-history-lookup.json +500 -0
  100. package/specs/whois/reverse-whois.json +625 -0
  101. package/specs/whois/whois-domain-lookup.json +533 -0
  102. package/specs/whois/whois-ip-lookup.json +1110 -0
  103. package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
  104. package/specs/zip-code/zip-code-api.json +299 -0
  105. package/specs/zip-code/zip-code-distance-match.json +311 -0
  106. package/specs/zip-code/zip-code-distance.json +307 -0
  107. package/specs/zip-code/zip-codes-by-city.json +279 -0
  108. package/specs/zip-code/zip-codes-by-region.json +278 -0
  109. package/specs/zip-code/zip-codes-radius-search.json +349 -0
@@ -0,0 +1,1019 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Historical Weather APIs & Time-Series Analytics",
5
+ "version": "1.0.0",
6
+ "description": "Retrieve historical weather conditions for a single past date, with records available from 1940 through the present. Returns daily aggregate figures (temperature max/min/mean, precipitation, wind speed and gusts, cloud cover, humidity, pressure, dew point) by default, or 24 hourly readings for that date when `precision=hourly` is passed, plus sunrise/sunset/moon-phase astronomy data on every response. Accepts a location as a city name or address, GPS coordinates via `lat`/`long`, or an IP address; when none of these is supplied the API geolocates the requesting client's IP address instead. `latitude`, `longitude`, and `elevation` in the location object are always returned as strings, never numbers. This endpoint accepts only a single `date` per request --- use the Time-Series Weather API for continuous multi-date ranges.",
7
+ "contact": {
8
+ "name": "APIFreaks Support",
9
+ "url": "https://apifreaks.com/contact",
10
+ "email": "support@apifreaks.com"
11
+ }
12
+ },
13
+ "servers": [
14
+ {
15
+ "url": "https://api.apifreaks.com/v1.0/weather",
16
+ "description": "Historical Weather API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/historical": {
21
+ "get": {
22
+ "tags": ["Weather APIs"],
23
+ "summary": "Retrieve historical weather conditions for a specific past date and location, coordinates, or IP address",
24
+ "description": "Return daily aggregate or hourly weather readings plus astronomy data for a single past date going back to 1940, resolved by city/address, GPS coordinates, or IP address.",
25
+ "operationId": "getHistoricalData",
26
+ "parameters": [
27
+ {
28
+ "name": "format",
29
+ "in": "query",
30
+ "required": false,
31
+ "description": "Format of the response. Possible values: json.",
32
+ "schema": {
33
+ "type": "string",
34
+ "enum": ["json"],
35
+ "default": "json"
36
+ }
37
+ },
38
+ {
39
+ "name": "date",
40
+ "in": "query",
41
+ "required": true,
42
+ "description": "Specific date for which to fetch weather 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.",
43
+ "schema": {
44
+ "type": "string",
45
+ "format": "date"
46
+ }
47
+ },
48
+ {
49
+ "name": "location",
50
+ "in": "query",
51
+ "required": false,
52
+ "description": "City name, place name, or full address to look up historical weather for. Ignored when lat/long is provided.",
53
+ "schema": {
54
+ "type": "string"
55
+ }
56
+ },
57
+ {
58
+ "name": "lat",
59
+ "in": "query",
60
+ "required": false,
61
+ "description": "Latitude of the location. Takes precedence over location and ip when more than one location parameter is supplied.",
62
+ "schema": {
63
+ "type": "number"
64
+ }
65
+ },
66
+ {
67
+ "name": "long",
68
+ "in": "query",
69
+ "required": false,
70
+ "description": "Longitude of the location. Must be provided together with lat.",
71
+ "schema": {
72
+ "type": "number"
73
+ }
74
+ },
75
+ {
76
+ "name": "ip",
77
+ "in": "query",
78
+ "required": false,
79
+ "description": "IPv4 or IPv6 address for location inference. Ignored when location or lat/long is provided; if none of location, lat/long, or ip is supplied, the requesting client's IP address is used instead.",
80
+ "schema": {
81
+ "type": "string"
82
+ }
83
+ },
84
+ {
85
+ "name": "precision",
86
+ "in": "query",
87
+ "required": false,
88
+ "description": "Precision of the returned historical data. Possible values: daily (aggregated daily figures), hourly (24 hourly readings for the date). Default: daily.",
89
+ "schema": {
90
+ "type": "string",
91
+ "enum": ["daily", "hourly"],
92
+ "default": "daily"
93
+ }
94
+ },
95
+ {
96
+ "name": "timezone",
97
+ "in": "query",
98
+ "required": false,
99
+ "description": "IANA timezone to render the astronomy time fields in, instead of the resolved location's own timezone. When set, sunrise/sunset/moonrise-type fields include the date (YYYY-MM-DD HH:MM) instead of only HH:MM.",
100
+ "schema": {
101
+ "type": "string"
102
+ }
103
+ }
104
+ ],
105
+ "responses": {
106
+ "200": {
107
+ "description": "Successful response",
108
+ "content": {
109
+ "application/json": {
110
+ "schema": {
111
+ "$ref": "#/components/schemas/HistoricalResponse"
112
+ },
113
+ "examples": {
114
+ "dailyPrecision": {
115
+ "summary": "precision=daily response (default)",
116
+ "value": {
117
+ "location": {
118
+ "location_string": "Lahore",
119
+ "country_name": "Pakistan",
120
+ "state_prov": "Punjab",
121
+ "city": "Lahore",
122
+ "locality": "",
123
+ "latitude": "31.56568",
124
+ "longitude": "74.31418",
125
+ "elevation": "",
126
+ "timezone": "Asia/Karachi",
127
+ "timezone_abbreviation": "GMT+5"
128
+ },
129
+ "historical": {
130
+ "daily": {
131
+ "timestamp": "1940-10-10",
132
+ "weather_code": 0,
133
+ "temperature_2m_mean": 28.1,
134
+ "temperature_2m_max": 37.9,
135
+ "temperature_2m_min": 20.3,
136
+ "apparent_temperature_mean": 25,
137
+ "apparent_temperature_max": 36.5,
138
+ "apparent_temperature_min": 16.8,
139
+ "precipitation_sum": 0,
140
+ "rain_sum": 0,
141
+ "snowfall_sum": 0,
142
+ "wind_speed_10m_max": 12.8,
143
+ "wind_gusts_10m_max": 25.6,
144
+ "wind_speed_10m_mean": 8.7,
145
+ "wind_speed_10m_min": 3.9,
146
+ "wind_gusts_10m_min": 9,
147
+ "wind_gusts_10m_mean": 16.4,
148
+ "wind_direction_10m_dominant": 80,
149
+ "shortwave_radiation_sum": 20.09,
150
+ "et0_fao_evapotranspiration_sum": 6.29,
151
+ "cloud_cover_mean": 0,
152
+ "dew_point_2m_mean": 0.1,
153
+ "dew_point_2m_max": 5.5,
154
+ "dew_point_2m_min": -3,
155
+ "relative_humidity_2m_mean": 18,
156
+ "relative_humidity_2m_max": 26,
157
+ "relative_humidity_2m_min": 8,
158
+ "pressure_msl_mean": 1010.2,
159
+ "surface_pressure_mean": 986.1
160
+ },
161
+ "astronomy": {
162
+ "date": "1940-10-10",
163
+ "mid_night": "00:20",
164
+ "night_end": "05:11",
165
+ "sunrise": "06:30",
166
+ "sunset": "18:08",
167
+ "night_begin": "19:27",
168
+ "sun_status": "-",
169
+ "solar_noon": "12:19",
170
+ "day_length": "11:38",
171
+ "moon_phase": "WAXING_GIBBOUS",
172
+ "moonrise": "14:40",
173
+ "moonset": "01:07",
174
+ "moon_status": "-"
175
+ }
176
+ }
177
+ }
178
+ },
179
+ "hourlyPrecision": {
180
+ "summary": "precision=hourly response",
181
+ "value": {
182
+ "location": {
183
+ "location_string": "Lahore",
184
+ "country_name": "Pakistan",
185
+ "state_prov": "Punjab",
186
+ "city": "Lahore",
187
+ "locality": "",
188
+ "latitude": "31.56568",
189
+ "longitude": "74.31418",
190
+ "elevation": "",
191
+ "timezone": "Asia/Karachi",
192
+ "timezone_abbreviation": "GMT+5"
193
+ },
194
+ "historical": {
195
+ "hourly": [
196
+ {
197
+ "timestamp": "2020-05-15T00:00",
198
+ "temperature_2m": 22.7,
199
+ "relative_humidity_2m": 79,
200
+ "dew_point_2m": 18.9,
201
+ "apparent_temperature": 25,
202
+ "precipitation": 0,
203
+ "rain": 0,
204
+ "snowfall": 0,
205
+ "weather_code": 1,
206
+ "pressure_msl": 1007.9,
207
+ "surface_pressure": 983.4,
208
+ "cloud_cover": 30,
209
+ "et0_fao_evapotranspiration": 0.01,
210
+ "wind_speed_10m": 6.2,
211
+ "wind_direction_10m": 280,
212
+ "wind_gusts_10m": 9.4,
213
+ "albedo": null,
214
+ "shortwave_radiation": 0,
215
+ "direct_radiation": 0,
216
+ "diffuse_radiation": 0,
217
+ "direct_normal_irradiance": 0,
218
+ "global_tilted_irradiance": 0
219
+ }
220
+ ],
221
+ "astronomy": {
222
+ "date": "2020-05-15",
223
+ "mid_night": "23:59",
224
+ "night_end": "03:33",
225
+ "sunrise": "05:04",
226
+ "sunset": "18:54",
227
+ "night_begin": "20:25",
228
+ "sun_status": "-",
229
+ "solar_noon": "11:59",
230
+ "day_length": "13:49",
231
+ "moon_phase": "LAST_QUARTER",
232
+ "moonrise": "01:15",
233
+ "moonset": "12:19",
234
+ "moon_status": "-"
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "400": {
244
+ "description": "Bad Request --- Missing/invalid date, missing/incomplete lat+long pair, coordinates out of range, invalid IP address, invalid precision, or invalid timezone",
245
+ "content": {
246
+ "application/json": {
247
+ "schema": {
248
+ "$ref": "#/components/schemas/ErrorResponse"
249
+ },
250
+ "examples": {
251
+ "MissingRequiredParams": {
252
+ "summary": "Missing date, or lat given without long",
253
+ "value": {
254
+ "error": "Invalid Param Exception",
255
+ "message": "please pass correct parameters",
256
+ "path": "/v1.0/weather/historical",
257
+ "status": 400,
258
+ "timestamp": "2026-07-24T11:34:39.124Z"
259
+ }
260
+ },
261
+ "InvalidDateFormat": {
262
+ "summary": "Date not in YYYY-MM-DD format",
263
+ "value": {
264
+ "timestamp": "2026-07-24T11:35:11.805Z",
265
+ "status": 400,
266
+ "message": "date must be in yyyy-mm-dd format",
267
+ "error": "invalid-params",
268
+ "path": "/v1.0/weather/historical"
269
+ }
270
+ },
271
+ "FutureOrCurrentDate": {
272
+ "summary": "Date is today or in the future",
273
+ "value": {
274
+ "timestamp": "2026-07-24T11:34:39.625Z",
275
+ "status": 400,
276
+ "message": "date cannot be current or future date",
277
+ "error": "params-exception-error",
278
+ "path": "/v1.0/weather/historical"
279
+ }
280
+ },
281
+ "DateBeforeMinimum": {
282
+ "summary": "Date earlier than 1940-01-01",
283
+ "value": {
284
+ "timestamp": "2026-07-24T11:34:41.411Z",
285
+ "status": 400,
286
+ "message": "Parameter 'startDate' is out of allowed range from 1940-01-01 to 2026-07-24",
287
+ "error": "error",
288
+ "path": "/v1.0/weather/historical"
289
+ }
290
+ },
291
+ "InvalidCoordinates": {
292
+ "summary": "Latitude or longitude out of range",
293
+ "value": {
294
+ "timestamp": "2026-07-24T11:34:54.240Z",
295
+ "status": 400,
296
+ "message": "Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180",
297
+ "error": "invalid-params",
298
+ "path": "/v1.0/weather/historical"
299
+ }
300
+ },
301
+ "InvalidIPAddress": {
302
+ "summary": "Malformed IP address",
303
+ "value": {
304
+ "timestamp": "2026-07-24T11:34:55.197Z",
305
+ "status": 400,
306
+ "message": "Invalid IP address",
307
+ "error": "invalid-params",
308
+ "path": "/v1.0/weather/historical"
309
+ }
310
+ },
311
+ "InvalidPrecision": {
312
+ "summary": "precision value outside daily/hourly",
313
+ "value": {
314
+ "timestamp": "2026-07-24T11:34:55.671Z",
315
+ "status": 400,
316
+ "message": "Invalid precision",
317
+ "error": "invalid-params",
318
+ "path": "/v1.0/weather/historical"
319
+ }
320
+ },
321
+ "InvalidTimezone": {
322
+ "summary": "Unrecognized timezone identifier",
323
+ "value": {
324
+ "timestamp": "2026-07-24T11:35:12.335Z",
325
+ "status": 400,
326
+ "message": "Check whether your input value is correct; timezone = NotATimezone",
327
+ "error": "error",
328
+ "path": "/v1.0/weather/historical"
329
+ }
330
+ }
331
+ }
332
+ }
333
+ }
334
+ },
335
+ "404": {
336
+ "description": "Not Found --- Location could not be resolved",
337
+ "content": {
338
+ "application/json": {
339
+ "schema": {
340
+ "$ref": "#/components/schemas/ErrorResponse"
341
+ },
342
+ "examples": {
343
+ "LocationNotFound": {
344
+ "summary": "Location not found",
345
+ "value": {
346
+ "timestamp": "2026-07-24T11:34:53.747Z",
347
+ "status": 404,
348
+ "message": "Location not found",
349
+ "error": "error",
350
+ "path": "/v1.0/weather/historical"
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ },
361
+ "components": {
362
+ "securitySchemes": {
363
+ "ApiKeyAuthHeader": {
364
+ "type": "apiKey",
365
+ "in": "header",
366
+ "name": "X-apiKey",
367
+ "description": "Pass your API key via the X-apiKey request header."
368
+ },
369
+ "ApiKeyAuthQuery": {
370
+ "type": "apiKey",
371
+ "in": "query",
372
+ "name": "apiKey",
373
+ "description": "Pass your API key via the apiKey query parameter."
374
+ }
375
+ },
376
+ "schemas": {
377
+ "HistoricalResponse": {
378
+ "type": "object",
379
+ "description": "Historical weather response containing location data and historical weather data for the requested date.",
380
+ "required": ["location", "historical"],
381
+ "properties": {
382
+ "location": {
383
+ "$ref": "#/components/schemas/WeatherLocation"
384
+ },
385
+ "historical": {
386
+ "$ref": "#/components/schemas/HistoricalData"
387
+ }
388
+ }
389
+ },
390
+ "WeatherLocation": {
391
+ "type": "object",
392
+ "description": "Location information. The shape of this object varies by lookup method.",
393
+ "oneOf": [
394
+ {
395
+ "description": "Location data when the target is specified by GPS coordinates (lat/long).",
396
+ "$ref": "#/components/schemas/LocationByCoordinates"
397
+ },
398
+ {
399
+ "description": "Location data when the target is inferred from an IP address.",
400
+ "$ref": "#/components/schemas/LocationByIP"
401
+ },
402
+ {
403
+ "description": "Location data when the target is specified by a city name or address string.",
404
+ "$ref": "#/components/schemas/LocationByAddress"
405
+ }
406
+ ]
407
+ },
408
+ "LocationByCoordinates": {
409
+ "type": "object",
410
+ "description": "Location data when the target is specified by GPS coordinates (lat/long). country_name, state_prov, and city are omitted when the coordinates do not resolve to any political boundary (e.g. open ocean).",
411
+ "required": [
412
+ "latitude",
413
+ "longitude",
414
+ "timezone",
415
+ "timezone_abbreviation"
416
+ ],
417
+ "properties": {
418
+ "latitude": {
419
+ "type": "string",
420
+ "description": "Geographic latitude coordinate in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole). Returned as a string, not a number."
421
+ },
422
+ "longitude": {
423
+ "type": "string",
424
+ "description": "Geographic longitude coordinate in decimal degrees, ranging from -180 (West) to +180 (East). Returned as a string, not a number."
425
+ },
426
+ "country_name": {
427
+ "type": "string",
428
+ "description": "Full name of the country corresponding to the provided coordinates."
429
+ },
430
+ "state_prov": {
431
+ "type": "string",
432
+ "description": "State, province, or primary administrative division name for the location."
433
+ },
434
+ "city": {
435
+ "type": "string",
436
+ "description": "City or municipal area name associated with the coordinate location."
437
+ },
438
+ "locality": {
439
+ "type": "string",
440
+ "description": "Specific locality, neighborhood, district, or village name within the broader area."
441
+ },
442
+ "elevation": {
443
+ "type": "string",
444
+ "description": "Height above mean sea level in meters for the specified coordinates. Returned as a string, not a number; can be an empty string when unavailable."
445
+ },
446
+ "timezone": {
447
+ "type": "string",
448
+ "description": "IANA timezone database identifier for the location (e.g., America/New_York, Europe/London)."
449
+ },
450
+ "timezone_abbreviation": {
451
+ "type": "string",
452
+ "description": "Abbreviated timezone representation based on current offset (e.g., EST, GMT, PST)."
453
+ }
454
+ }
455
+ },
456
+ "LocationByIP": {
457
+ "type": "object",
458
+ "description": "Location data when the target is inferred from an IP address.",
459
+ "required": [
460
+ "continent_code",
461
+ "continent_name",
462
+ "country_code2",
463
+ "country_code3",
464
+ "country_name",
465
+ "country_name_official",
466
+ "state_prov",
467
+ "city",
468
+ "latitude",
469
+ "longitude",
470
+ "timezone",
471
+ "timezone_abbreviation"
472
+ ],
473
+ "properties": {
474
+ "continent_code": {
475
+ "type": "string",
476
+ "description": "Two-letter continent code (e.g., NA for North America, EU for Europe, AS for Asia)."
477
+ },
478
+ "continent_name": {
479
+ "type": "string",
480
+ "description": "Full name of the continent where the IP address is registered."
481
+ },
482
+ "country_code2": {
483
+ "type": "string",
484
+ "description": "ISO 3166-1 alpha-2 two-letter country code (e.g., US, GB, FR)."
485
+ },
486
+ "country_code3": {
487
+ "type": "string",
488
+ "description": "ISO 3166-1 alpha-3 three-letter country code (e.g., USA, GBR, FRA)."
489
+ },
490
+ "country_name": {
491
+ "type": "string",
492
+ "description": "Common name of the country associated with the IP address."
493
+ },
494
+ "country_name_official": {
495
+ "type": "string",
496
+ "description": "Official long-form country name as recognized internationally (e.g., United States of America)."
497
+ },
498
+ "is_eu": {
499
+ "type": "boolean",
500
+ "description": "Boolean flag indicating whether the country is a member state of the European Union."
501
+ },
502
+ "state_prov": {
503
+ "type": "string",
504
+ "description": "State, province, or primary administrative division associated with the IP location."
505
+ },
506
+ "state_code": {
507
+ "type": "string",
508
+ "description": "ISO 3166-2 subdivision code for the state or province (e.g., CA for California)."
509
+ },
510
+ "district": {
511
+ "type": "string",
512
+ "description": "District, county, or secondary administrative division within the region."
513
+ },
514
+ "city": {
515
+ "type": "string",
516
+ "description": "City or urban area name where the IP address is geographically registered."
517
+ },
518
+ "zipcode": {
519
+ "type": "string",
520
+ "description": "Postal code or ZIP code for the approximate location of the IP address."
521
+ },
522
+ "latitude": {
523
+ "type": "string",
524
+ "description": "Geographic latitude in decimal degrees for the IP geolocation, ranging from -90 to +90. Returned as a string, not a number."
525
+ },
526
+ "longitude": {
527
+ "type": "string",
528
+ "description": "Geographic longitude in decimal degrees for the IP geolocation, ranging from -180 to +180. Returned as a string, not a number."
529
+ },
530
+ "locality": {
531
+ "type": "string",
532
+ "description": "Specific locality, neighborhood, or small area designation within the city."
533
+ },
534
+ "elevation": {
535
+ "type": "string",
536
+ "description": "Elevation above mean sea level in meters for the IP geolocation. Returned as a string, not a number; can be an empty string when unavailable."
537
+ },
538
+ "timezone": {
539
+ "type": "string",
540
+ "description": "IANA timezone database identifier for the IP location (e.g., America/Chicago, Asia/Tokyo)."
541
+ },
542
+ "timezone_abbreviation": {
543
+ "type": "string",
544
+ "description": "Current timezone abbreviation based on local offset (e.g., CST, JST, UTC)."
545
+ }
546
+ }
547
+ },
548
+ "LocationByAddress": {
549
+ "type": "object",
550
+ "description": "Location data when the target is specified by a city name or address string.",
551
+ "required": [
552
+ "location_string",
553
+ "country_name",
554
+ "state_prov",
555
+ "city",
556
+ "latitude",
557
+ "longitude",
558
+ "timezone",
559
+ "timezone_abbreviation"
560
+ ],
561
+ "properties": {
562
+ "location_string": {
563
+ "type": "string",
564
+ "description": "Original location query string as submitted, including full address or place name."
565
+ },
566
+ "country_name": {
567
+ "type": "string",
568
+ "description": "Resolved country name derived from the geocoded location query."
569
+ },
570
+ "state_prov": {
571
+ "type": "string",
572
+ "description": "State, province, or primary administrative division identified from the location."
573
+ },
574
+ "city": {
575
+ "type": "string",
576
+ "description": "City or municipal area name extracted from the geocoded location."
577
+ },
578
+ "locality": {
579
+ "type": "string",
580
+ "description": "Specific locality, neighborhood, suburb, or village within the geocoded area."
581
+ },
582
+ "latitude": {
583
+ "type": "string",
584
+ "description": "Geocoded latitude coordinate in decimal degrees, ranging from -90 to +90. Returned as a string, not a number."
585
+ },
586
+ "longitude": {
587
+ "type": "string",
588
+ "description": "Geocoded longitude coordinate in decimal degrees, ranging from -180 to +180. Returned as a string, not a number."
589
+ },
590
+ "elevation": {
591
+ "type": "string",
592
+ "description": "Elevation above mean sea level in meters at the geocoded coordinates. Returned as a string, not a number; can be an empty string when unavailable."
593
+ },
594
+ "timezone": {
595
+ "type": "string",
596
+ "description": "IANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles)."
597
+ },
598
+ "timezone_abbreviation": {
599
+ "type": "string",
600
+ "description": "Current timezone abbreviation for the location based on local offset (e.g., PDT, CET)."
601
+ }
602
+ }
603
+ },
604
+ "HistoricalData": {
605
+ "type": "object",
606
+ "description": "Historical weather data for the requested date, containing an astronomy block plus one of daily or hourly readings depending on the precision parameter. It is not keyed by date --- each request covers exactly one date.",
607
+ "required": ["astronomy"],
608
+ "properties": {
609
+ "daily": {
610
+ "$ref": "#/components/schemas/HistoricalDaily",
611
+ "description": "Daily aggregate weather data for the requested day. Present when precision is daily (the default)."
612
+ },
613
+ "hourly": {
614
+ "type": "array",
615
+ "description": "Hourly weather readings for the requested day, one entry per hour (24 entries). Present when precision is hourly.",
616
+ "items": {
617
+ "$ref": "#/components/schemas/HistoricalHourly"
618
+ }
619
+ },
620
+ "astronomy": {
621
+ "$ref": "#/components/schemas/Astronomy",
622
+ "description": "Astronomical data for the requested day. Always present regardless of precision."
623
+ }
624
+ }
625
+ },
626
+ "HistoricalDaily": {
627
+ "type": "object",
628
+ "description": "Daily historical weather summary with temperature, precipitation, wind, and radiation statistics.",
629
+ "required": [
630
+ "timestamp",
631
+ "weather_code",
632
+ "temperature_2m_mean",
633
+ "temperature_2m_max",
634
+ "temperature_2m_min",
635
+ "apparent_temperature_mean",
636
+ "apparent_temperature_max",
637
+ "apparent_temperature_min",
638
+ "precipitation_sum",
639
+ "rain_sum",
640
+ "snowfall_sum",
641
+ "wind_speed_10m_max",
642
+ "wind_gusts_10m_max",
643
+ "wind_speed_10m_mean",
644
+ "wind_speed_10m_min",
645
+ "wind_gusts_10m_min",
646
+ "wind_gusts_10m_mean",
647
+ "wind_direction_10m_dominant",
648
+ "shortwave_radiation_sum",
649
+ "et0_fao_evapotranspiration_sum",
650
+ "cloud_cover_mean",
651
+ "dew_point_2m_mean",
652
+ "dew_point_2m_max",
653
+ "dew_point_2m_min",
654
+ "relative_humidity_2m_mean",
655
+ "relative_humidity_2m_max",
656
+ "relative_humidity_2m_min",
657
+ "pressure_msl_mean",
658
+ "surface_pressure_mean"
659
+ ],
660
+ "properties": {
661
+ "timestamp": {
662
+ "type": "string",
663
+ "format": "date",
664
+ "description": "The requested date in YYYY-MM-DD format."
665
+ },
666
+ "weather_code": {
667
+ "type": "integer",
668
+ "enum": [
669
+ 0, 1, 2, 3, 45, 48, 51, 53, 55, 56, 57, 61, 63, 65, 66, 67, 71,
670
+ 73, 75, 77, 80, 81, 82, 85, 86, 95, 96, 99
671
+ ],
672
+ "description": "WMO weather condition code representing the day's dominant conditions. Supported codes: 0 clear sky; 1, 2, 3 varying cloud cover; 45, 48 fog; 51, 53, 55 drizzle; 56, 57 freezing drizzle; 61, 63, 65 rain; 66, 67 freezing rain; 71, 73, 75 snowfall; 77 snow grains; 80, 81, 82 rain showers; 85, 86 snow showers; 95 thunderstorm; 96, 99 thunderstorm with hail."
673
+ },
674
+ "temperature_2m_mean": {
675
+ "type": "number",
676
+ "description": "Daily mean air temperature at 2 meters (°C)."
677
+ },
678
+ "temperature_2m_max": {
679
+ "type": "number",
680
+ "description": "Daily maximum air temperature at 2 meters (°C)."
681
+ },
682
+ "temperature_2m_min": {
683
+ "type": "number",
684
+ "description": "Daily minimum air temperature at 2 meters (°C)."
685
+ },
686
+ "apparent_temperature_mean": {
687
+ "type": "number",
688
+ "description": "Daily mean perceived temperature (°C)."
689
+ },
690
+ "apparent_temperature_max": {
691
+ "type": "number",
692
+ "description": "Daily maximum perceived temperature (°C)."
693
+ },
694
+ "apparent_temperature_min": {
695
+ "type": "number",
696
+ "description": "Daily minimum perceived temperature (°C)."
697
+ },
698
+ "precipitation_sum": {
699
+ "type": "number",
700
+ "description": "Total precipitation (mm)."
701
+ },
702
+ "rain_sum": {
703
+ "type": "number",
704
+ "description": "Total rainfall (mm)."
705
+ },
706
+ "snowfall_sum": {
707
+ "type": "number",
708
+ "description": "Total snowfall (cm)."
709
+ },
710
+ "wind_speed_10m_max": {
711
+ "type": "number",
712
+ "description": "Maximum wind speed at 10 meters (km/h)."
713
+ },
714
+ "wind_gusts_10m_max": {
715
+ "type": "number",
716
+ "description": "Maximum wind gusts at 10 meters (km/h)."
717
+ },
718
+ "wind_speed_10m_mean": {
719
+ "type": "number",
720
+ "description": "Daily mean wind speed at 10 meters (km/h)."
721
+ },
722
+ "wind_speed_10m_min": {
723
+ "type": "number",
724
+ "description": "Minimum wind speed at 10 meters (km/h)."
725
+ },
726
+ "wind_gusts_10m_min": {
727
+ "type": "number",
728
+ "description": "Minimum wind gusts at 10 meters (km/h)."
729
+ },
730
+ "wind_gusts_10m_mean": {
731
+ "type": "number",
732
+ "description": "Daily mean wind gusts at 10 meters (km/h)."
733
+ },
734
+ "wind_direction_10m_dominant": {
735
+ "type": "integer",
736
+ "description": "Dominant wind direction at 10 meters (°)."
737
+ },
738
+ "shortwave_radiation_sum": {
739
+ "type": "number",
740
+ "description": "Daily sum of shortwave solar radiation (MJ/m²)."
741
+ },
742
+ "et0_fao_evapotranspiration_sum": {
743
+ "type": "number",
744
+ "description": "Daily sum of reference evapotranspiration (mm)."
745
+ },
746
+ "cloud_cover_mean": {
747
+ "type": "number",
748
+ "description": "Daily mean cloud cover percentage (%)."
749
+ },
750
+ "dew_point_2m_mean": {
751
+ "type": "number",
752
+ "description": "Daily mean dew point temperature at 2 meters (°C)."
753
+ },
754
+ "dew_point_2m_max": {
755
+ "type": "number",
756
+ "description": "Daily maximum dew point temperature at 2 meters (°C)."
757
+ },
758
+ "dew_point_2m_min": {
759
+ "type": "number",
760
+ "description": "Daily minimum dew point temperature at 2 meters (°C)."
761
+ },
762
+ "relative_humidity_2m_mean": {
763
+ "type": "number",
764
+ "description": "Daily mean relative humidity at 2 meters (%)."
765
+ },
766
+ "relative_humidity_2m_max": {
767
+ "type": "integer",
768
+ "description": "Daily maximum relative humidity at 2 meters (%)."
769
+ },
770
+ "relative_humidity_2m_min": {
771
+ "type": "integer",
772
+ "description": "Daily minimum relative humidity at 2 meters (%)."
773
+ },
774
+ "pressure_msl_mean": {
775
+ "type": "number",
776
+ "description": "Daily mean atmospheric pressure at mean sea level (hPa)."
777
+ },
778
+ "surface_pressure_mean": {
779
+ "type": "number",
780
+ "description": "Daily mean surface pressure at ground level (hPa)."
781
+ }
782
+ }
783
+ },
784
+ "HistoricalHourly": {
785
+ "type": "object",
786
+ "description": "Hourly historical weather reading with temperature, precipitation, and wind data.",
787
+ "required": [
788
+ "timestamp",
789
+ "temperature_2m",
790
+ "relative_humidity_2m",
791
+ "dew_point_2m",
792
+ "apparent_temperature",
793
+ "precipitation",
794
+ "rain",
795
+ "snowfall",
796
+ "weather_code",
797
+ "pressure_msl",
798
+ "surface_pressure",
799
+ "cloud_cover",
800
+ "et0_fao_evapotranspiration",
801
+ "wind_speed_10m",
802
+ "wind_direction_10m",
803
+ "wind_gusts_10m",
804
+ "albedo",
805
+ "shortwave_radiation",
806
+ "direct_radiation",
807
+ "diffuse_radiation",
808
+ "direct_normal_irradiance",
809
+ "global_tilted_irradiance"
810
+ ],
811
+ "properties": {
812
+ "timestamp": {
813
+ "type": "string",
814
+ "format": "date-time",
815
+ "description": "Local timestamp for this hourly reading (YYYY-MM-DDTHH:MM)."
816
+ },
817
+ "temperature_2m": {
818
+ "type": "number",
819
+ "description": "Air temperature at 2 meters (°C)."
820
+ },
821
+ "relative_humidity_2m": {
822
+ "type": "number",
823
+ "description": "Relative humidity at 2 meters (%)."
824
+ },
825
+ "dew_point_2m": {
826
+ "type": "number",
827
+ "description": "Dew point temperature at 2 meters (°C)."
828
+ },
829
+ "apparent_temperature": {
830
+ "type": "number",
831
+ "description": "Perceived temperature (°C)."
832
+ },
833
+ "precipitation": {
834
+ "type": "number",
835
+ "description": "Total precipitation in this hour (mm)."
836
+ },
837
+ "rain": {
838
+ "type": "number",
839
+ "description": "Rainfall in this hour (mm)."
840
+ },
841
+ "snowfall": {
842
+ "type": "number",
843
+ "description": "Snowfall in this hour (cm)."
844
+ },
845
+ "weather_code": {
846
+ "type": "integer",
847
+ "enum": [
848
+ 0, 1, 2, 3, 45, 48, 51, 53, 55, 56, 57, 61, 63, 65, 66, 67, 71,
849
+ 73, 75, 77, 80, 81, 82, 85, 86, 95, 96, 99
850
+ ],
851
+ "description": "WMO weather condition code representing conditions during this hour. Supported codes: 0 clear sky; 1, 2, 3 varying cloud cover; 45, 48 fog; 51, 53, 55 drizzle; 56, 57 freezing drizzle; 61, 63, 65 rain; 66, 67 freezing rain; 71, 73, 75 snowfall; 77 snow grains; 80, 81, 82 rain showers; 85, 86 snow showers; 95 thunderstorm; 96, 99 thunderstorm with hail."
852
+ },
853
+ "pressure_msl": {
854
+ "type": "number",
855
+ "description": "Atmospheric pressure at mean sea level (hPa)."
856
+ },
857
+ "surface_pressure": {
858
+ "type": "number",
859
+ "description": "Atmospheric pressure at ground level (hPa)."
860
+ },
861
+ "cloud_cover": {
862
+ "type": "number",
863
+ "description": "Cloud cover percentage (%)."
864
+ },
865
+ "et0_fao_evapotranspiration": {
866
+ "type": "number",
867
+ "description": "Hourly reference evapotranspiration (mm)."
868
+ },
869
+ "wind_speed_10m": {
870
+ "type": "number",
871
+ "description": "Wind speed at 10 meters (km/h)."
872
+ },
873
+ "wind_direction_10m": {
874
+ "type": "integer",
875
+ "description": "Wind direction at 10 meters (°)."
876
+ },
877
+ "wind_gusts_10m": {
878
+ "type": "number",
879
+ "description": "Wind gusts at 10 meters (km/h)."
880
+ },
881
+ "albedo": {
882
+ "type": ["number", "null"],
883
+ "description": "Reflectivity of the Earth's surface. Currently always returned as null."
884
+ },
885
+ "shortwave_radiation": {
886
+ "type": "number",
887
+ "description": "Incoming shortwave solar radiation (W/m²)."
888
+ },
889
+ "direct_radiation": {
890
+ "type": "number",
891
+ "description": "Direct solar radiation (W/m²)."
892
+ },
893
+ "diffuse_radiation": {
894
+ "type": "number",
895
+ "description": "Diffuse solar radiation (W/m²)."
896
+ },
897
+ "direct_normal_irradiance": {
898
+ "type": "number",
899
+ "description": "Direct solar irradiance (W/m²)."
900
+ },
901
+ "global_tilted_irradiance": {
902
+ "type": "number",
903
+ "description": "Total solar irradiance on a tilted surface (W/m²)."
904
+ }
905
+ }
906
+ },
907
+ "Astronomy": {
908
+ "type": "object",
909
+ "description": "Astronomical data including sunrise, sunset, solar noon, day length, moon phase, and moon times. Time fields are HH:MM by default; when the timezone query parameter is set, they include the date as well (YYYY-MM-DD HH:MM).",
910
+ "required": [
911
+ "date",
912
+ "mid_night",
913
+ "night_end",
914
+ "sunrise",
915
+ "solar_noon",
916
+ "sunset",
917
+ "night_begin",
918
+ "day_length",
919
+ "sun_status",
920
+ "moon_phase",
921
+ "moonrise",
922
+ "moonset",
923
+ "moon_status"
924
+ ],
925
+ "properties": {
926
+ "date": {
927
+ "type": "string",
928
+ "format": "date",
929
+ "description": "Calendar date in YYYY-MM-DD format for the astronomical data."
930
+ },
931
+ "mid_night": {
932
+ "type": "string",
933
+ "description": "Time of true solar midnight in HH:MM format."
934
+ },
935
+ "night_end": {
936
+ "type": "string",
937
+ "description": "Time when astronomical twilight ends and dawn begins in HH:MM format."
938
+ },
939
+ "sunrise": {
940
+ "type": "string",
941
+ "description": "Time when the Sun becomes visible above the horizon in HH:MM format."
942
+ },
943
+ "solar_noon": {
944
+ "type": "string",
945
+ "description": "Time when the Sun reaches its highest point in the sky in HH:MM format."
946
+ },
947
+ "sunset": {
948
+ "type": "string",
949
+ "description": "Time when the Sun disappears below the horizon in HH:MM format."
950
+ },
951
+ "night_begin": {
952
+ "type": "string",
953
+ "description": "Time when astronomical twilight begins and night starts in HH:MM format."
954
+ },
955
+ "day_length": {
956
+ "type": "string",
957
+ "description": "Total duration of daylight in HH:MM format."
958
+ },
959
+ "sun_status": {
960
+ "type": "string",
961
+ "description": "Current position of the Sun relative to the horizon (above_horizon, below_horizon, or -)."
962
+ },
963
+ "moon_phase": {
964
+ "type": "string",
965
+ "description": "Current lunar phase (NEW_MOON, WAXING_CRESCENT, FULL_MOON, WANING_GIBBOUS, etc.)."
966
+ },
967
+ "moonrise": {
968
+ "type": "string",
969
+ "description": "Time when the Moon becomes visible above the horizon in HH:MM format."
970
+ },
971
+ "moonset": {
972
+ "type": "string",
973
+ "description": "Time when the Moon disappears below the horizon in HH:MM format."
974
+ },
975
+ "moon_status": {
976
+ "type": "string",
977
+ "description": "Current visibility status of the Moon (visible, not_visible, or -)."
978
+ }
979
+ }
980
+ },
981
+ "ErrorResponse": {
982
+ "type": "object",
983
+ "description": "Standard error envelope returned by the API on failed requests.",
984
+ "required": ["message"],
985
+ "properties": {
986
+ "error": {
987
+ "type": "string",
988
+ "description": "Short error category or exception type."
989
+ },
990
+ "message": {
991
+ "type": "string",
992
+ "description": "Human-readable error message describing the failure."
993
+ },
994
+ "path": {
995
+ "type": "string",
996
+ "description": "API endpoint path that produced the error."
997
+ },
998
+ "status": {
999
+ "type": "integer",
1000
+ "description": "HTTP status code returned with the error."
1001
+ },
1002
+ "timestamp": {
1003
+ "type": "string",
1004
+ "format": "date-time",
1005
+ "description": "Timestamp when the error occurred (ISO 8601)."
1006
+ }
1007
+ }
1008
+ }
1009
+ }
1010
+ },
1011
+ "security": [
1012
+ {
1013
+ "ApiKeyAuthHeader": []
1014
+ },
1015
+ {
1016
+ "ApiKeyAuthQuery": []
1017
+ }
1018
+ ]
1019
+ }