Catalog/space-surface-gravity

Space

Surface gravity from mass & radius API

Returns surface gravity g=G*M/R^2 (in m/s^2 and Earth g) plus surface escape velocity from a body's mass and radius, or a named body. Answers 'What is surface gravity on Mars?', 'Gravity of a planet with this mass and radius?'.

Price$0.02per request
MethodPOST
Route/v1/space/surface-gravity
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
spaceastronomysurface-gravitygravityplanetaryphysicsescape-velocitygeophysics
API URLhttps://x402.hexl.dev/v1/space/surface-gravity
Integration docs
Example request
{
  "body": "mars"
}
Example response
{
  "body": "mars",
  "massKg": 6.4171e+23,
  "radiusM": 3389500,
  "gravityMs2": 3.727977,
  "gravityG": 0.380148,
  "escapeVelocityKms": 5.02712,
  "interpretation": "Surface gravity is 3.728 m/s² (0.38× Earth)."
}
Input schema
{
  "type": "object",
  "properties": {
    "body": {
      "type": "string",
      "examples": [
        "mars"
      ]
    },
    "massKg": {
      "type": "number"
    },
    "radiusM": {
      "type": "number"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}