Engineering
Hooke's-law spring force & energy API
Applies Hooke's law F=k·x to solve for the missing one of spring constant, displacement, or force, and always reports the stored elastic energy U=½k·x². Answers 'What force does a spring exert at a given extension?', 'How much energy is stored in a compressed spring?'.
Price$0.02per request
MethodPOST
Route/v1/engineering/hookes-law-spring
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
engineeringmechanicsphysicsspringhookes-lawspring-constantelastic-energystiffness
API URL
Integration docshttps://x402.hexl.dev/v1/engineering/hookes-law-springExample request
{
"springConstantNm": 200,
"displacementM": 0.1
}Example response
{
"springConstantNm": 200,
"displacementM": 0.1,
"forceN": 20,
"storedEnergyJ": 1,
"formula": "F = k*x, U = 0.5*k*x^2"
}Input schema
{
"type": "object",
"required": [],
"properties": {
"springConstantNm": {
"type": "number",
"description": "spring constant k (N/m)",
"examples": [
200
]
},
"displacementM": {
"type": "number",
"description": "extension/compression x (m)"
},
"forceN": {
"type": "number",
"description": "spring force F (N)"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}