Data source: NVE (Norwegian Water Resources and Energy Directorate)
Overview
NVE Flood Warnings (Norway) wraps NVE (Norwegian Water Resources and Energy Directorate), handling authentication, pagination, and rate limits for you. This tutorial covers all 4 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-nve-flood": {
"url": "https://context.gnist.ai/mcp/nve-flood/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (4)
get_county_overview
Get current flood warning levels for all Norwegian counties. Returns a summary of flood risk across Norway with activity levels (1=green/safe, 2=yellow/moderate, 3=orange/significant, 4=red/extreme). Use this to quickly check if any part of Norway has elevated flood risk. Returns: County list with activity levels, plus count of counties with elevated warnings.
curl -X POST "https://context.gnist.ai/mcp/nve-flood/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_county_overview", "arguments": {}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nve-flood/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {}, 'name': 'get_county_overview'}},
)
print(resp.json())
get_region_details
Get municipalities and active warnings for a Norwegian county. Drill down into a specific county to see which municipalities are affected and what warnings are active. Returns: Region details with municipality list and any active warnings.
| Parameter | Type | Required | Description |
|---|---|---|---|
county_id | string | required | Norwegian county ID (e.g. '03' for Oslo, '46' for Vestland, '50' for Trøndelag). |
curl -X POST "https://context.gnist.ai/mcp/nve-flood/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_region_details", "arguments": {"county_id": "'03'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nve-flood/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'county_id': "'03'"}, 'name': 'get_region_details'}},
)
print(resp.json())
get_flood_warnings
Get flood warnings for Norway, optionally filtered by county or municipality. Returns detailed flood warnings from the Norwegian Water Resources and Energy Directorate (NVE). Warnings include activity level, affected areas, and descriptive text explaining the flood risk. Activity levels: 1=green (safe), 2=yellow (moderate), 3=orange (significant), 4=red (extreme). Returns: List of flood warnings with severity, affected areas, and validity period.
| Parameter | Type | Required | Description |
|---|---|---|---|
county_id | any | optional | Filter by county ID (e.g. '46' for Vestland). Omit for all of Norway. |
municipality_id | any | optional | Filter by municipality ID (e.g. '0301' for Oslo). Overrides county_id if set. |
start_date | any | optional | Start date in YYYY-MM-DD format. Defaults to today. |
end_date | any | optional | End date in YYYY-MM-DD format. Defaults to 3 days from today. |
curl -X POST "https://context.gnist.ai/mcp/nve-flood/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_flood_warnings", "arguments": {"county_id": "'46'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nve-flood/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'county_id': "'46'"}, 'name': 'get_flood_warnings'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/nve-flood/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nve-flood/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use date range parameters to narrow results to a specific time window. Dates are typically in
YYYY-MM-DD format.FAQ
What data does NVE Flood Warnings (Norway) provide?
Norwegian flood warnings from NVE — current county-level risk assessments, regional details with municipalities, and detailed flood warnings with severity levels (green/yellow/orange/red). It exposes 4 tools: get_county_overview, get_region_details, get_flood_warnings, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the NVE Flood Warnings (Norway) API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.