Skip to main content
GET
/
v1
/
risks
/
environmental
/
forecast
cURL
curl --request GET \
  --url https://api.goes.health/v1/risks/environmental/forecast \
  --header 'Authorization: Bearer <token>'
{
  "responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "hourly": [
    {
      "time": "2023-11-07T05:31:56Z",
      "risks": [
        {
          "id": "sunburn",
          "title": "Sunburn",
          "status": "applicable",
          "score": 2,
          "summary": "<string>",
          "tips": [
            "<string>"
          ],
          "error": "<string>"
        }
      ]
    }
  ],
  "daily": [
    {
      "time": "2023-11-07T05:31:56Z",
      "risks": [
        {
          "id": "sunburn",
          "title": "Sunburn",
          "status": "applicable",
          "score": 2,
          "summary": "<string>",
          "tips": [
            "<string>"
          ],
          "error": "<string>"
        }
      ]
    }
  ]
}
Get 48-hour hourly and 8-day daily forecasts of environmental risks for a location.

Request

Headers

Authorization
string
required
Your API key for authentication. Format: Bearer YOUR_API_KEY

Query Parameters

location
string
required
The latitude and longitude for the location to check, formatted as {latitude},{longitude}.

Response

responseId
string
A unique identifier for this response. Use this ID if submitting feedback about the forecast.
hourly
array
48 hourly entries, each containing the set of environmental risks for that hour.
daily
array
32 daily entries over 8 days. 4 timestamps per day: morning (06:00), noon (12:00), evening (18:00), midnight (00:00), each containing the set of environmental risks.

Example

curl "http://api.goes.health/v1/risks/environmental/forecast?location=34.0522,-118.2437" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "responseId": "123e4567-e89b-12d3-a456-426614174000",
  "hourly": [
    {
      "time": "2024-06-27T00:00:00Z",
      "risks": [
        {
          "id": "sunburn",
          "title": "Sunburn",
          "status": "applicable",
          "score": 2,
          "summary": "...",
          "tips": [
            "..."
          ]
        }
      ]
    }
  ],
  "daily": [
    {
      "time": "2024-06-27T06:00:00Z",
      "risks": [
        {
          "id": "sunburn",
          "title": "Sunburn",
          "status": "applicable",
          "score": 2,
          "summary": "...",
          "tips": [
            "..."
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Enter your API key

Query Parameters

location
string
required

The latitude and longitude, formatted as {latitude},{longitude}.

ids
string

A comma-separated list of environmental risk IDs to include in the forecast.

exclude
string

Comma-separated list of forecast types to exclude from the response. Options: hourly, daily

exclude_risk_fields
string

Comma-separated list of sections to exclude from the response. Options: tips, summary, score

Response

A forecast of environmental risks with hourly and/or daily data.

responseId
string<uuid>
required

A unique identifier for this response

hourly
object[]

48 hourly entries, each containing the set of environmental risks for that hour.

daily
object[]

32 daily entries over 8 days. 4 timestamps per day: morning (06:00), noon (12:00), evening (18:00), midnight (00:00), each containing the set of environmental risks.