curl --request GET \
--url https://api.goes.health/v1/risks/environmental/forecast \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goes.health/v1/risks/environmental/forecast"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goes.health/v1/risks/environmental/forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goes.health/v1/risks/environmental/forecast",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goes.health/v1/risks/environmental/forecast"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goes.health/v1/risks/environmental/forecast")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goes.health/v1/risks/environmental/forecast")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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>"
}
]
}
]
}{
"error": 123,
"message": "<string>"
}Get Environmental Forecast
Precision hourly and extended daily forecast of environmental risks for a location.
curl --request GET \
--url https://api.goes.health/v1/risks/environmental/forecast \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goes.health/v1/risks/environmental/forecast"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goes.health/v1/risks/environmental/forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goes.health/v1/risks/environmental/forecast",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goes.health/v1/risks/environmental/forecast"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goes.health/v1/risks/environmental/forecast")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goes.health/v1/risks/environmental/forecast")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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>"
}
]
}
]
}{
"error": 123,
"message": "<string>"
}Request
Headers
Bearer YOUR_API_KEYQuery Parameters
{latitude},{longitude}.Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
applicable: Risk is present and relevant for this locationnot_applicable: Risk is not present or relevant for this locationunavailable: Risk data is unavailable for this locationerror: An error occurred while assessing this risk
- 0: None
- 1: Low
- 2: Medium
- 3: High
error.Show child attributes
Show child attributes
Show child attributes
Show child attributes
applicable: Risk is present and relevant for this locationnot_applicable: Risk is not present or relevant for this locationunavailable: Risk data is unavailable for this locationerror: An error occurred while assessing this risk
- 0: None
- 1: Low
- 2: Medium
- 3: High
error.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
Enter your API key
Query Parameters
The latitude and longitude, formatted as {latitude},{longitude}.
A comma-separated list of environmental risk IDs to include in the forecast.
Comma-separated list of forecast types to exclude from the response. Options: hourly, daily
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.
A unique identifier for this response
48 hourly entries, each containing the set of environmental risks for that hour.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes

