Api Endpoint

Point in Polygon (GeoJSON)

Point in polygon check and GeoJSON geometry: point-in-polygon with correct hole handling, bounding box, centroid, signed area in square metres, perimeter length, and ring winding order for a geometry supplied in the request. Accepts Polygon and MultiPolygon, and a GeoJSON Feature wrapping either. Area and length are geodesic on the WGS-84 ellipsoid, correct at any latitude; containment is planar in lon/lat.

Open interactive test console

Offering

Provider
api.duoleads.com
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Location And Travel
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://api.duoleads.com/v1/geo/polygon
MIME type
application/json
First seen
2026-10-16T01:50:38.788Z
Last seen
Tags
point-in-polygon, geojson, polygon-area, geometry, Geo

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.05 USDC
Atomic price: 50000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "50000",
    "payTo": "0xCD673f7e1daD254347AEab6be0DEFe8b9C6b3A39"
  }
]

Observed health

Status
Healthy
Latest latency
44 ms
Average latency
670 ms
HTTP status
402
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "geometry": {
          "type": "string",
          "description": "URL-encoded GeoJSON Polygon, MultiPolygon or a Feature wrapping one. At most 3072 characters and 2000 coordinate pairs.",
          "maxLength": 3072
        },
        "lat": {
          "type": "string",
          "description": "Point latitude; with lon, runs the containment test.",
          "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
          "maxLength": 64
        },
        "lon": {
          "type": "string",
          "description": "Point longitude; with lat, runs the containment test.",
          "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
          "maxLength": 64
        },
        "ops": {
          "type": "string",
          "description": "Comma-separated subset of contains,bbox,centroid,area,perimeter,winding. Default all.",
          "maxLength": 128
        }
      },
      "required": [
        "geometry"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "geometry": {
              "description": "URL-encoded GeoJSON Polygon, MultiPolygon or a Feature wrapping one. At most 3072 characters and 2000 coordinate pairs.",
              "maxLength": 3072,
              "type": "string"
            },
            "lat": {
              "description": "Point latitude; with lon, runs the containment test.",
              "maxLength": 64,
              "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
              "type": "string"
            },
            "lon": {
              "description": "Point longitude; with lat, runs the containment test.",
              "maxLength": 64,
              "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
              "type": "string"
            },
            "ops": {
              "description": "Comma-separated subset of contains,bbox,centroid,area,perimeter,winding. Default all.",
              "maxLength": 128,
              "type": "string"
            }
          },
          "required": [
            "geometry"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "data": {
              "properties": {
                "area_m2": {
                  "type": "number"
                },
                "bbox": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "centroid": {
                  "properties": {
                    "lat": {
                      "type": "number"
                    },
                    "lon": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "lat",
                    "lon"
                  ],
                  "type": "object"
                },
                "contains": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "on_boundary": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "perimeter_m": {
                  "type": "number"
                },
                "rings": {
                  "type": "integer"
                },
                "vertices": {
                  "type": "integer"
                },
                "winding": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "rings",
                "vertices"
              ],
              "type": "object"
            },
            "meta": {
              "properties": {
                "computed_at": {
                  "description": "RFC 3339 UTC with milliseconds",
                  "type": "string"
                },
                "deterministic": {
                  "type": "boolean"
                },
                "disclaimer": {
                  "type": "string"
                },
                "price_usd": {
                  "type": "string"
                },
                "request_id": {
                  "type": "string"
                },
                "sources": {
                  "items": {
                    "required": [
                      "id",
                      "version",
                      "published"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "request_id",
                "computed_at",
                "price_usd",
                "deterministic",
                "disclaimer"
              ],
              "type": "object"
            },
            "ok": {
              "const": true
            },
            "route": {
              "const": "/v1/geo/polygon"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "route",
            "version",
            "data",
            "meta"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}