Lunar and solar eclipses

As the instant of an object’s rising or setting is linked to the Earth’s rotation and the calendar, the correct time scale and calendar must be selected, depending on the requested date. The default behavior of the API is to use the UTC timescale and the Gregorian calendar.

Lunar eclipse on July 5th, 2020

The following example retrieves the lunar eclipse on July 5th, 2020.

Using the wget command

Execute this command to retrieve the result encoded in the JSON format (Result of this command ).

wget  https://opale.imcce.fr/api/v1/phenomena/eclipses/301/2020-07-05

Execute this command to retrieve the visibility map of the eclipse as a picture (Result of this command ).

wget  https://opale.imcce.fr/api/v1/phenomena/eclipses/301/2020-07-05?format=image

 

Using a python script

Execute this script to retrieve the result encoded in the JSON format.

import json
import requests

apicall = "https://opale.imcce.fr/api/v1/phenomena/eclipses/301/2020-07-05"
response = requests.get( apicall )
print(response.json())

Solar eclipse on May 17th, -100

The following example retrieves the solar eclipse of the julian year -100 (same as 101 before era).

Using the wget command

Execute this command to retrieve the result encoded in the JSON format (Result of this command ).

wget  https://opale.imcce.fr/api/v1/phenomena/eclipses/10/julian,-0100-05-17

Execute this command to retrieve the visibility map of the eclipse as a picture (Result of this command ).

wget  https://opale.imcce.fr/api/v1/phenomena/eclipses/10/julian,-0100-05-17?format=image

 

Using a python script

Execute this script to retrieve the result encoded in the JSON format.

import json
import requests

apicall = "https://opale.imcce.fr/api/v1/phenomena/eclipses/10/julian,-0100-05-17"
response = requests.get( apicall )
print(response.json())