{"apiVersion":"1.0.0","schemaVersion":1,"generatedAt":"2026-08-25T07:46:36.735Z","resource":{"id":"a5e122b0cac1b0d62bb10281","key":"POST https://api.geoprimitives.dev/v1/geometry/centroid","method":"POST","resourceUrl":"https://api.geoprimitives.dev/v1/geometry/centroid","alternateResourceUrls":["https://api.geoprimitives.dev/v1/geometry/centroid"],"canonicalUrl":"https://api.geoprimitives.dev/v1/geometry/centroid","origin":"https://api.geoprimitives.dev","hostname":"api.geoprimitives.dev","groupId":"api-geoprimitives-dev-a3da827b","providerName":"geoprimitives","title":"geoprimitives: POST /v1/geometry/centroid","description":"Find the area centroid of a polygon: a representative point for labelling, joining, or reverse geocoding a shape you only have a boundary for. It is the centre of mass of the area with holes subtracted, not the average of the vertices, so densely sampled edges do not drag it. Know what a centroid is not: on a concave or ring-shaped polygon the centre of mass can fall outside the polygon itself, and this endpoint returns it anyway rather than nudging the point inside. Test it with POST /v1/pip if you need a point that is guaranteed to be inside. Not turf's centroid, which is the arithmetic mean of the vertices and drifts towards whichever part of the boundary happens to be densely sampled. The moment integral is evaluated in a Lambert cylindrical equal-area projection of the WGS 84 authalic","tags":["centroid","geometry","measurement","polygon","wgs84"],"type":"http","x402Version":2,"routeTemplate":null,"input":{"type":"http","method":"POST","bodyType":"json","bodyFieldNames":["geojson"],"pathParamNames":[],"queryParamNames":[]},"iconUrl":null,"payment":{"networks":["eip155:8453"],"schemes":["exact"],"assets":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],"options":[{"network":"eip155:8453","scheme":"exact","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amountAtomic":"10000","payTo":"0x76A51b5Dd3729950B3b60c17f19252d221968FCe","maxTimeoutSeconds":300,"tokenName":"USD Coin","tokenVersion":"2"}],"acceptedPaymentCount":1,"priceUsd":null},"quality":{"l30DaysTotalCalls":1,"l30DaysUniquePayers":1,"lastCalledAt":"2026-08-21T17:25:57.994Z"},"registry":null,"sources":[{"id":"cdp-bazaar","sourceUrl":"https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources","observedAt":"2026-08-25T05:19:49.445Z","lastUpdated":"2026-08-21T17:25:58.148Z","recordKey":"POST https://api.geoprimitives.dev/v1/geometry/centroid"}],"verification":{"level":"origin-reachable","checkedAt":"2026-08-25T05:20:56.670Z","structural":{"ok":true,"normalized":true,"publicHttpUrl":true},"sourceConfirmed":true,"crossSource":false,"registryPaymentValid":null,"originCheck":{"scope":"origin","reachable":true,"statusCode":200,"method":"HEAD","checkedAt":"2026-08-25T05:20:21.676Z","latencyMs":727,"error":null},"quoteCheck":{"scope":"exact-route","outcome":"not-safely-testable","attempted":false,"requestedMethod":null,"statusCode":null,"finalUrl":"https://api.geoprimitives.dev/v1/geometry/centroid","redirectCount":0,"checkedAt":"2026-08-25T05:20:56.670Z","latencyMs":null,"reason":"potentially-mutating-method:POST","requirementCount":0},"quote":null,"paidCall":{"verified":false,"checkedAt":null,"network":null,"receiptReference":null,"outputReviewed":false}},"curation":{"status":"discovered","basis":"discovery-only","matchScope":null,"listingSlug":null,"providerListingSlug":null,"listingName":null,"kind":null,"categories":[],"editorialDescription":null,"docsUrl":null,"sourceUrl":null}}}