Find an API

Search public APIs with auth details & Postman guides

← All APIs

Gravity API

amentum · Location

Location No Auth Free & Open location open_data

The gravitational field of the earth is non-uniform. The geoid is the shape the ocean surface would take if only gravity and the rotation of the Earth were considered. The geoid is the surface that defines zero elevation. The geoid height is the difference between an ideal reference ellipsoid and the geoid. The gravity anomaly is the difference between the acceleration due to gravity on the Earth's surface and the value calc

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Calculate the geoid height

for a given latitude / longitude.

https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height?latitude=-45&longitude=45

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height?latitude=-45&longitude=45"
import requests
params = {
    "latitude": "-45",
    "longitude": "45"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height');
url.searchParams.set('latitude', '-45');
url.searchParams.set('longitude', '45');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height")
	q := baseURL.Query()
	q.Set("latitude", "-45")
	q.Set("longitude", "45")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height")
uri.query = URI.encode_www_form({
  "latitude" => "-45",
  "longitude" => "45"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/geoid_height?" . http_build_query([
    "latitude" => "-45",
    "longitude" => "45"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Calculate gravity anomaly values

for a given latitude / longitude.

https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly?latitude=-45&longitude=45

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly?latitude=-45&longitude=45"
import requests
params = {
    "latitude": "-45",
    "longitude": "45"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly');
url.searchParams.set('latitude', '-45');
url.searchParams.set('longitude', '45');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly")
	q := baseURL.Query()
	q.Set("latitude", "-45")
	q.Set("longitude", "45")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly")
uri.query = URI.encode_www_form({
  "latitude" => "-45",
  "longitude" => "45"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/amentum.space/gravity/1.1.1/egm2008/gravity_anomaly?" . http_build_query([
    "latitude" => "-45",
    "longitude" => "45"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with Gravity API?

Gravity API is a Location API. Developers commonly use location APIs for:

  • tracking assets and vehicles in real time
  • building delivery and logistics apps
  • finding nearby businesses or services
  • geo-fencing and location-based notifications
  • address validation and autocomplete

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Gravity API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗