API Freaks logoAPI Freaks logo
CTRL+K

    APIs

  • Pricing
  • Resources
  • Tools

  • Contact us
CTRL+K
Sign InGet Started For Free
  • Credits Usage APIGET
  • IP Geolocation LookupGET
  • Bulk IP Geolocation LookupPOST
  • Domain WHOIS LookupGET
  • IP WHOIS LookupGET
  • ASN LookupGET
  • Domain WHOIS Historical LookupGET
  • Domain WHOIS Reverse LookupGET
  • Bulk Domain WHOIS LookupPOST
  • DNS LookupGET
  • Historical DNS LookupGET
  • Reverse DNS LookupGET
  • Bulk DNS LookupPOST
  • SSL Certificate LookupGET
  • SSL Certificate Chain LookupGET
  • Domain AvailabilityGET
  • Domain Availability with SuggestionsGET
  • Bulk Domain AvailabilityPOST
  • Website ScreenshotGET
  • Bulk ScreenshotPOST
  • Latest Exchange RatesGET
  • Historical Exchange RatesGET
  • Currency Converter LatestGET
  • Currency Converter HistoricalGET
  • Currency Time SeriesGET
  • Currency FluctuationGET
  • Geolocalized Currency ConverterGET
  • Currency SupportedGET
  • Currency SymbolsGET
  • Currency Historical Data LimitsGET
  • Live Commodity PricesGET
  • Historical Commodity PricesGET
  • Commodity FluctuationGET
  • Commodity Time SeriesGET
  • Commodity SymbolsGET
  • Timezone LookupGET
  • Timezone ConverterGET
  • GeoDB CountriesGET
  • GeoDB Country DetailsGET
  • GeoDB RegionsGET
  • GeoDB SubregionsGET
  • GeoDB Admin LevelsGET
  • GeoDB Admin UnitsGET
  • GeoDB Admin Units DetailsGET
  • GeoDB CitiesGET
  • Zip Code LookupGET
  • ZIP Code Search CityGET
  • ZIP Code Search RegionGET
  • ZIP Code Search RadiusGET
  • ZIP Code DistanceGET
  • ZIP Code Distance MatchGET
  • User Agent ParserGET
  • Bulk User Agent ParserPOST
  • Astronomy APIGET

Ready to get started?

Sign Up for Free

APIFreaks

API Catalog

  • Geolocation APIs
  • WHOIS APIs
  • DNS APIs
  • SSL APIs
  • Domain Availability APIs
  • Screenshot APIs
  • Currency APIs
  • Commodity APIs
  • Timezone APIs
  • Zipcode APIs
  • User Agent APIs
  • Other APIs

Tools Catalog

  • Code Formatters
  • Data & Query Tools
  • Text Tools
  • Email Utilities
  • Viewers

Docs

  • APIs
  • Swagger Docs

Pricing & Accounts

  • Pricing
  • Sign up
  • Sign In

Company

  • About Us
  • Resources
  • Terms
  • Privacy

Copyright © 2024

Made in Pakistan

Astronomy API

GET

https://api.apifreaks.com/v1.0/geolocation/astronomy

format
Format of the Response
locationString
Extract astronomy information using location (preferably city)
latFloat
Latitude to extract astronomy information using location coordinates
longFloat
Longitude to extract astronomy information using location coordinates
ipString
IPv4 or IPv6 address to extract astronomy information using IP address
langString
response language of "location" field in case of lookup through IP address only.
dateString
Specific date (format YYYY-MM-DD) for which astronomy data is required
elevationFLoat
Elevation above sea level at the location, in meters. The value should be between 0 meter and a maximum value of 10,000 meters. Negative value is set to 0.
time_zoneString
Time zone to receive all time-based data in your preferred local time.
Media Type
JSON
Body

API Keystringrequired
Your private API key. Get it from API Freaks dashboard.

Sample Responses

400
400
400
LANGUAGE
Python
PHP
Java
Node
Ruby
JavaScript
C#
$ pip install requests
RESPONSE

Click Test it to start the request and see the response here!


API Response

FieldTypeRequirementDescription
ipStringOptional
The IP address
locationObjectMandatory
The location information
astronomyObjectMandatory
The astronomy information

The 'astronomy' object includes the following fields:

FieldTypeRequirementDescription
time_zoneStringOptional
The time zone of the location
dateStringMandatory
The current date
current_timeStringMandatory
The current time
mid_nightStringMandatory
The time of midnight (solar-based)
night_endStringMandatory
The time when night ends (start of astronomical twilight)
morning.astronomical_twilight_beginStringMandatory
The start time of astronomical twilight in the morning
morning.astronomical_twilight_endStringMandatory
The end time of astronomical twilight in the morning
morning.nautical_twilight_beginStringMandatory
The start time of nautical twilight in the morning
morning.nautical_twilight_endStringMandatory
The end time of nautical twilight in the morning
morning.civil_twilight_beginStringMandatory
The start time of civil twilight in the morning
morning.civil_twilight_endStringMandatory
The end time of civil twilight in the morning
morning.blue_hour_beginStringMandatory
The beginning of the blue hour in the morning
morning.blue_hour_endStringMandatory
The end of the blue hour in the morning
morning.golden_hour_beginStringMandatory
The beginning of the golden hour in the morning
morning.golden_hour_endStringMandatory
The end of the golden hour in the morning
sunriseStringMandatory
The time of sunrise
sunsetStringMandatory
The time of sunset
evening.golden_hour_beginStringMandatory
The beginning of the golden hour in the evening
evening.golden_hour_endStringMandatory
The end of the golden hour in the evening
evening.blue_hour_beginStringMandatory
The beginning of the blue hour in the evening
evening.blue_hour_endStringMandatory
The end of the blue hour in the evening
evening.civil_twilight_beginStringMandatory
The start of civil twilight in the evening
evening.civil_twilight_endStringMandatory
The end of civil twilight in the evening
evening.nautical_twilight_beginStringMandatory
The start of nautical twilight in the evening
evening.nautical_twilight_endStringMandatory
The end of nautical twilight in the evening
evening.astronomical_twilight_beginStringMandatory
The start of astronomical twilight in the evening
evening.astronomical_twilight_endStringMandatory
The end of astronomical twilight in the evening
night_beginStringMandatory
The time when night begins (end of astronomical twilight)
sun_statusStringMandatory
The current status of the sun (e.g., "rising", "setting", "-")
solar_noonStringMandatory
The time when the sun reaches its highest point in the sky
day_lengthStringMandatory
The total duration of daylight
sun_altitudeFloatMandatory
The altitude angle of the sun above the horizon in degrees
sun_distanceFloatMandatory
The distance from the Earth to the sun in kilometers
sun_azimuthFloatMandatory
The azimuth angle of the sun in degrees from true north
moon_phaseStringMandatory
The current phase of the moon (e.g., "WAXING_GIBBOUS")
moonriseStringMandatory
The time of moonrise
moonsetStringMandatory
The time of moonset
moon_statusStringMandatory
The current status of the moon (e.g., "rising", "setting", "-")
moon_altitudeFloatMandatory
The altitude angle of the moon above the horizon in degrees
moon_distanceFloatMandatory
The distance from the Earth to the moon in kilometers
moon_azimuthFloatMandatory
The azimuth angle of the moon in degrees from true north
moon_parallactic_angleFloatMandatory
The parallactic angle of the moon in degrees
moon_illumination_percentageStringMandatory
The percentage of the moon illuminated by sunlight
moon_angleFloatMandatory
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:

FieldTypeRequirementDescription
latitudeStringMandatory
The latitude of the geographical location
longitudeStringMandatory
The longitude of the geographical location
country_nameStringMandatory
The country of the geographical location
state_provStringMandatory
The state or province of the geographical location
cityStringMandatory
The city of the geographical location
localityStringMandatory
The locality or neighborhood of the geographical location
elevationStringMandatory
The elevation of the geographical location

When a lookup is performed using the 'location' parameter, the 'location' object includes the following fields:

FieldTypeRequirementDescription
location_stringStringMandatory
The complete geographical location, including country, state, city, and locality
country_nameStringMandatory
The country of the geographical location
state_provStringMandatory
The state or province of the geographical location
cityStringMandatory
The city of the geographical location
localityStringMandatory
The locality or neighborhood of the geographical location
latitudeStringMandatory
The latitude of the geographical location
longitudeStringMandatory
The longitude of the geographical location
elevationStringMandatory
The elevation of the geographical location

When a lookup is performed using the 'ip' parameter, the 'location' object includes the following fields:

FieldTypeRequirementDescription
continent_codeStringMandatory
The code for the continent
continent_nameStringMandatory
The name of the continent
country_code2StringMandatory
The 2-letter country code (ISO 3166-1 alpha-2)
country_code3StringMandatory
The 3-letter country code (ISO 3166-1 alpha-3)
country_nameStringMandatory
The common name of the country
country_name_officialStringMandatory
The official name of the country
is_euBooleanMandatory
Whether the country is part of the European Union
state_provStringMandatory
The state or province of the geographical location
state_codeStringMandatory
The code for the state or province
districtStringMandatory
The district of the geographical location
cityStringMandatory
The city of the geographical location
zipcodeStringMandatory
The postal code of the geographical location
latitudeStringMandatory
The latitude of the geographical location
longitudeStringMandatory
The longitude of the geographical location
localityStringMandatory
The locality or neighborhood of the geographical location
elevationStringMandatory
The elevation of the geographical location