Find an API

Search public APIs with auth details & Postman guides

← All APIs

Geomag API

amentum · Location

Location No Auth Free & Open location

The World Magnetic Model calculates the intensity and direction of the Earth's magnetic field on a specific date-time, geodetic altitude, latitude, and longitude. It is relied upon throughout the world for navigation, mineral exploration, atmospheric and space science, and is installed on billions of devices. A comprehensive description of the World Magnetic Model, including its limitations, can be found here . We provide a

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Calculate magnetic declination, inclination, total field intensity, and grid variation

at specified conditions.

https://api.apis.guru/v2/specs/amentum.space/global-magnet/1.3.0/magnetic_field?year=2020.5&altitude=10&latitude=80&longitude=100

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/amentum.space/global-magnet/1.3.0/magnetic_field?year=2020.5&altitude=10&latitude=80&longitude=100"
import requests
params = {
    "year": "2020.5",
    "altitude": "10",
    "latitude": "80",
    "longitude": "100"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/amentum.space/global-magnet/1.3.0/magnetic_field",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/amentum.space/global-magnet/1.3.0/magnetic_field');
url.searchParams.set('year', '2020.5');
url.searchParams.set('altitude', '10');
url.searchParams.set('latitude', '80');
url.searchParams.set('longitude', '100');

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/global-magnet/1.3.0/magnetic_field")
	q := baseURL.Query()
	q.Set("year", "2020.5")
	q.Set("altitude", "10")
	q.Set("latitude", "80")
	q.Set("longitude", "100")
	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/global-magnet/1.3.0/magnetic_field")
uri.query = URI.encode_www_form({
  "year" => "2020.5",
  "altitude" => "10",
  "latitude" => "80",
  "longitude" => "100"
})

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/global-magnet/1.3.0/magnetic_field?" . http_build_query([
    "year" => "2020.5",
    "altitude" => "10",
    "latitude" => "80",
    "longitude" => "100"
]);
$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 Geomag API?

Geomag 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. Geomag 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 ↗