{"api":"v1","generated_at":"2026-09-16T05:24:56.842Z","licence":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/","attribution":"TOLL, with a link to the page cited"},"page":"https://tollindex.com/e/api-geoprimitives-dev-v1-pip-2d981a","pinned_page":"https://tollindex.com/e/api-geoprimitives-dev-v1-pip-2d981a/at/2026-09-16T04-48Z","pinned":false,"method":"https://tollindex.com/ledger/method","snapshot_at":"2026-09-16T04:48:25.992Z","snapshot_stamp":"2026-09-16T04-48Z","endpoint":{"slug":"api-geoprimitives-dev-v1-pip-2d981a","canonical_url":"https://api.geoprimitives.dev/v1/pip","resource":"https://api.geoprimitives.dev/v1/pip","http_method":"POST","type":"http","x402_version":2,"registries":["cdp"],"primary_registry":"cdp","curated_by_coinbase":false,"description":"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.","service_name":"geoprimitives","declared_category":null,"declared_tags":["pip","point-in-polygon","containment","matrix","wgs84"],"route_template":null,"registry_updated":"2026-08-21T17:26:09.314Z"},"derived":{"note":"fields no registry supplies; TOLL derives them and marks them derived on the page","title":"pip","category":"inference","first_observed_by_toll":"2026-09-10T19:08:24.178Z","last_observed_by_toll":"2026-09-16T04:48:25.991Z","observation_began":"2026-09-10"},"presence":{"listed_now":true,"first_absent_at":null,"delisting_confirmed_at":null,"events":[{"registry":"cdp","at":"2026-09-10T19:08:24.178Z","event":"listed"}]},"accepts":[{"registry":"cdp","ordinal":0,"network":"eip155:8453","asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","asset_name":"USD Coin","symbol":"USDC","decimals":6,"amount_display":"0.01 USDC","amount_units":0.01,"decimals_known":true,"pay_to":"0x76A51b5Dd3729950B3b60c17f19252d221968FCe","scheme":"exact"}],"counters":{"observed_at":"2026-09-16T04:48:25.992Z","calls_30d":1,"unique_payers_30d":1,"last_called_at":"2026-08-21T17:26:09.205Z"},"validation":{"latest":{"observed_at":"2026-09-16T04:21:33.198Z","state":"pass","failed_checks":[],"endpoint_http_status":402,"run_id":"daily-2026-09-16"},"uptime":[{"days":7,"observed":6,"passed":6,"ratio":1},{"days":30,"observed":6,"passed":6,"ratio":1},{"days":90,"observed":6,"passed":6,"ratio":1}],"history_90d":[{"observed_at":"2026-09-16T04:21:33.198Z","state":"pass","failed_checks":[],"run_id":"daily-2026-09-16","state_changed":false},{"observed_at":"2026-09-15T04:19:17.405Z","state":"pass","failed_checks":[],"run_id":"daily-2026-09-15","state_changed":false},{"observed_at":"2026-09-14T04:16:48.139Z","state":"pass","failed_checks":[],"run_id":"daily-2026-09-14","state_changed":false},{"observed_at":"2026-09-13T04:16:01.918Z","state":"pass","failed_checks":[],"run_id":"daily-2026-09-13","state_changed":false},{"observed_at":"2026-09-12T06:31:28.428Z","state":"pass","failed_checks":[],"run_id":"daily-2026-09-12","state_changed":false},{"observed_at":"2026-09-11T10:00:48.673Z","state":"pass","failed_checks":[],"run_id":"daily-2026-09-11","state_changed":true}]},"seller":{"wallet":"0x76A51b5Dd3729950B3b60c17f19252d221968FCe","page":"https://tollindex.com/seller/0x76A51b5Dd3729950B3b60c17f19252d221968FCe","endpoints":21,"hosts":1},"reports":0,"registry_record":{"cdp":[{"tags":["pip","point-in-polygon","containment","matrix","wgs84"],"type":"http","accepts":[{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","extra":{"name":"USD Coin","version":"2"},"payTo":"0x76A51b5Dd3729950B3b60c17f19252d221968FCe","amount":"10000","scheme":"exact","network":"eip155:8453","maxTimeoutSeconds":300}],"quality":{"lastCalledAt":"2026-08-21T17:26:09.205Z","l30DaysTotalCalls":1,"l30DaysUniquePayers":1},"resource":"https://api.geoprimitives.dev/v1/pip","extensions":{"bazaar":{"info":{"input":{"body":{"points":[[-122.4184,37.7752],[-122.3,37.9]],"polygons":{"type":"FeatureCollection","features":[{"id":"sf","type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-122.52,37.7],[-122.35,37.7],[-122.35,37.84],[-122.52,37.84],[-122.52,37.7]]]},"properties":null}]}},"type":"http","method":"POST","bodyType":"json"},"output":{"type":"json","example":{"notes":[],"matrix":[[1],[0]],"pointCount":2,"polygonIds":["sf"],"containedBy":[[0],[]],"pairsTested":2,"boundaryRule":"A point exactly on a polygon edge or vertex counts as inside. Set ignoreBoundary to flip this.","polygonCount":1,"containedPairs":1,"ignoreBoundary":false}}},"schema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["points","polygons"],"properties":{"points":{"type":"array","items":{"type":"array","items":{"type":"number"},"maxItems":3,"minItems":2,"description":"[longitude, latitude] or [longitude, latitude, elevation]. GeoJSON order, longitude first.","prefixItems":[{"type":"number","maximum":180,"minimum":-180},{"type":"number","maximum":90,"minimum":-90}]},"maxItems":250000,"minItems":1,"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."},"polygons":{"type":"object","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."},"ignoreBoundary":{"type":"boolean","description":"Treat a point lying exactly on a polygon edge or vertex as outside. Defaults to false, which counts it as inside."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}}}},"description":"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.","lastUpdated":"2026-08-21T17:26:09.314Z","serviceName":"geoprimitives","x402Version":2}]}}