Loading
https://api.apifreaks.com/v1.0/geolocation/astronomy
$ pip install requests
Click Test it to start the request and see the response here!
| Field | Type | Requirement | Description |
|---|---|---|---|
| ip | String | Optional | The IP address |
| location | Object | Mandatory | The location information |
| astronomy | Object | Mandatory | The astronomy information |
The 'astronomy' object includes the following fields:
| Field | Type | Requirement | Description |
|---|---|---|---|
| time_zone | String | Optional | The time zone of the location |
| date | String | Mandatory | The current date |
| current_time | String | Mandatory | The current time |
| mid_night | String | Mandatory | The time of midnight (solar-based) |
| night_end | String | Mandatory | The time when night ends (start of astronomical twilight) |
| morning.astronomical_twilight_begin | String | Mandatory | The start time of astronomical twilight in the morning |
| morning.astronomical_twilight_end | String | Mandatory | The end time of astronomical twilight in the morning |
| morning.nautical_twilight_begin | String | Mandatory | The start time of nautical twilight in the morning |
| morning.nautical_twilight_end | String | Mandatory | The end time of nautical twilight in the morning |
| morning.civil_twilight_begin | String | Mandatory | The start time of civil twilight in the morning |
| morning.civil_twilight_end | String | Mandatory | The end time of civil twilight in the morning |
| morning.blue_hour_begin | String | Mandatory | The beginning of the blue hour in the morning |
| morning.blue_hour_end | String | Mandatory | The end of the blue hour in the morning |
| morning.golden_hour_begin | String | Mandatory | The beginning of the golden hour in the morning |
| morning.golden_hour_end | String | Mandatory | The end of the golden hour in the morning |
| sunrise | String | Mandatory | The time of sunrise |
| sunset | String | Mandatory | The time of sunset |
| evening.golden_hour_begin | String | Mandatory | The beginning of the golden hour in the evening |
| evening.golden_hour_end | String | Mandatory | The end of the golden hour in the evening |
| evening.blue_hour_begin | String | Mandatory | The beginning of the blue hour in the evening |
| evening.blue_hour_end | String | Mandatory | The end of the blue hour in the evening |
| evening.civil_twilight_begin | String | Mandatory | The start of civil twilight in the evening |
| evening.civil_twilight_end | String | Mandatory | The end of civil twilight in the evening |
| evening.nautical_twilight_begin | String | Mandatory | The start of nautical twilight in the evening |
| evening.nautical_twilight_end | String | Mandatory | The end of nautical twilight in the evening |
| evening.astronomical_twilight_begin | String | Mandatory | The start of astronomical twilight in the evening |
| evening.astronomical_twilight_end | String | Mandatory | The end of astronomical twilight in the evening |
| night_begin | String | Mandatory | The time when night begins (end of astronomical twilight) |
| sun_status | String | Mandatory | The current status of the sun (e.g., "rising", "setting", "-") |
| solar_noon | String | Mandatory | The time when the sun reaches its highest point in the sky |
| day_length | String | Mandatory | The total duration of daylight |
| sun_altitude | Float | Mandatory | The altitude angle of the sun above the horizon in degrees |
| sun_distance | Float | Mandatory | The distance from the Earth to the sun in kilometers |
| sun_azimuth | Float | Mandatory | The azimuth angle of the sun in degrees from true north |
| moon_phase | String | Mandatory | The current phase of the moon (e.g., "WAXING_GIBBOUS") |
| moonrise | String | Mandatory | The time of moonrise |
| moonset | String | Mandatory | The time of moonset |
| moon_status | String | Mandatory | The current status of the moon (e.g., "rising", "setting", "-") |
| moon_altitude | Float | Mandatory | The altitude angle of the moon above the horizon in degrees |
| moon_distance | Float | Mandatory | The distance from the Earth to the moon in kilometers |
| moon_azimuth | Float | Mandatory | The azimuth angle of the moon in degrees from true north |
| moon_parallactic_angle | Float | Mandatory | The parallactic angle of the moon in degrees |
| moon_illumination_percentage | String | Mandatory | The percentage of the moon illuminated by sunlight |
| moon_angle | Float | Mandatory | The geometric angle of the moon relative to the observer |
When a lookup is performed using Geo coordinates, the 'location' object includes the following fields:
| Field | Type | Requirement | Description |
|---|---|---|---|
| latitude | String | Mandatory | The latitude of the geographical location |
| longitude | String | Mandatory | The longitude of the geographical location |
| country_name | String | Mandatory | The country of the geographical location |
| state_prov | String | Mandatory | The state or province of the geographical location |
| city | String | Mandatory | The city of the geographical location |
| locality | String | Mandatory | The locality or neighborhood of the geographical location |
| elevation | String | Mandatory | The elevation of the geographical location |
When a lookup is performed using the 'location' parameter, the 'location' object includes the following fields:
| Field | Type | Requirement | Description |
|---|---|---|---|
| location_string | String | Mandatory | The complete geographical location, including country, state, city, and locality |
| country_name | String | Mandatory | The country of the geographical location |
| state_prov | String | Mandatory | The state or province of the geographical location |
| city | String | Mandatory | The city of the geographical location |
| locality | String | Mandatory | The locality or neighborhood of the geographical location |
| latitude | String | Mandatory | The latitude of the geographical location |
| longitude | String | Mandatory | The longitude of the geographical location |
| elevation | String | Mandatory | The elevation of the geographical location |
When a lookup is performed using the 'ip' parameter, the 'location' object includes the following fields:
| Field | Type | Requirement | Description |
|---|---|---|---|
| continent_code | String | Mandatory | The code for the continent |
| continent_name | String | Mandatory | The name of the continent |
| country_code2 | String | Mandatory | The 2-letter country code (ISO 3166-1 alpha-2) |
| country_code3 | String | Mandatory | The 3-letter country code (ISO 3166-1 alpha-3) |
| country_name | String | Mandatory | The common name of the country |
| country_name_official | String | Mandatory | The official name of the country |
| is_eu | Boolean | Mandatory | Whether the country is part of the European Union |
| state_prov | String | Mandatory | The state or province of the geographical location |
| state_code | String | Mandatory | The code for the state or province |
| district | String | Mandatory | The district of the geographical location |
| city | String | Mandatory | The city of the geographical location |
| zipcode | String | Mandatory | The postal code of the geographical location |
| latitude | String | Mandatory | The latitude of the geographical location |
| longitude | String | Mandatory | The longitude of the geographical location |
| locality | String | Mandatory | The locality or neighborhood of the geographical location |
| elevation | String | Mandatory | The elevation of the geographical location |