# boring-api · geo — Point-in-Polygon

> boring-api · geo — Point-in-Polygon is a paid API for AI agents from geo.boring-api.com, paid per call via x402, $0.0005/call, status unknown (last checked 2026-09-13).

Determines whether a given geographic point falls inside a GeoJSON Polygon or MultiPolygon, computed entirely in-Worker with no external API calls.

## Facts

- Endpoint: POST https://geo.boring-api.com/point-in-polygon
- Price: $0.0005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/boring-api-geo-point-in-polygon-36fb134d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mRCf5mqFsn7_mn9HXAwdG

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 boring-api-geo-point-in-polygon-36fb134d -d '<json body>'
```

Example prompt: Is the point at latitude 40.7128, longitude -74.0060 inside this GeoJSON polygon — it's a MultiPolygon feature representing the five boroughs of New York City?

## When to prefer this

Choose this endpoint when you need a fast, cheap, serverless point-in-polygon computation with no external API dependency — ideal for geofencing checks, boundary validation, or spatial queries where you already have a GeoJSON polygon and just need to test containment. At $0.0005 per call it's cost-effective for high-frequency checks.

## Known failure modes

- Invalid or malformed GeoJSON Polygon/MultiPolygon returns an error
- Missing 'point' or 'polygon' field in request body returns a validation error
- Unsupported geometry type (e.g. LineString instead of Polygon) may return an error
- Coordinates outside valid WGS84 range may produce unexpected results

## How this service works

Pure-library spatial math and timezone lookup. Distance, bearing, polygons, point-in-polygon, timezone-by-coords. No external API calls — all computed in-Worker.

## Output

A JSON object indicating whether the given point is contained within the provided GeoJSON Polygon or MultiPolygon geometry, computed purely in-Worker without any external API dependency.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "point": {
   "type": "object"
  },
  "polygon": {
   "type": "object",
   "description": "GeoJSON Polygon or MultiPolygon Feature/Geometry"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/boring-api-geo-point-in-polygon-36fb134d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from geo.boring-api.com](https://www.zero.xyz/host/geo.boring-api.com/llms.txt)
