# Netzhandwerker Cheapest Window Optimizer

> Netzhandwerker Cheapest Window Optimizer is a paid API for AI agents from energy.netzhandwerker.de, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Finds the cheapest electricity price window for a given duration of hours using live grid data

## Facts

- Endpoint: POST https://energy.netzhandwerker.de/optimizer/cheapest-window
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/netzhandwerker-cheapest-window-optimizer-e2e46089
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_a8FHGGczKWgscv6A1ipjf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability netzhandwerker-cheapest-window-optimizer-e2e46089 -d '<json body>'
```

Example prompt: Find the cheapest 3-hour electricity window available today so I can schedule my EV charger to run during the lowest-cost period.

## When to prefer this

Use this endpoint when an AI agent needs to schedule flexible electrical loads (EV charging, battery charging, heat pumps, appliances) during the lowest-cost electricity hours. Ideal for home energy management, demand response automation, and cost-optimization workflows where the agent needs a concrete actionable time window rather than raw price timeseries.

## Known failure modes

- Invalid or missing duration_hours — returns 400 with validation error
- duration_hours exceeds available forecast horizon — returns error or truncated window
- Live grid data unavailable — service may return 503 or stale data warning
- Payment not included or insufficient — x402 payment required error
- duration_hours is zero or negative — rejected with validation error

## How this service works

One x402 call returns the action, best time window, expected EUR value, confidence and expiry for German and European electricity decisions. USDC on Base, no API key or account.

## Output

Returns the optimal time window (start and end times) during which electricity is cheapest for the requested duration, along with associated price data to support scheduling decisions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "duration_hours": {
       "type": "integer",
       "default": 2,
       "maximum": 24,
       "minimum": 1
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "action": "charge_during_window",
  "source": "Cheapest Window Optimizer",
  "window": [
   {
    "end": "2026-07-14T12:00:00.000Z",
    "price": 5.18,
    "start": "2026-07-14T11:00:00.000Z"
   },
   {
    "end": "2026-07-14T13:00:00.000Z",
    "price": 5.77,
    "start": "2026-07-14T12:00:00.000Z"
   }
  ],
  "best_end": "2026-07-14T13:00:00.000Z",
  "timestamp": "2026-07-13T22:51:21.971Z",
  "best_start": "2026-07-14T11:00:00.000Z",
  "day_avg_ct_kwh": "12.397",
  "duration_hours": 2,
  "avg_price_ct_kwh": "5.475",
  "savings_vs_avg_pct": "55.8"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/netzhandwerker-cheapest-window-optimizer-e2e46089/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from energy.netzhandwerker.de](https://www.zero.xyz/host/energy.netzhandwerker.de/llms.txt)
