Loading
Loading
Retrieve daily flood forecast data for any location worldwide for up to 16 days ahead. Supports lookup by city name or address, GPS coordinates, or IP address. Each response includes river discharge, flow percentiles, and full geographic context.
The Flood Forecast API delivers daily river discharge values including the mean, median, maximum, minimum, and 25th/75th percentile discharge rates for each date in the requested range. When no location parameter is supplied the API auto-detects the requesting IP address.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
startDate and endDate are required query parameters in YYYY-MM-DD format. The date range must not exceed 16 days. Pass location, lat/long, or ipto specify a target location. If none are provided the API resolves flood data for the calling machine's IP address. Use timezone to override the default timezone of the resolved location.
startDaterequiredstringStarting date for which to fetch flood forecast data. Must follow YYYY-MM-DD format (e.g., 2025-08-25). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
endDaterequiredstringEnd date for which to fetch flood forecast data. Must follow YYYY-MM-DD format (e.g., 2025-08-25). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
locationoptionalstringSpecifies the target location. It can be a city name, place name, or a complete address (e.g., "Lahore", "Paris, France", "1600 Amphitheatre Parkway, Mountain View, CA").
latoptionalfloatLatitude of the target location. Must be used together with "long".
longoptionalfloatLongitude of the target location. Must be used together with "lat".
ipoptionalstringIPv4 or IPv6 address used to infer location. Defaults to the requester’s public IP if not provided.
timezoneoptionalstringSpecifies the timezone for returned results. Defaults to the resolved location’s timezone.
A successful request returns a 200 OK response with a JSON object. The top-level object always contains location and forecast. The forecast object is keyed by date (YYYY-MM-DD), each containing a daily sub-object with river discharge metrics. See the response preview on the right for the full JSON structure.
locationLocation information including coordinates, timezone, and geographic details.
forecastForecast object containing daily flood forecast data keyed by date (YYYY-MM-DD). Each key maps to an object with a "daily" sub-object.
The location object contains the following geographic fields:
location_stringOriginal location query string as submitted, including full address or place name.
country_nameResolved country name derived from the geocoded location query.
state_provState, province, or primary administrative division identified from the location.
cityCity or municipal area name extracted from the geocoded location.
localitySpecific locality, neighborhood, suburb, or village within the geocoded area.
latitudeGeocoded latitude coordinate in decimal degrees, ranging from -90 to +90.
longitudeGeocoded longitude coordinate in decimal degrees, ranging from -180 to +180.
elevationElevation above mean sea level in meters at the geocoded coordinates.
timezoneIANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles).
timezone_abbreviationCurrent timezone abbreviation for the location based on local offset (e.g., PDT, CET).
Each daily forecast entry contains the following river discharge fields:
timestampISO 8601 formatted timestamp of the daily forecast entry.
river_dischargeDaily water flow rate through the river channel measured in cubic meters per second (m³/s), representing the volume of water passing through a cross-section per unit time.
river_discharge_meanAverage discharge rate in cubic meters per second (m³/s). Provides the expected central tendency of predicted river flow.
river_discharge_medianMedian value of discharge rate in cubic meters per second (m³/s).
river_discharge_maxHighest predicted discharge rate in cubic meters per second (m³/s). Indicates the upper bound of possible flow scenarios.
river_discharge_minLowest predicted discharge rate in cubic meters per second (m³/s). Indicates the lower bound of possible flow scenarios.
river_discharge_p25First quartile (25th percentile) of discharge rate in cubic meters per second (m³/s).
river_discharge_p75Third quartile (75th percentile) of discharge rate in cubic meters per second (m³/s).
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
please pass correct parameters
Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
startDate must be in yyyy-mm-dd format
Location not found