# Geo Calc – Polygon Area, Perimeter & Centroid

> Geo Calc – Polygon Area, Perimeter & Centroid is a paid API for AI agents from geo-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Calculates the area (m², km², hectares, acres), perimeter (m, km), centroid (lat/lon), and orientation of a lat/lon polygon using spherical excess on the WGS84 equal-area sphere.

## Facts

- Endpoint: GET https://geo-calc.x402tookit.com/polygon-area?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geo-calc-polygon-area-perimeter-centroid-83f3d363
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Na-IidqCcYPRkOlw4mhOp

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 geo-calc-polygon-area-perimeter-centroid-83f3d363
```

Example prompt: Can you calculate the area, perimeter, and centroid of this field? The boundary vertices are: 51.5074,-0.1278;51.5080,-0.1265;51.5065,-0.1255;51.5058,-0.1270

## When to prefer this

Choose this endpoint when you need accurate geodetic area, perimeter, and centroid calculations for a polygon on the WGS84 ellipsoid — particularly for land parcels, geographic boundaries, or GIS workflows requiring multi-unit output (m², km², hectares, acres) in a single call. Prefer this over flat-earth or simple Euclidean calculators when precision over curved Earth surfaces matters. Also useful when you need self-intersection validation or polygon orientation alongside the geometric measurements.

## Known failure modes

- Fewer than 3 vertices provided — returns invalid/error response
- Malformed points string (wrong delimiter, missing values) — parse error or 400 response
- More than 300 vertices submitted — rejected with validation error
- Self-intersecting polygon detected — flagged in response but may still return degraded results
- Antipodal or polar-spanning polygons may yield inaccurate spherical excess results
- Payment not included or insufficient — x402 payment required error

## How this service works

Area, perimeter and centroid of a lat,lon polygon using spherical excess on the WGS84 equal-area sphere.

## Output

Returns a JSON object with area in m², km², hectares, and acres; perimeter in metres and km; centroid latitude and longitude; vertex count; polygon orientation (clockwise/counterclockwise); self-intersection flag; computation method; validity flag with reasons; and optional disclaimer/summary fields.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "points"
     ],
     "properties": {
      "points": {
       "type": "string",
       "description": "Vertices as lat,lon;lat,lon;... (3 to 300, ring may or may not repeat the first point)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "valid": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "areaM2": {
       "type": [
        "null",
        "number"
       ]
      },
      "method": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "areaKm2": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "vertices": {
       "type": [
        "null",
        "number"
       ]
      },
      "areaAcres": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "perimeterM": {
       "type": [
        "null",
        "number"
       ]
      },
      "centroidLat": {
       "type": [
        "null",
        "number"
       ]
      },
      "centroidLon": {
       "type": [
        "null",
        "number"
       ]
      },
      "orie
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geo-calc-polygon-area-perimeter-centroid-83f3d363/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from geo-calc.x402tookit.com](https://www.zero.xyz/host/geo-calc.x402tookit.com/llms.txt)
