{"uid":"cap_KifcbgzQ2vXMUzVIdhijA","slug":"boring-api-geo-polygon-centroid-6383ab98","name":"boring-api · geo — Polygon Centroid","description":"Pure-library spatial math and timezone lookup. Distance, bearing, polygons, point-in-polygon, timezone-by-coords. No external API calls — all computed in-Worker.","url":"https://geo.boring-api.com/polygon-centroid","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"polygon":{"type":"object"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ewnmkBkl-cpglPDuSB0qm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the geometric centroid (center point) of a polygon using pure in-Worker spatial math, with no external API calls.","exampleAgentPrompt":"Calculate the centroid of this polygon: {\"type\":\"Polygon\",\"coordinates\":[[[-73.99,40.73],[-73.97,40.73],[-73.97,40.75],[-73.99,40.75],[-73.99,40.73]]]}","exampleUseCases":null,"resultDescription":"Returns a centroid object containing the computed geographic center point of the submitted polygon, expressed as latitude and longitude coordinates. Computation is performed entirely in-Worker with no external dependencies.","failureModes":["Invalid or malformed polygon object returns a 400 error","Unclosed polygon ring may cause computation error or unexpected result","Self-intersecting polygon may produce geometrically incorrect centroid","Missing polygon property in request body causes validation failure","Very large or complex polygon with many vertices may increase latency slightly"],"whenToPreferThis":"Choose this endpoint when you need fast, serverless, no-external-call centroid computation for a polygon — especially when you want predictable low latency and privacy since no data leaves the Worker. Prefer over GIS platform APIs when you don't need map rendering or additional geospatial enrichment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:37:56.587Z","isFirstParty":false}