{"openapi":"3.1.0","info":{"title":"Polygon Geometry API","version":"1.0.0","description":"Computational geometry for arbitrary polygons and point sets — on a plane, with no map or shape templates needed. The area endpoint takes a polygon as a list of [x,y] vertices and returns its area (by the shoelace formula), perimeter, centroid, winding orientation (clockwise or counter-clockwise), whether it is convex, and its bounding box. The contains endpoint tests whether a point is inside a polygon, outside it, or exactly on its boundary, using robust ray casting that handles concave shapes correctly. The convex-hull endpoint computes the convex hull of a set of points by Andrew's monotone chain, along with its area and perimeter. It works for any simple polygon, convex or concave. Everything is computed locally and deterministically, so it is instant and private. Ideal for graphics and game development, GIS and mapping, CAD and collision detection, computational geometry, and data visualisation. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is planar polygon geometry; for the area of named shapes (circle, triangle, …) use a geometry API and for geographic GeoJSON area on the earth use a GeoJSON API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/polygon-api","description":"oanor gateway"}],"tags":[{"name":"Polygon"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/area":{"get":{"operationId":"get_v1_area","tags":["Polygon"],"summary":"Polygon area, centroid & properties","description":"","parameters":[{"name":"polygon","in":"query","required":true,"description":"Vertices [[x,y],...]","schema":{"type":"string"},"example":"[[0,0],[4,0],[4,4],[0,4]]"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"area":16,"convex":true,"centroid":[2,2],"vertices":4,"perimeter":16,"orientation":"counter-clockwise","signed_area":16,"bounding_box":{"max_x":4,"max_y":4,"min_x":0,"min_y":0,"width":4,"height":4}},"meta":{"timestamp":"2026-06-03T17:42:05.342Z","request_id":"9a83ac9c-56fc-4467-8eea-3afc34a473bf"},"status":"ok","message":"Polygon area","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/contains":{"get":{"operationId":"get_v1_contains","tags":["Polygon"],"summary":"Point in polygon test","description":"","parameters":[{"name":"polygon","in":"query","required":true,"description":"Vertices [[x,y],...]","schema":{"type":"string"},"example":"[[0,0],[4,0],[4,4],[0,4]]"},{"name":"point","in":"query","required":false,"description":"[x,y]","schema":{"type":"string"},"example":"[2,2]"},{"name":"x","in":"query","required":false,"description":"or x","schema":{"type":"string"}},{"name":"y","in":"query","required":false,"description":"and y","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"point":[2,2],"inside":true,"position":"inside","on_boundary":false,"polygon_vertices":4},"meta":{"timestamp":"2026-06-03T17:42:05.437Z","request_id":"72ef7714-1f0b-47de-b0ef-3a49e72f5945"},"status":"ok","message":"Point in polygon","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/convex-hull":{"get":{"operationId":"get_v1_convex_hull","tags":["Polygon"],"summary":"Convex hull of points","description":"","parameters":[{"name":"points","in":"query","required":true,"description":"Points [[x,y],...]","schema":{"type":"string"},"example":"[[0,0],[4,0],[4,4],[0,4],[2,2]]"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"area":16,"hull":[[0,0],[4,0],[4,4],[0,4]],"perimeter":16,"hull_points":4,"input_points":5},"meta":{"timestamp":"2026-06-03T17:42:05.538Z","request_id":"22d73884-6772-4af1-bda3-841afd06b48a"},"status":"ok","message":"Convex hull","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Polygon Geometry API","notes":"Planar cartesian coordinates. Shoelace area, ray-casting point-in-polygon, monotone-chain hull. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/area","params":{"polygon":"[[x,y],…] vertices"},"returns":"area, perimeter, centroid, orientation, convexity, bounding box"},{"path":"/v1/contains","params":{"point":"[x,y] (or x and y)","polygon":"[[x,y],…]"},"returns":"inside / outside / boundary"},{"path":"/v1/convex-hull","params":{"points":"[[x,y],…]"},"returns":"the convex hull and its area/perimeter"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Computational geometry for arbitrary polygons and point sets — on a plane, with no map or shape templates needed. The area endpoint takes a polygon as a list of [x,y] vertices and returns its area (by the shoelace formula), perimeter, centroid, winding orientation (clockwise or counter-clockwise), whether it is convex, and its bounding box. The contains endpoint tests whether a point is inside a polygon, outside it, or exactly on its boundary, using robust ray casting. The convex-hull endpoint computes the convex hull of a set of points (Andrew's monotone chain) and its area and perimeter. It works for any simple polygon, convex or concave. Everything is computed locally and deterministically, so it is instant and private. Ideal for graphics and games, GIS and mapping, CAD and collision detection, computational geometry, and data visualisation. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is planar polygon geometry; for the area of named shapes (circle, triangle, …) use a geometry API and for geographic GeoJSON area on the earth use a GeoJSON API."},"meta":{"timestamp":"2026-06-03T17:42:05.661Z","request_id":"0e3728b3-3b9d-4ca7-8baf-383ce2ad3a1e"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":8135,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":965,"monthly_call_quota":17650,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2955,"monthly_call_quota":227500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6755,"monthly_call_quota":1180000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/polygon-api"}