@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.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +44663 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +44631 -0
- package/package.json +81 -0
- package/specs/commodity/commodity-fluctuation.json +301 -0
- package/specs/commodity/commodity-prices.json +317 -0
- package/specs/commodity/commodity-symbols.json +215 -0
- package/specs/commodity/commodity-time-series.json +329 -0
- package/specs/commodity/historical-commodity-prices.json +273 -0
- package/specs/currency/currency-converter.json +261 -0
- package/specs/currency/currency-fluctuation.json +282 -0
- package/specs/currency/currency-historical-data-limit.json +158 -0
- package/specs/currency/currency-rate.json +229 -0
- package/specs/currency/currency-supported.json +234 -0
- package/specs/currency/currency-symbols.json +161 -0
- package/specs/currency/currency-time-series.json +325 -0
- package/specs/currency/geolocalized-currency-conversion.json +287 -0
- package/specs/currency/historical-currency-converter.json +269 -0
- package/specs/currency/historical-currency-rate.json +246 -0
- package/specs/dns/bulk-dns-lookup.json +624 -0
- package/specs/dns/dns-history-lookup.json +579 -0
- package/specs/dns/dns-lookup.json +466 -0
- package/specs/dns/reverse-dns-lookup.json +414 -0
- package/specs/domain/bulk-domain-checker.json +284 -0
- package/specs/domain/domain-search-with-suggestions.json +280 -0
- package/specs/domain/domain-search.json +206 -0
- package/specs/domain/subdomain-lookup.json +343 -0
- package/specs/email-validation/bulk-email-validation.json +534 -0
- package/specs/email-validation/email-checker.json +586 -0
- package/specs/financial/bulk-vat-rates-country.json +341 -0
- package/specs/financial/financial-apis-supported-countries.json +204 -0
- package/specs/financial/iban-validation.json +328 -0
- package/specs/financial/swift-code-finder.json +192 -0
- package/specs/financial/swift-code-lookup.json +220 -0
- package/specs/financial/vat-number-validation.json +283 -0
- package/specs/financial/vat-rates-by-ip.json +275 -0
- package/specs/financial/vat-rates-country.json +288 -0
- package/specs/general/usage-credits.json +218 -0
- package/specs/geocoding/forward-geocoding.json +402 -0
- package/specs/geocoding/reverse-geocoding.json +326 -0
- package/specs/geodb/administrative-units-details.json +250 -0
- package/specs/geodb/administrative-units-levels.json +198 -0
- package/specs/geodb/administrative-units.json +237 -0
- package/specs/geodb/cities.json +288 -0
- package/specs/geodb/countries-details.json +274 -0
- package/specs/geodb/countries.json +276 -0
- package/specs/geodb/flags-supported.json +166 -0
- package/specs/geodb/flags.json +227 -0
- package/specs/geodb/regions.json +109 -0
- package/specs/geodb/subregions.json +217 -0
- package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
- package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
- package/specs/ip-intelligence/ip-locator.json +941 -0
- package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
- package/specs/other/astronomy-data.json +803 -0
- package/specs/pdf/delete-pdf-page.json +286 -0
- package/specs/pdf/linearize-pdf.json +277 -0
- package/specs/pdf/merge-pdf.json +285 -0
- package/specs/pdf/pdf-compress.json +304 -0
- package/specs/pdf/pdf-decrypt.json +297 -0
- package/specs/pdf/pdf-encrypt.json +314 -0
- package/specs/pdf/pdf-extract-pages.json +295 -0
- package/specs/pdf/pdf-file-status.json +208 -0
- package/specs/pdf/pdf-file.json +190 -0
- package/specs/pdf/pdf-files.json +126 -0
- package/specs/pdf/pdf-resource-download.json +168 -0
- package/specs/pdf/pdf-resource-upload-binary.json +218 -0
- package/specs/pdf/pdf-resource-upload.json +248 -0
- package/specs/pdf/pdf-restrict.json +343 -0
- package/specs/pdf/pdf-split-pages.json +281 -0
- package/specs/pdf/pdf-task-status.json +252 -0
- package/specs/pdf/pdf-to-image.json +1219 -0
- package/specs/pdf/pdf-unrestrict.json +324 -0
- package/specs/pdf/rotate-pdf-pages.json +305 -0
- package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
- package/specs/phone-validation/phone-number-validation.json +456 -0
- package/specs/scraper/web-scraper.json +674 -0
- package/specs/screenshot/bulk-screenshot.json +949 -0
- package/specs/screenshot/website-screenshot.json +1147 -0
- package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
- package/specs/ssl/ssl-certificate-lookup.json +634 -0
- package/specs/timezone/timezone-converter.json +362 -0
- package/specs/timezone/timezone-lookup.json +910 -0
- package/specs/user-agent/bulk-user-agent-parser.json +441 -0
- package/specs/user-agent/user-agent-parser.json +346 -0
- package/specs/weather/air-quality.json +779 -0
- package/specs/weather/bulk-live-weather.json +834 -0
- package/specs/weather/flood-forecast.json +693 -0
- package/specs/weather/historical-weather.json +1019 -0
- package/specs/weather/live-weather.json +789 -0
- package/specs/weather/marine-weather.json +940 -0
- package/specs/weather/time-series-weather.json +1056 -0
- package/specs/weather/weather-forecast.json +1202 -0
- package/specs/whois/asn-lookup.json +729 -0
- package/specs/whois/bulk-whois-lookup.json +698 -0
- package/specs/whois/domain-whois-history-lookup.json +500 -0
- package/specs/whois/reverse-whois.json +625 -0
- package/specs/whois/whois-domain-lookup.json +533 -0
- package/specs/whois/whois-ip-lookup.json +1110 -0
- package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
- package/specs/zip-code/zip-code-api.json +299 -0
- package/specs/zip-code/zip-code-distance-match.json +311 -0
- package/specs/zip-code/zip-code-distance.json +307 -0
- package/specs/zip-code/zip-codes-by-city.json +279 -0
- package/specs/zip-code/zip-codes-by-region.json +278 -0
- package/specs/zip-code/zip-codes-radius-search.json +349 -0
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Flood Forecast API - River Discharge & Flood Risk Monitoring",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Get daily flood risk and river discharge forecast data for any location, up to 16 days ahead. Returns a `location` block plus a `forecast` object keyed by date, each day carrying river discharge statistics (`river_discharge`, mean, median, max, min, and the p25/p75 percentiles) in m³/s. Accepts the target location as a `location` string, `lat`/`long` coordinates, or an `ip` address; the `timezone` param controls the returned timezone abbreviation. If none of `location`, `lat`/`long`, or `ip` are supplied, the location is auto-detected from the caller's IP address. Locations without a nearby monitored river return a `200` response with all discharge values at `0` rather than an error.",
|
|
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": "Flood Forecast API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/flood": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["Weather APIs"],
|
|
23
|
+
"summary": "Get flood risk and river discharge forecast",
|
|
24
|
+
"description": "Provides flood forecast data for a given location, including river discharge metrics such as mean, median, maximum, minimum, and percentile values (p25, p75). Requires a startDate and endDate, with the date range limited to 16 days. Location can be specified using city name, latitude/longitude, or IP address; if omitted entirely, the caller's IP is used.",
|
|
25
|
+
"operationId": "getFloodForecast",
|
|
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": "startDate",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": true,
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "date"
|
|
45
|
+
},
|
|
46
|
+
"description": "Starting date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data. The difference between endDate and startDate must not exceed 16 days."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "endDate",
|
|
50
|
+
"in": "query",
|
|
51
|
+
"required": true,
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": "date"
|
|
55
|
+
},
|
|
56
|
+
"description": "End date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data. The difference between endDate and startDate must not exceed 16 days."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "location",
|
|
60
|
+
"in": "query",
|
|
61
|
+
"schema": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"description": "City name, place name, or full address.",
|
|
65
|
+
"required": false
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "lat",
|
|
69
|
+
"in": "query",
|
|
70
|
+
"schema": {
|
|
71
|
+
"type": "number"
|
|
72
|
+
},
|
|
73
|
+
"description": "Latitude of the location.",
|
|
74
|
+
"required": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "long",
|
|
78
|
+
"in": "query",
|
|
79
|
+
"schema": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
},
|
|
82
|
+
"description": "Longitude of the location.",
|
|
83
|
+
"required": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "ip",
|
|
87
|
+
"in": "query",
|
|
88
|
+
"schema": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"description": "IP(v4 or v6) address for location inference.",
|
|
92
|
+
"required": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "precision",
|
|
96
|
+
"in": "query",
|
|
97
|
+
"required": false,
|
|
98
|
+
"description": "Forecast data granularity. Only 'daily' is supported; any other value returns a 400 error.",
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": ["daily"],
|
|
102
|
+
"default": "daily"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "timezone",
|
|
107
|
+
"in": "query",
|
|
108
|
+
"schema": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"description": "Timezone for the results.",
|
|
112
|
+
"required": false
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"responses": {
|
|
116
|
+
"200": {
|
|
117
|
+
"description": "Successful flood forecast response",
|
|
118
|
+
"content": {
|
|
119
|
+
"application/json": {
|
|
120
|
+
"schema": {
|
|
121
|
+
"$ref": "#/components/schemas/FloodResponse"
|
|
122
|
+
},
|
|
123
|
+
"examples": {
|
|
124
|
+
"typicalSuccess": {
|
|
125
|
+
"summary": "Typical successful response",
|
|
126
|
+
"value": {
|
|
127
|
+
"location": {
|
|
128
|
+
"location_string": "London",
|
|
129
|
+
"country_name": "United Kingdom",
|
|
130
|
+
"state_prov": "England",
|
|
131
|
+
"city": "London",
|
|
132
|
+
"locality": "",
|
|
133
|
+
"latitude": "51.50745",
|
|
134
|
+
"longitude": "-0.12777",
|
|
135
|
+
"elevation": "12",
|
|
136
|
+
"timezone": "Europe/London",
|
|
137
|
+
"timezone_abbreviation": "GMT+1"
|
|
138
|
+
},
|
|
139
|
+
"forecast": {
|
|
140
|
+
"2026-07-25": {
|
|
141
|
+
"daily": {
|
|
142
|
+
"timestamp": "2026-07-25",
|
|
143
|
+
"river_discharge": 5.47,
|
|
144
|
+
"river_discharge_mean": 5.47,
|
|
145
|
+
"river_discharge_median": 5.47,
|
|
146
|
+
"river_discharge_max": 5.68,
|
|
147
|
+
"river_discharge_min": 5.44,
|
|
148
|
+
"river_discharge_p25": 5.46,
|
|
149
|
+
"river_discharge_p75": 5.47
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"2026-07-26": {
|
|
153
|
+
"daily": {
|
|
154
|
+
"timestamp": "2026-07-26",
|
|
155
|
+
"river_discharge": 5.46,
|
|
156
|
+
"river_discharge_mean": 5.47,
|
|
157
|
+
"river_discharge_median": 5.46,
|
|
158
|
+
"river_discharge_max": 6.06,
|
|
159
|
+
"river_discharge_min": 5.4,
|
|
160
|
+
"river_discharge_p25": 5.46,
|
|
161
|
+
"river_discharge_p75": 5.47
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"2026-07-27": {
|
|
165
|
+
"daily": {
|
|
166
|
+
"timestamp": "2026-07-27",
|
|
167
|
+
"river_discharge": 5.4,
|
|
168
|
+
"river_discharge_mean": 5.4,
|
|
169
|
+
"river_discharge_median": 5.4,
|
|
170
|
+
"river_discharge_max": 6.11,
|
|
171
|
+
"river_discharge_min": 5.3,
|
|
172
|
+
"river_discharge_p25": 5.35,
|
|
173
|
+
"river_discharge_p75": 5.42
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"2026-07-28": {
|
|
177
|
+
"daily": {
|
|
178
|
+
"timestamp": "2026-07-28",
|
|
179
|
+
"river_discharge": 5.37,
|
|
180
|
+
"river_discharge_mean": 5.98,
|
|
181
|
+
"river_discharge_median": 5.36,
|
|
182
|
+
"river_discharge_max": 22.99,
|
|
183
|
+
"river_discharge_min": 5.27,
|
|
184
|
+
"river_discharge_p25": 5.31,
|
|
185
|
+
"river_discharge_p75": 5.54
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"noRiverDataNearby": {
|
|
192
|
+
"summary": "Location with no nearby monitored river",
|
|
193
|
+
"value": {
|
|
194
|
+
"location": {
|
|
195
|
+
"latitude": "23.40000",
|
|
196
|
+
"longitude": "11.50000",
|
|
197
|
+
"country_name": "Algeria",
|
|
198
|
+
"state_prov": "Djanet",
|
|
199
|
+
"city": "Djanet",
|
|
200
|
+
"locality": "",
|
|
201
|
+
"elevation": "",
|
|
202
|
+
"timezone": "Africa/Algiers",
|
|
203
|
+
"timezone_abbreviation": "GMT+1"
|
|
204
|
+
},
|
|
205
|
+
"forecast": {
|
|
206
|
+
"2026-07-25": {
|
|
207
|
+
"daily": {
|
|
208
|
+
"timestamp": "2026-07-25",
|
|
209
|
+
"river_discharge": 0,
|
|
210
|
+
"river_discharge_mean": 0,
|
|
211
|
+
"river_discharge_median": 0,
|
|
212
|
+
"river_discharge_max": 0,
|
|
213
|
+
"river_discharge_min": 0,
|
|
214
|
+
"river_discharge_p25": 0,
|
|
215
|
+
"river_discharge_p75": 0
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"400": {
|
|
226
|
+
"description": "Bad Request — Missing, malformed, or out-of-range parameters",
|
|
227
|
+
"content": {
|
|
228
|
+
"application/json": {
|
|
229
|
+
"schema": {
|
|
230
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
231
|
+
},
|
|
232
|
+
"examples": {
|
|
233
|
+
"MissingParams": {
|
|
234
|
+
"summary": "Missing or incomplete location parameters",
|
|
235
|
+
"value": {
|
|
236
|
+
"error": "Invalid Param Exception",
|
|
237
|
+
"message": "please pass correct parameters",
|
|
238
|
+
"path": "/v1.0/weather/flood",
|
|
239
|
+
"status": 400,
|
|
240
|
+
"timestamp": "2026-07-24T11:35:53.121Z"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"InvalidCoordinates": {
|
|
244
|
+
"summary": "Latitude or longitude out of range",
|
|
245
|
+
"value": {
|
|
246
|
+
"timestamp": "2026-07-24T11:34:58.755Z",
|
|
247
|
+
"status": 400,
|
|
248
|
+
"message": "Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180",
|
|
249
|
+
"error": "invalid-params",
|
|
250
|
+
"path": "/v1.0/weather/flood"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"UnresolvedCoordinates": {
|
|
254
|
+
"summary": "In-range coordinates over open ocean/uninhabited area",
|
|
255
|
+
"value": {
|
|
256
|
+
"timestamp": "2026-07-24T11:35:26.119Z",
|
|
257
|
+
"status": 400,
|
|
258
|
+
"message": "Please provide both lat and long parameters.",
|
|
259
|
+
"error": "invalid-params",
|
|
260
|
+
"path": "/v1.0/weather/flood"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"InvalidIp": {
|
|
264
|
+
"summary": "Malformed IP address",
|
|
265
|
+
"value": {
|
|
266
|
+
"timestamp": "2026-07-24T11:35:53.649Z",
|
|
267
|
+
"status": 400,
|
|
268
|
+
"message": "Invalid IP address",
|
|
269
|
+
"error": "invalid-params",
|
|
270
|
+
"path": "/v1.0/weather/flood"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"InvalidPrecision": {
|
|
274
|
+
"summary": "Unsupported precision value",
|
|
275
|
+
"value": {
|
|
276
|
+
"timestamp": "2026-07-24T11:35:40.099Z",
|
|
277
|
+
"status": 400,
|
|
278
|
+
"message": "'hourly' precision is not supported on this endpoint",
|
|
279
|
+
"error": "invalid-params",
|
|
280
|
+
"path": "/v1.0/weather/flood"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"BadDateFormat": {
|
|
284
|
+
"summary": "Bad date format",
|
|
285
|
+
"value": {
|
|
286
|
+
"timestamp": "2026-07-24T11:35:10.570Z",
|
|
287
|
+
"status": 400,
|
|
288
|
+
"message": "startDate must be in yyyy-mm-dd format",
|
|
289
|
+
"error": "invalid-params",
|
|
290
|
+
"path": "/v1.0/weather/flood"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"EndBeforeStart": {
|
|
294
|
+
"summary": "End date before start date",
|
|
295
|
+
"value": {
|
|
296
|
+
"timestamp": "2026-07-24T11:35:11.115Z",
|
|
297
|
+
"status": 400,
|
|
298
|
+
"message": "startDate must be before or equal to endDate",
|
|
299
|
+
"error": "params-exception-error",
|
|
300
|
+
"path": "/v1.0/weather/flood"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"DateRangeExceeded": {
|
|
304
|
+
"summary": "Date range exceeds 16 days, or a past date was requested",
|
|
305
|
+
"value": {
|
|
306
|
+
"timestamp": "2026-07-24T11:35:11.610Z",
|
|
307
|
+
"status": 400,
|
|
308
|
+
"message": "Forecast date range must be within 2026-07-24 to 2026-08-08",
|
|
309
|
+
"error": "params-exception-error",
|
|
310
|
+
"path": "/v1.0/weather/flood"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"404": {
|
|
318
|
+
"description": "Not Found — Location could not be resolved",
|
|
319
|
+
"content": {
|
|
320
|
+
"application/json": {
|
|
321
|
+
"schema": {
|
|
322
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
323
|
+
},
|
|
324
|
+
"examples": {
|
|
325
|
+
"LocationNotFound": {
|
|
326
|
+
"summary": "Location not found",
|
|
327
|
+
"value": {
|
|
328
|
+
"timestamp": "2026-07-24T11:35:12.674Z",
|
|
329
|
+
"status": 404,
|
|
330
|
+
"message": "Location not found",
|
|
331
|
+
"error": "error",
|
|
332
|
+
"path": "/v1.0/weather/flood"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"components": {
|
|
344
|
+
"securitySchemes": {
|
|
345
|
+
"ApiKeyAuthHeader": {
|
|
346
|
+
"type": "apiKey",
|
|
347
|
+
"in": "header",
|
|
348
|
+
"name": "X-apiKey",
|
|
349
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
350
|
+
},
|
|
351
|
+
"ApiKeyAuthQuery": {
|
|
352
|
+
"type": "apiKey",
|
|
353
|
+
"in": "query",
|
|
354
|
+
"name": "apiKey",
|
|
355
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"schemas": {
|
|
359
|
+
"FloodResponse": {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"properties": {
|
|
362
|
+
"location": {
|
|
363
|
+
"$ref": "#/components/schemas/WeatherLocation"
|
|
364
|
+
},
|
|
365
|
+
"forecast": {
|
|
366
|
+
"$ref": "#/components/schemas/FloodForecastData"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"required": ["location", "forecast"],
|
|
370
|
+
"description": "Flood forecast response containing location data and date-keyed river discharge forecasts."
|
|
371
|
+
},
|
|
372
|
+
"LocationByCoordinates": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"required": [
|
|
375
|
+
"latitude",
|
|
376
|
+
"longitude",
|
|
377
|
+
"country_name",
|
|
378
|
+
"state_prov",
|
|
379
|
+
"city",
|
|
380
|
+
"timezone",
|
|
381
|
+
"timezone_abbreviation"
|
|
382
|
+
],
|
|
383
|
+
"properties": {
|
|
384
|
+
"latitude": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"description": "Geographic latitude coordinate in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole). Returned as a string, not a number."
|
|
387
|
+
},
|
|
388
|
+
"longitude": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"description": "Geographic longitude coordinate in decimal degrees, ranging from -180 (West) to +180 (East). Returned as a string, not a number."
|
|
391
|
+
},
|
|
392
|
+
"country_name": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"description": "Full name of the country corresponding to the provided coordinates."
|
|
395
|
+
},
|
|
396
|
+
"state_prov": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"description": "State, province, or primary administrative division name for the location."
|
|
399
|
+
},
|
|
400
|
+
"city": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"description": "City or municipal area name associated with the coordinate location."
|
|
403
|
+
},
|
|
404
|
+
"locality": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"description": "Specific locality, neighborhood, district, or village name within the broader area."
|
|
407
|
+
},
|
|
408
|
+
"elevation": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"description": "Height above mean sea level in meters for the specified coordinates, returned as a string. Can be an empty string when elevation data is unavailable."
|
|
411
|
+
},
|
|
412
|
+
"timezone": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"description": "IANA timezone database identifier for the location (e.g., America/New_York, Europe/London)."
|
|
415
|
+
},
|
|
416
|
+
"timezone_abbreviation": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"description": "Abbreviated timezone representation based on current offset (e.g., EST, GMT, PST)."
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"description": "Location data when the target is specified by GPS coordinates (lat/long)."
|
|
422
|
+
},
|
|
423
|
+
"LocationByIP": {
|
|
424
|
+
"type": "object",
|
|
425
|
+
"required": [
|
|
426
|
+
"continent_code",
|
|
427
|
+
"continent_name",
|
|
428
|
+
"country_code2",
|
|
429
|
+
"country_code3",
|
|
430
|
+
"country_name",
|
|
431
|
+
"country_name_official",
|
|
432
|
+
"state_prov",
|
|
433
|
+
"city",
|
|
434
|
+
"latitude",
|
|
435
|
+
"longitude",
|
|
436
|
+
"timezone",
|
|
437
|
+
"timezone_abbreviation"
|
|
438
|
+
],
|
|
439
|
+
"properties": {
|
|
440
|
+
"continent_code": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"description": "Two-letter continent code (e.g., NA for North America, EU for Europe, AS for Asia)."
|
|
443
|
+
},
|
|
444
|
+
"continent_name": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"description": "Full name of the continent where the IP address is registered."
|
|
447
|
+
},
|
|
448
|
+
"country_code2": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"description": "ISO 3166-1 alpha-2 two-letter country code (e.g., US, GB, FR)."
|
|
451
|
+
},
|
|
452
|
+
"country_code3": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"description": "ISO 3166-1 alpha-3 three-letter country code (e.g., USA, GBR, FRA)."
|
|
455
|
+
},
|
|
456
|
+
"country_name": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"description": "Common name of the country associated with the IP address."
|
|
459
|
+
},
|
|
460
|
+
"country_name_official": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"description": "Official long-form country name as recognized internationally (e.g., United States of America)."
|
|
463
|
+
},
|
|
464
|
+
"is_eu": {
|
|
465
|
+
"type": "boolean",
|
|
466
|
+
"description": "Boolean flag indicating whether the country is a member state of the European Union."
|
|
467
|
+
},
|
|
468
|
+
"state_prov": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"description": "State, province, or primary administrative division associated with the IP location."
|
|
471
|
+
},
|
|
472
|
+
"state_code": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"description": "ISO 3166-2 subdivision code for the state or province (e.g., CA for California)."
|
|
475
|
+
},
|
|
476
|
+
"district": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"description": "District, county, or secondary administrative division within the region."
|
|
479
|
+
},
|
|
480
|
+
"city": {
|
|
481
|
+
"type": "string",
|
|
482
|
+
"description": "City or urban area name where the IP address is geographically registered."
|
|
483
|
+
},
|
|
484
|
+
"zipcode": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"description": "Postal code or ZIP code for the approximate location of the IP address."
|
|
487
|
+
},
|
|
488
|
+
"latitude": {
|
|
489
|
+
"type": "string",
|
|
490
|
+
"description": "Geographic latitude in decimal degrees for the IP geolocation, ranging from -90 to +90. Returned as a string, not a number."
|
|
491
|
+
},
|
|
492
|
+
"longitude": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"description": "Geographic longitude in decimal degrees for the IP geolocation, ranging from -180 to +180. Returned as a string, not a number."
|
|
495
|
+
},
|
|
496
|
+
"locality": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"description": "Specific locality, neighborhood, or small area designation within the city."
|
|
499
|
+
},
|
|
500
|
+
"elevation": {
|
|
501
|
+
"type": "string",
|
|
502
|
+
"description": "Elevation above mean sea level in meters for the IP geolocation, returned as a string. Can be an empty string when elevation data is unavailable."
|
|
503
|
+
},
|
|
504
|
+
"timezone": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "IANA timezone database identifier for the IP location (e.g., America/Chicago, Asia/Tokyo)."
|
|
507
|
+
},
|
|
508
|
+
"timezone_abbreviation": {
|
|
509
|
+
"type": "string",
|
|
510
|
+
"description": "Current timezone abbreviation based on local offset (e.g., CST, JST, UTC)."
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"description": "Location data when the target is inferred from an IP address."
|
|
514
|
+
},
|
|
515
|
+
"LocationByAddress": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"required": [
|
|
518
|
+
"location_string",
|
|
519
|
+
"country_name",
|
|
520
|
+
"state_prov",
|
|
521
|
+
"city",
|
|
522
|
+
"latitude",
|
|
523
|
+
"longitude",
|
|
524
|
+
"timezone",
|
|
525
|
+
"timezone_abbreviation"
|
|
526
|
+
],
|
|
527
|
+
"properties": {
|
|
528
|
+
"location_string": {
|
|
529
|
+
"type": "string",
|
|
530
|
+
"description": "Original location query string as submitted, including full address or place name."
|
|
531
|
+
},
|
|
532
|
+
"country_name": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"description": "Resolved country name derived from the geocoded location query."
|
|
535
|
+
},
|
|
536
|
+
"state_prov": {
|
|
537
|
+
"type": "string",
|
|
538
|
+
"description": "State, province, or primary administrative division identified from the location."
|
|
539
|
+
},
|
|
540
|
+
"city": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"description": "City or municipal area name extracted from the geocoded location."
|
|
543
|
+
},
|
|
544
|
+
"locality": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"description": "Specific locality, neighborhood, suburb, or village within the geocoded area."
|
|
547
|
+
},
|
|
548
|
+
"latitude": {
|
|
549
|
+
"type": "string",
|
|
550
|
+
"description": "Geocoded latitude coordinate in decimal degrees, ranging from -90 to +90. Returned as a string, not a number."
|
|
551
|
+
},
|
|
552
|
+
"longitude": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"description": "Geocoded longitude coordinate in decimal degrees, ranging from -180 to +180. Returned as a string, not a number."
|
|
555
|
+
},
|
|
556
|
+
"elevation": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"description": "Elevation above mean sea level in meters at the geocoded coordinates, returned as a string. Can be an empty string when elevation data is unavailable."
|
|
559
|
+
},
|
|
560
|
+
"timezone": {
|
|
561
|
+
"type": "string",
|
|
562
|
+
"description": "IANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles)."
|
|
563
|
+
},
|
|
564
|
+
"timezone_abbreviation": {
|
|
565
|
+
"type": "string",
|
|
566
|
+
"description": "Current timezone abbreviation for the location based on local offset (e.g., PDT, CET)."
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"description": "Location data when the target is specified by a city name or address string."
|
|
570
|
+
},
|
|
571
|
+
"FloodDaily": {
|
|
572
|
+
"type": "object",
|
|
573
|
+
"properties": {
|
|
574
|
+
"timestamp": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"format": "date",
|
|
577
|
+
"description": "Forecast date in YYYY-MM-DD format. Returned as a date only, with no time component despite the parent object being keyed by the same date."
|
|
578
|
+
},
|
|
579
|
+
"river_discharge": {
|
|
580
|
+
"type": "number",
|
|
581
|
+
"description": "The observed river discharge value (m³/s)"
|
|
582
|
+
},
|
|
583
|
+
"river_discharge_mean": {
|
|
584
|
+
"type": "number",
|
|
585
|
+
"description": "The mean river discharge (m³/s)"
|
|
586
|
+
},
|
|
587
|
+
"river_discharge_median": {
|
|
588
|
+
"type": "number",
|
|
589
|
+
"description": "The median river discharge (m³/s)"
|
|
590
|
+
},
|
|
591
|
+
"river_discharge_max": {
|
|
592
|
+
"type": "number",
|
|
593
|
+
"description": "The maximum river discharge (m³/s)"
|
|
594
|
+
},
|
|
595
|
+
"river_discharge_min": {
|
|
596
|
+
"type": "number",
|
|
597
|
+
"description": "The minimum river discharge (m³/s)"
|
|
598
|
+
},
|
|
599
|
+
"river_discharge_p25": {
|
|
600
|
+
"type": "number",
|
|
601
|
+
"description": "The 25th percentile of river discharge (m³/s)"
|
|
602
|
+
},
|
|
603
|
+
"river_discharge_p75": {
|
|
604
|
+
"type": "number",
|
|
605
|
+
"description": "The 75th percentile of river discharge (m³/s)"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"required": [
|
|
609
|
+
"timestamp",
|
|
610
|
+
"river_discharge",
|
|
611
|
+
"river_discharge_mean",
|
|
612
|
+
"river_discharge_median",
|
|
613
|
+
"river_discharge_max",
|
|
614
|
+
"river_discharge_min",
|
|
615
|
+
"river_discharge_p25",
|
|
616
|
+
"river_discharge_p75"
|
|
617
|
+
],
|
|
618
|
+
"description": "Daily river discharge forecast data with discharge statistics and percentiles."
|
|
619
|
+
},
|
|
620
|
+
"ErrorResponse": {
|
|
621
|
+
"type": "object",
|
|
622
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
623
|
+
"required": ["message"],
|
|
624
|
+
"properties": {
|
|
625
|
+
"error": {
|
|
626
|
+
"type": "string",
|
|
627
|
+
"description": "Short error category or exception type."
|
|
628
|
+
},
|
|
629
|
+
"message": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"description": "Human-readable error message describing the failure."
|
|
632
|
+
},
|
|
633
|
+
"path": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"description": "API endpoint path that produced the error."
|
|
636
|
+
},
|
|
637
|
+
"status": {
|
|
638
|
+
"type": "integer",
|
|
639
|
+
"description": "HTTP status code returned with the error."
|
|
640
|
+
},
|
|
641
|
+
"timestamp": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"format": "date-time",
|
|
644
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"WeatherLocation": {
|
|
649
|
+
"type": "object",
|
|
650
|
+
"description": "Location information",
|
|
651
|
+
"oneOf": [
|
|
652
|
+
{
|
|
653
|
+
"description": "Location data when the target is specified by GPS coordinates (lat/long).",
|
|
654
|
+
"$ref": "#/components/schemas/LocationByCoordinates"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"description": "Location data when the target is inferred from an IP address.",
|
|
658
|
+
"$ref": "#/components/schemas/LocationByIP"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"description": "Location data when the target is specified by a city name or address string.",
|
|
662
|
+
"$ref": "#/components/schemas/LocationByAddress"
|
|
663
|
+
}
|
|
664
|
+
]
|
|
665
|
+
},
|
|
666
|
+
"FloodForecastData": {
|
|
667
|
+
"type": "object",
|
|
668
|
+
"description": "Flood forecast data object keyed by date (YYYY-MM-DD); each key's value is a FloodForecastDay object.",
|
|
669
|
+
"additionalProperties": {
|
|
670
|
+
"$ref": "#/components/schemas/FloodForecastDay"
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"FloodForecastDay": {
|
|
674
|
+
"type": "object",
|
|
675
|
+
"description": "Flood forecast data for a single day, containing river discharge metrics.",
|
|
676
|
+
"required": ["daily"],
|
|
677
|
+
"properties": {
|
|
678
|
+
"daily": {
|
|
679
|
+
"$ref": "#/components/schemas/FloodDaily"
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"security": [
|
|
686
|
+
{
|
|
687
|
+
"ApiKeyAuthHeader": []
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"ApiKeyAuthQuery": []
|
|
691
|
+
}
|
|
692
|
+
]
|
|
693
|
+
}
|