Moon API Parameters

Below is an overview of all parameters related to the moon:

Moon Age | Moon Light | Moon Phase | Moon Visible Area | Moonrise and Moonset

Every parameter is now explained in more detail:

Moon Age

Age of the moon given in days since new moon.

moon_age:d

Example:

Moon Light

Gives the moon light in percent with respect to the moon phase and the cloud cover.

moon_light:p
Examples:

Moon Phase

The phase of the moon, which repeats itself every 29.5 days. The range of the index is between -1 and 1, where negative indices correspond to waning moon phases and positive ones to waxing phases:

Index−0.500.51
PhaseWaning gibbousLast QuarterWaning crescentNew MoonWaxing crescentFirst QuarterWaxing gibbousFull Moon
moon_phase:idx

Examples:

  • The moon phase over a period of 60 days

    https://api.meteomatics.com/2024-03-15T00:00:00ZP60D:P1D/moon_phase:idx/50,10/html

    Moon phase

  • The corresponding json-file with a period of 15 days

    https://api.meteomatics.com/2024-03-15T00:00:00ZP15D:P1D/moon_phase:idx/50,10/json

    {"version":"3.0","user":"api-test","dateGenerated":"2018-02-14T12:12:06Z","status":"OK","data":
    [{"parameter":"moon_phase:idx","coordinates":[{"lat":50,"lon":10,"dates":
    [{"date":"2017-07-01T00:00:00Z","value":0.5},{"date":"2017-07-02T00:00:00Z","value":0.563},
    {"date":"2017-07-03T00:00:00Z","value":0.625},{"date":"2017-07-04T00:00:00Z","value":0.688},
    {"date":"2017-07-05T00:00:00Z","value":0.75},{"date":"2017-07-06T00:00:00Z","value":0.813},
    {"date":"2017-07-07T00:00:00Z","value":0.875},{"date":"2017-07-08T00:00:00Z","value":0.938},
    {"date":"2017-07-09T00:00:00Z","value":1},{"date":"2017-07-10T00:00:00Z","value":-0.938},
    {"date":"2017-07-11T00:00:00Z","value":-0.875},{"date":"2017-07-12T00:00:00Z","value":-0.813},
    {"date":"2017-07-13T00:00:00Z","value":-0.75},{"date":"2017-07-14T00:00:00Z","value":-0.688},
    {"date":"2017-07-15T00:00:00Z","value":-0.625},{"date":"2017-07-16T00:00:00Z","value":-0.531}]}]}]}

Visible Area

The percentage of the moon's visible area which is illuminated.

moon_vis_area:p

Examples:

Moonrise and Moonset

This parameter returns the SQL date and time of moonrise at a given location in UTC.

moonrise:<unit>
moonset:<unit>

Moonrise and moonset times are available in the following units: sql, dn, ux


sql will return a time stamp according to the ISO-86011 format (YYYY-MM-DDThh:mm:ssZ).

dn refers to the date number. The date number represents the whole and fractional number of days from 1-Jan-0000 to a specific date and is equivalent to the serial date number used in Matlab.

ux refers to the Unix timestamp. It gives the total number of elapsed seconds since 00:00:00 UTC on the 1st of January 1970.

Note: Some special cases may occur, which give rise to the following outputs (no date/time outputs):

-666: The moon does not rise or does not set on the specified date

-777: The moon is not visible

-888: The moon is always visible

Example:

  • Moonrise and moonset over a period of one week

    https://api.meteomatics.com/2024-03-15T00:00:00+02:00P7D:P1D/moonrise:sql,moonset:sql/47.423336,9.377225/csv

    validdate;moonrise:sql;moonset:sql
    2017-04-03T22:00:00Z;2017-04-03T09:49:23Z;2017-04-03T00:22:38Z
    2017-04-04T22:00:00Z;2017-04-04T10:49:52Z;2017-04-04T01:17:45Z
    2017-04-05T22:00:00Z;2017-04-05T11:55:07Z;2017-04-05T02:05:29Z
    2017-04-06T22:00:00Z;2017-04-06T13:01:22Z;2017-04-06T02:45:21Z
    2017-04-07T22:00:00Z;2017-04-07T14:08:38Z;2017-04-07T03:20:11Z
    2017-04-08T22:00:00Z;2017-04-08T15:13:52Z;2017-04-08T03:49:52Z
    2017-04-09T22:00:00Z;2017-04-09T16:19:19Z;2017-04-09T04:18:13Z
    2017-04-10T22:00:00Z;2017-04-10T17:22:38Z;2017-04-10T04:44:32Z