# Get Horizon Angles

`GET /data/geographic/horizon_angle`

Returns a circular profile of angles to the horizon for a location at a given latitude, longitude point. The angles are calculated based on the surrounding terrain elevation from a 90m horizontal-resolution digital elevation model.

The angle returned is relative to due north, with negative angles eastwards and positive values westward . Varies from -180 to 180. A value of -90 means east, 0 means north, and 90 means west.

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `latitude` | number (double) | yes | The latitude of the location you request data for. Must be a decimal number between -90 and 90. |
| `longitude` | number (double) | yes | The longitude of the location you request data for. Must be a decimal number between -180 and 180. |
| `azimuth_intervals` | integer (int32) | yes | Number of sections to divide the azimuth circle into, governing how many items are returned in the response. E.g. 10 = [-180°, -144°, -108°, -72°, -36°, 0°, 36°, 72°, 108°, 144°] Maximum 360 |
| `format` | string | no | Response format. Default is HTML if not supplied. |

## Example request

### cURL

```bash
curl -X GET "https://api.solcast.com.au/data/geographic/horizon_angle?latitude=-33.8567&longitude=151.2152&azimuth_intervals=18&format=json" \
  -H "Authorization: Bearer $API_KEY"
```

### Python

```python
import requests

params = {
    "latitude": "-33.8567",
    "longitude": "151.2152",
    "azimuth_intervals": "18",
}

response = requests.get(
    "https://api.solcast.com.au/data/geographic/horizon_angle", params=params,
    headers={"Authorization": "Bearer API_KEY"},
)
data = response.json()
```

## Example response (200)

```json
{
  "horizon_angles": [
    {
      "azimuth": -180,
      "angle": 3.711284
    },
    {
      "azimuth": -160,
      "angle": 1.892235
    },
    {
      "azimuth": -140,
      "angle": 1.117183
    }
  ]
}
```

## Responses

### 200 — OK

Schema: `HorizonAngleResponse`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `horizon_angles` | HorizonAngle[] | no |  |
| `response_status` | string | no |  |

Source: /docs/section/geographic#getDataGeographicHorizonAngle
