CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd"> Thank you - Registration | NCEI
World Magnetic Model (WMM) Banner
Go to the NGA Web Go to the EMM Home Go to the NGDC Home

Thank you for filling out the API registration survey

Using the programmatic interface for Declination
  • The calculator provides an easy way for you to get results in HTML, JSON, XML, or CSV programmatically. To use the programmatic interface, you just have to url-encode the form parameters into a GET request including the result format you want.

    A maximum of 50 connections/second from all the users is allowed at any time. If this is exceeded, the back-end calculator stops taking requests for 10 seconds. Bulk calculations should be requested serially and not in parallel. If the requests start returning with errors then your script should go to sleep for 5-10 minutes before trying the next request.

    EXAMPLE:

    An XML document with the magnetic declination in Boulder today:
    https://www.ngdc.noaa.gov/geomag-web/calculators/calculateDeclination?lat1=40&lon1=-105.25&key=zNEw7&resultFormat=xml

    BASE URL: https://www.ngdc.noaa.gov/geomag-web/calculators/calculateDeclination

    PARAMETERS

    Parameter Required Default Description
    keyyesThe access key is zNEw7. We will send any changes to the API information to your registered email address.
    lat1yesdecimal degrees or degrees minutes seconds: -90.0 to 90.0
    lon1yesdecimal degrees or degrees minutes seconds: -180.0 to 180.0
    modelWMMwhich magnetic reference model to use: 'WMM', 'WMMHR', or 'IGRF'
    For 'EMM' use base url: https://emmcalc.geomag.info with paramater magneticComponent=d
    startYearcurrent yearyear part of calculation date; WMM: 2024-2029, WMMHR 2024-2029, IGRF: 1590-2029
    startMonthcurrent monthmonth part of calculation date: 1 - 12
    startDaycurrent dayday part of calculation date: 1 - 31
    resultFormathtmlformat of calculation results: 'html', 'csv', 'xml', 'json'
Using the programmatic interface for U.S. Historic
  • The calculator programmatically provides results in HTML, XML, or CSV. To use the programmatic interface, url-encode the form parameters into a GET request and specify the desired result format.

    A maximum of 50 connections/second is allowed at any given time. If exceeded, the calculator ceases requests for 10 seconds. Bulk calculations should be requested serially and not in parallel. If the requests start returning with errors then your script should go to sleep for 5-10 minutes before trying the next request.

    EXAMPLE:

    An XML document with U.S. Historic magnetic field values in Boulder for 2000 through 2010:
    https://www.ngdc.noaa.gov/geomag-web/calculators/calculateUshistoric?lat1=40&lon1=-105.25&startYear=2000&endYear=2010&key=yKc9F&resultFormat=xml

    BASE URL: https://www.ngdc.noaa.gov/geomag-web/calculators/calculateUshistoricc

    PARAMETERS:

    Parameter Required Default Description
    keyyesThe access key is yKc9F. We will send any changes to the API information to your registered email address.
    lat1yesdecimal degrees or degrees minutes seconds: 25.0 to 52.0
    lon1yesdecimal degrees or degrees minutes seconds: -130.0 to -65.0
    startYearcurrent yearstart of calculation interval: 1750-2030
    endYearcurrent yearend of calculation interval: 1750-2030
    resultFormathtmlformat of calculation results: 'html', 'csv', or 'xml'
Using the programmatic interface for Magnetic Field
  • The calculator provides an easy way for you to get results in HTML, JSON, XML, or CSV programmatically. To use the programmatic interface, you just have to url-encode the form parameters into a GET request including the result format you want.

    A maximum of 50 connections/second from all the users is allowed at any time. If this is exceeded, the back-end calculator stops taking requests for 10 seconds. Bulk calculations should be requested serially and not in parallel. If the requests start returning with errors then your script should go to sleep for 5-10 minutes before trying the next request.

    EXAMPLE:

    An XML document with magnetic field values in Boulder once a year since today's date in 2010 to the present using the World Magnetic Model
    https://www.ngdc.noaa.gov/geomag-web/calculators/calculateIgrfwmm?lat1=40&lon1=-105.25&model=WMM&startYear=2025&endYear=2029&key=EAU2y&resultFormat=xml

    BASE URL: https://www.ngdc.noaa.gov/geomag-web/calculators/calculateIgrfwmm

    PARAMETERS

    Parameter Required Default Description
    keyyesThe access key is EAU2y. We will send any changes to the API information to your registered email address.
    lat1yesdecimal degrees or degrees minutes seconds: -90.0 to 90.0
    lon1yesdecimal degrees or degrees minutes seconds: -180.0 to 180.0
    elevation0.0elevation of the location: -10 km to 10,000 km
    elevationUnitsKunits of elevation parameter: 'K', 'M', or 'F'
    coordinateSystemM'D' (GPS) or 'M' (Mean Sea Level)
    modelWMMwhich magnetic reference model to use: 'WMM', 'WMMHR', or 'IGRF'
    For 'EMM' use base url: https://emmcalc.geomag.info
    startYearcurrent yearstart year of calculation interval: WMM: 2024-2029, WMMHR: 2024-2029, IGRF: 1590-2029
    startMonthcurrent monthstart month of calculation interval: 1 - 12
    startDaycurrent daystart day of calculation interval: 1 - 31
    endYearcurrent yearend year of calculation interval: WMM: 2024-2029, WMMHR: 2024-2029, IGRF: 1590-2029
    endMonthcurrent monthend month of calculation interval: 1 - 12
    endDaycurrent dayend day of calculation interval: 1 - 31
    dateStepSize1.0size of steps through calculation interval in decimal years: >= .1
    resultFormathtmlformat of calculation results: 'html', 'csv', 'json', or 'xml'
Using the programmatic interface for magnetic field component grid
  • The calculator provides an easy way for you to get results in JSON, XML, or CSV programmatically. To use the programmatic interface, you just have to url-encode the form parameters into a GET request including the result format you want.

    A maximum of 50 connections/second from all the users is allowed at any time. If this is exceeded, the back-end calculator stops taking requests for 10 seconds. Bulk calculations should be requested serially and not in parallel. If the requests start returning with errors then your script should go to sleep for 5-10 minutes before trying the next request.

    EXAMPLE:

    An XML document with a grid of inclination values near Boulder today with data points every tenth of a degree in latitude and longitude:
    https://www.ngdc.noaa.gov/geomag-web/calculators/calculateIgrfgrid?lat1=39.8&lat2=40.3&lon1=-105.5&lon2=-105&latStepSize=0.1&lonStepSize=0.1&magneticComponent=i&key=gFE5W

    BASE URL:https://www.ngdc.noaa.gov/geomag-web/calculators/calculateIgrfgrid

    PARAMETERS

    Parameter Required Default Description
    keyyesThe access key is gFE5W. We will send any changes to the API information to your registered email address.
    lat1yessouthern-most latitude bound in decimal degrees or degrees minutes seconds: -90.0 to 90.0
    lat2yesnorthern-most latitude bound in decimal degrees or degrees minutes seconds: -90.0 to 90.0
    latStepSize1.0size of steps through latitude interval in degrees: >= .1
    lon1yeswestern-most longitude bound in decimal degrees or degrees minutes seconds: -180.0 to 180.0
    lon2yeseastern-most longitude bound in decimal degrees or degrees minutes seconds: -180.0 to 180.0
    lonStepSize1.0size of steps through longitude interval in degrees: >= .1
    elevation0.0elevation of the location: -10 km to 10,000 km
    elevationUnitsKunits of elevation parameter: 'K', 'M', or 'F'
    coordinateSystemM'D' (GPS) or 'M' (Mean Sea Level)
    magneticComponentyesmagnetic component to include in result grid, one of:
    d = Declination
    i = Inclination
    x = North component
    y = East component
    z = Vertical intensity
    h = Horizontal intensity
    f = Total intensity
    modelWMMwhich magnetic reference model to use: 'WMM', 'WMMHR', or 'IGRF'
    startYearcurrent yearstart year of calculation interval: WMM: 2024-2029, WMMHR: 2024-2029, IGRF: 1590-2029
    startMonthcurrent monthstart month of calculation interval: 1 - 12
    startDaycurrent daystart day of calculation interval: 1 - 31
    endYearcurrent yearend year of calculation interval: WMM: 2024-2029, WMMHR: 2024-2029, IGRF: 1590-2029
    endMonthcurrent monthend month of calculation interval: 1 - 12
    endDaycurrent dayend day of calculation interval: 1 - 31
    dateStepSize1.0size of steps through calculation interval in decimal years: >= .1
    resultFormatxmlformat of calculation results: 'xml', 'json', or 'csv'