Catalog/space-gravitational-force

Space

Gravitational force between masses API

Returns the Newtonian gravitational force F=G*m1*m2/r^2 between two masses plus the acceleration each experiences. Answers 'Gravitational pull between two bodies?', 'Force between Earth and Moon?'.

Price$0.02per request
MethodPOST
Route/v1/space/gravitational-force
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
spaceastronomygravitynewtongravitational-forcephysicstwo-bodyacceleration
API URLhttps://x402.hexl.dev/v1/space/gravitational-force
Integration docs
Example request
{
  "mass1Kg": 5.972168e+24,
  "mass2Kg": 7.342e+22,
  "separationM": 384400000
}
Example response
{
  "mass1Kg": 5.972168e+24,
  "mass2Kg": 7.342e+22,
  "separationM": 384400000,
  "forceN": 198054795287939300000,
  "accelOnMass1Ms2": 0.000033163,
  "accelOnMass2Ms2": 0.002697559,
  "interpretation": "Gravitational attraction is 1.981e+20 N."
}
Input schema
{
  "type": "object",
  "required": [
    "mass1Kg",
    "mass2Kg",
    "separationM"
  ],
  "properties": {
    "mass1Kg": {
      "type": "number",
      "examples": [
        5.972168e+24
      ]
    },
    "mass2Kg": {
      "type": "number",
      "examples": [
        7.342e+22
      ]
    },
    "separationM": {
      "type": "number",
      "examples": [
        384400000
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}