# pogo-tb.nl /v1/afstand — Dutch Postcode Distance Calculator

> pogo-tb.nl /v1/afstand — Dutch Postcode Distance Calculator is a paid API for AI agents from api.pogo-tb.nl, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Calculates the straight-line (haversine) distance in kilometres between two Dutch postcodes using BAG address centroid data.

## Facts

- Endpoint: GET https://api.pogo-tb.nl/v1/afstand
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pogo-tb-nl-v1-afstand-dutch-postcode-distance-calculator-e1acb1ac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jGHljYDgFGCj3U3Mn6UNd

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 pogo-tb-nl-v1-afstand-dutch-postcode-distance-calculator-e1acb1ac
```

Example prompt: What's the straight-line distance in kilometres between Dutch postcode 1011AB and 3011BD?

## When to prefer this

Choose this endpoint when you need a fast, cheap, programmatic straight-line distance between two Dutch postcodes using authoritative Dutch government BAG data. Ideal for logistics, real-estate, or territory-planning agents operating in the Netherlands. Prefer this over geocoding+distance APIs when you already have Dutch postcodes and want a single low-cost call. Note it returns haversine distance, not routing distance — use a routing API if road distance is needed.

## Known failure modes

- Invalid or non-existent Dutch postcode returns an error or empty result
- Missing required query parameters (from_pc or to_pc) causes a 400-level response
- Payment not completed via x402/USDC returns a 402 Payment Required response
- Postcode not found in BAG dataset may return null distance
- Network or upstream PDOK service outage causes 5xx errors

## How this service works

Pay-per-call Dutch RDW kenteken and BAG address APIs for AI agents. Free previews; full JSON via x402 USDC on Base.

## Output

Returns a JSON object with a 'data' field containing 'distance_km' (a float, e.g. 165.2) representing the haversine (great-circle) distance between the two postcode centroids, plus an 'attribution' string crediting BAG/PDOK/Kadaster under CC BY 4.0. Note: this is straight-line distance, not road distance.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "to_pc": {
       "type": "string"
      },
      "from_pc": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object"
      },
      "attribution": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "distance_km": 165.2
  },
  "attribution": "Source: BAG centroids via PDOK Locatieserver / Kadaster, CC BY 4.0. Distance is great-circle (haversine), not road."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pogo-tb-nl-v1-afstand-dutch-postcode-distance-calculator-e1acb1ac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.pogo-tb.nl](https://www.zero.xyz/host/api.pogo-tb.nl/llms.txt)
