Sun Glare Cast
About This Endpoint
This endpoint will show time ranges when the sun is below a specified angle above the horizon for a given location; these are the times drivers traveling east (in the morning) and west (in the evening) may experience a blinding glare from the sun.
Using the Query Builder
With the Query Builder, you can click, drag, and zoom a map to select your location and select the output format you wish to receive from the API URL. You can also select the altitude below which the sun is considered to cause glare (defaults to 20°).
As you move the map, your URL to use will update automatically. Click the Copy button next to the URL to copy it to your clipboard, and paste it into your script to download the results. The generated URL will automatically include your account's API key.
- Tip: To get to your desired location faster, click the locate control below the zoom buttons on the map to automatically select your browser's approximate location. You can then zoom and drag the map to get the marker to the location you want.
Do It Yourself
The /astro/glare
endpoint accepts the following query parameters:
- lat
- (Required) Latitude of the location to get a glare forecast.
- lon
- (Required) Longitude of the location to get a glare forecast.
- date
- (Optional) Timestamp at which to start searching for glare times; defaults to now. Must be a UNIX-style timestamp. Create a UNIX timestamp at this web site.
- altitude
- (Optional) Identify times when the sun is below this angle in degrees above the horizon. Defaults to 20.
- num
- (Optional) Number of days to calculate glare times. Defaults to 5.
- format
- (Optional) Receive results in this format. Defaults to
json
. WSI Max users will need to usecsv
.
- (Optional) Receive results in this format. Defaults to
- apikey
- (Required) Your account's API key.