services
EPA Water Quality Portal
Examples

WQP Examples

Practical examples for using EPA Water Quality Portal tools.

Interactive Tester

MCP Protocol Tester

Protocol Flow

Example: Station Search by State and Characteristic

curl -X POST \
  -H "x-api-key: dev-key-12345" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "wqp.station_search",
      "arguments": {
        "statecode": "US:40",
        "characteristicName": "Atrazine",
        "data_format": "cleaned"
      }
    }
  }' \
  http://localhost:3001/api/v1/services/wqp/mcp

Example: Station Search by Bounding Box

curl -X POST \
  -H "x-api-key: dev-key-12345" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "wqp.station_search",
      "arguments": {
        "bBox": "-92.8,44.2,-88.9,46.0",
        "characteristicType": "Nutrient",
        "data_format": "cleaned"
      }
    }
  }' \
  http://localhost:3001/api/v1/services/wqp/mcp

Example: Result Search with Date Range

curl -X POST \
  -H "x-api-key: dev-key-12345" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "wqp.result_search",
      "arguments": {
        "bBox": "-92.8,44.2,-88.9,46.0",
        "characteristicName": "Caffeine",
        "startDateLo": "01-01-2020",
        "startDateHi": "12-31-2023",
        "data_format": "cleaned"
      }
    }
  }' \
  http://localhost:3001/api/v1/services/wqp/mcp

Example: Raw CSV Output

curl -X POST \
  -H "x-api-key: dev-key-12345" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "wqp.station_search",
      "arguments": {
        "statecode": "US:56",
        "characteristicType": "Nutrient",
        "data_format": "raw"
      }
    }
  }' \
  http://localhost:3001/api/v1/services/wqp/mcp