mirrored listing x402 eip155:8453

Answer which of your points fall inside which of your polygons, in one call

Answer which of your points fall inside which of your polygons, in one call. Use it to tag events with the district, catchment or territory they belong to, to filter a point set down to a study area, or to join two datasets that share nothing but geography. The answer comes back twice, as a dense 0/1 matrix and as a per-point list of polygon indices, so neither shape needs rebuilding on your side, and polygon ids are echoed as column labels so the matrix joins straight back to your records. Rings must be closed and coordinates must be EPSG:4326: run POST /v1/geojson/repair first if they are not, and POST /v1/transform if they are not in degrees. Costs scale with polygon detail, not just polygon count, so POST /v1/geometry/simplify on the polygons is often the cheapest way under the caps. The matrix is dense: every point is tested against every polygon, one row per point and one column per polygon, 1 for inside and 0 for outside. A point exactly on an edge or vertex counts as inside unless "ignoreBoundary" is set. Two caps, both on products rather than on either side: at most 250000 point-polygon pairs, and at most 25000000 point-vertex tests, since a ray cast walks every edge. Input is EPSG:4326, longitude then latitude. Limits: 250000 points, 2000 polygons, 100000 polygon positions, and a 1 MiB request body.

Do you run api.geoprimitives.dev? This listing was mirrored from Coinbase's public Bazaar. Claim it in 30 seconds — no account required — and it becomes verified, permanently overriding the mirrored copy.

Claim this listing
10000 (raw units)
price
1
calls / 30d
1
unique payers
2026-08-21
updated

Provider

api.geoprimitives.dev · discovered, not yet claimed by its owner

Payment (x402 accepts[])

[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x76A51b5Dd3729950B3b60c17f19252d221968FCe",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "10000",
    "maxTimeoutSeconds": 300
  }
]

Output schema

{
  "bazaar": {
    "info": {
      "input": {
        "body": {
          "points": [
            [
              -122.4184,
              37.7752
            ],
            [
              -122.3,
              37.9
            ]
          ],
          "polygons": {
            "features": [
              {
                "geometry": {
                  "coordinates": [
                    [
                      [
                        -122.52,
                        37.7
                      ],
                      [
                        -122.35,
                        37.7
                      ],
                      [
                        -122.35,
                        37.84
                      ],
                      [
                        -122.52,
                        37.84
                      ],
                      [
                        -122.52,
                        37.7
                      ]
                    ]
                  ],
                  "type": "Polygon"
                },
                "id": "sf",
                "properties": null,
                "type": "Feature"
              }
            ],
            "type": "FeatureCollection"
          }
        },
        "bodyType": "json",
        "method": "POST",
        "type": "http"
      },
      "output": {
        "example": {
          "boundaryRule": "A point exactly on a polygon edge or vertex counts as inside. Set ignoreBoundary to flip this.",
          "containedBy": [
            [
              0
            ],
            []
          ],
          "containedPairs": 1,
          "ignoreBoundary": false,
          "matrix": [
            [
              1
            ],
            [
              0
            ]
          ],
          "notes": [],
          "pairsTested": 2,
          "pointCount": 2,
          "polygonCount": 1,
          "polygonIds": [
            "sf"
          ]
        },
        "type": "json"
      }
    },
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "input": {
          "additionalProperties": false,
          "properties": {
            "body": {
              "additionalProperties": false,
              "properties": {
                "ignoreBoundary": {
                  "description": "Treat a point lying exactly on a polygon edge or vertex as outside. Defaults to false, which counts it as inside.",
                  "type": "boolean"
                },
                "points": {
                  "description": "Positions to test, each [longitude, latitude] in EPSG:4326. At least 1, at most 250000, and further bounded by the two product caps below.",
                  "items": {
                    "description": "[longitude, latitude] or [longitude, latitude, elevation]. GeoJSON order, longitude first.",
                    "items": {
                      "type": "number"
                    },
                    "maxItems": 3,
                    "minItems": 2,
                    "prefixItems": [
                      {
                        "maximum": 180,
                        "minimum": -180,
                        "type": "number"
                      },
                      {
                        "maximum": 90,
                        "minimum": -90,
                        "type": "number"
                      }
                    ],
                    "type": "array"
                  },
                  "maxItems": 250000,
                  "minItems": 1,
                  "type": "array"
                },
                "polygons": {
                  "description": "A Polygon, a MultiPolygon, or a Feature or FeatureCollection wrapping them, in EPSG:4326. A MultiPolygon is one column of the matrix, not several. Feature \"id\", else \"properties.id\", is echoed back as the column label. At most 2000 polygons and 100000 positions.",
                  "type": "object"
                }
              },
              "required": [
                "points",
                "polygons"
              ],
              "type": "object"
            },
            "bodyType": {
              "enum": [
                "json",
                "form-data",
                "text"
              ],
              "type": "string"
            },
            "method": {
              "enum": [
                "POST"
              ],
              "type": "string"
            },
            "type": {
              "const": "http",
              "type": "string"
            }
          },
          "required": [
            "type",
            "method",
            "bodyType",
            "body"
          ],
          "type": "object"
        },
        "output": {
          "properties": {
            "example": {
              "type": "object"
            },
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}

Use it

curl

curl "https://api.geoprimitives.dev/v1/pip"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid

JavaScript

const res = await fetch("https://api.geoprimitives.dev/v1/pip");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}

Python

import httpx
res = httpx.get("https://api.geoprimitives.dev/v1/pip")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Machine-readable

Everything on this page is also available as clean JSON at /resources/6753.json, and this resource appears in /discovery/resources and /discovery/search.