{"openapi":"3.1.0","info":{"title":"Earth Pressure API","version":"1.0.0","description":"Lateral earth-pressure maths (Rankine theory) as an API, computed locally and deterministically for retaining-wall design. The active endpoint computes the active earth pressure that pushes a wall outward when the soil is allowed to yield: the coefficient Ka = (1−sinφ)/(1+sinφ) from the soil friction angle, the pressure at the base of the wall σ = Ka·γ·H, the total thrust per metre run ½·Ka·γ·H², plus the contributions of a surface surcharge and of soil cohesion (which reduces the pressure by 2c√Ka and forms a tension crack of depth 2c/(γ√Ka)). The passive endpoint computes the passive resistance Kp = (1+sinφ)/(1−sinφ) that the soil mobilises when a wall is pushed into it — the resisting pressure and thrust, with cohesion adding 2c√Kp. The atrest endpoint computes the at-rest pressure K0 = 1−sinφ (Jaky) for unyielding walls such as basements and braced excavations. Everything is computed locally and deterministically, so it is instant and private. Ideal for geotechnical and civil-engineering tools, retaining-wall, sheet-pile and basement-wall design, excavation-shoring and foundation apps, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is Rankine lateral earth pressure; for slope geometry use a slope API and for open-channel weir flow use a weir API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/earthpressure-api","description":"oanor gateway"}],"tags":[{"name":"Earth Pressure"},{"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/active":{"get":{"operationId":"get_v1_active","tags":["Earth Pressure"],"summary":"Active earth pressure","description":"","parameters":[{"name":"friction_angle","in":"query","required":true,"description":"Soil friction angle φ (degrees)","schema":{"type":"string"},"example":"30"},{"name":"unit_weight","in":"query","required":true,"description":"Soil unit weight γ (kN/m³)","schema":{"type":"string"},"example":"18"},{"name":"height","in":"query","required":true,"description":"Wall height H (m)","schema":{"type":"string"},"example":"5"},{"name":"surcharge","in":"query","required":false,"description":"Surface surcharge q (kPa)","schema":{"type":"string"},"example":"10"},{"name":"cohesion","in":"query","required":false,"description":"Soil cohesion c (kPa)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Rankine active: Ka = (1−sinφ)/(1+sinφ). Cohesion reduces pressure by 2c√Ka; a tension crack forms in the upper soil.","type":"active","inputs":{"height":5,"cohesion":0,"surcharge":10,"unit_weight":18,"friction_angle":30},"coefficient":0.333333,"soil_thrust_kn_m":75,"base_pressure_kpa":33.3333,"total_thrust_kn_m":91.6667,"surcharge_thrust_kn_m":16.6667,"soil_thrust_line_of_action_m":1.6667},"meta":{"timestamp":"2026-06-04T18:38:27.105Z","request_id":"24335e47-8b86-4c60-9851-4846dd5b9482"},"status":"ok","message":"Active earth pressure","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/atrest":{"get":{"operationId":"get_v1_atrest","tags":["Earth Pressure"],"summary":"At-rest earth pressure","description":"","parameters":[{"name":"friction_angle","in":"query","required":true,"description":"Soil friction angle φ (degrees)","schema":{"type":"string"},"example":"30"},{"name":"unit_weight","in":"query","required":true,"description":"Soil unit weight γ (kN/m³)","schema":{"type":"string"},"example":"18"},{"name":"height","in":"query","required":true,"description":"Wall height H (m)","schema":{"type":"string"},"example":"5"},{"name":"surcharge","in":"query","required":false,"description":"Surface surcharge q (kPa)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"At-rest (Jaky): K0 = 1−sinφ. Used for unyielding walls such as basements and braced cuts.","type":"at-rest","inputs":{"height":5,"surcharge":0,"unit_weight":18,"friction_angle":30},"coefficient":0.5,"soil_thrust_kn_m":112.5,"base_pressure_kpa":45,"total_thrust_kn_m":112.5,"surcharge_thrust_kn_m":0,"soil_thrust_line_of_action_m":1.6667},"meta":{"timestamp":"2026-06-04T18:38:27.196Z","request_id":"9ca0fb53-b8bb-4ace-b680-25727ade8507"},"status":"ok","message":"At-rest earth pressure","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/passive":{"get":{"operationId":"get_v1_passive","tags":["Earth Pressure"],"summary":"Passive earth pressure","description":"","parameters":[{"name":"friction_angle","in":"query","required":true,"description":"Soil friction angle φ (degrees)","schema":{"type":"string"},"example":"30"},{"name":"unit_weight","in":"query","required":true,"description":"Soil unit weight γ (kN/m³)","schema":{"type":"string"},"example":"18"},{"name":"height","in":"query","required":true,"description":"Wall height H (m)","schema":{"type":"string"},"example":"5"},{"name":"surcharge","in":"query","required":false,"description":"Surface surcharge q (kPa)","schema":{"type":"string"},"example":"10"},{"name":"cohesion","in":"query","required":false,"description":"Soil cohesion c (kPa)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Rankine passive: Kp = (1+sinφ)/(1−sinφ). Cohesion adds 2c√Kp to the resisting pressure.","type":"passive","inputs":{"height":5,"cohesion":0,"surcharge":10,"unit_weight":18,"friction_angle":30},"coefficient":3,"soil_thrust_kn_m":675,"base_pressure_kpa":300,"total_thrust_kn_m":825,"surcharge_thrust_kn_m":150,"soil_thrust_line_of_action_m":1.6667},"meta":{"timestamp":"2026-06-04T18:38:27.265Z","request_id":"7eb62773-564c-4203-bd46-f3fe7f20f5f5"},"status":"ok","message":"Passive earth pressure","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":{"notes":"Friction angle φ in degrees, unit weight γ in kN/m³, height H in m, surcharge q in kPa, cohesion c in kPa. Thrust is per metre run of wall. Horizontal backfill, vertical wall, no wall friction.","service":"earthpressure-api","formulae":{"active":"Ka = (1−sinφ)/(1+sinφ),  P = ½Ka·γ·H² + Ka·q·H − 2c·H·√Ka","at_rest":"K0 = 1−sinφ,  P = ½K0·γ·H²","passive":"Kp = (1+sinφ)/(1−sinφ),  P = ½Kp·γ·H² + Kp·q·H + 2c·H·√Kp"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/active":"Active earth pressure Ka, base pressure, soil/surcharge/cohesion thrust and tension-crack depth.","GET /v1/atrest":"At-rest earth pressure K0 (Jaky) for unyielding walls.","GET /v1/passive":"Passive earth pressure Kp, base pressure and total resisting thrust."},"description":"Lateral earth-pressure calculator (Rankine theory): active, passive and at-rest coefficients, base pressures and total thrust on retaining walls."},"meta":{"timestamp":"2026-06-04T18:38:27.359Z","request_id":"dd967bdb-79e3-4ba7-b870-71efdceab99c"},"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":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":900,"monthly_call_quota":15000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":80000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7500,"monthly_call_quota":409000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/earthpressure-api"}