> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goes.health/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Environmental

> Returns a list of environmental health risks based on location and selected IDs.

This endpoint allows you to check for various outdoor health risks based on a specific location. You can check for all environmental risks or specify particular ones.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key for authentication. Format: `Bearer YOUR_API_KEY`
</ParamField>

### Query Parameters

<ParamField query="location" type="string" required>
  The latitude and longitude for the location to check, formatted as `{latitude},{longitude}`.
</ParamField>

<ParamField query="ids" type="string">
  A comma-separated list of risk IDs to check. If you do not provide this, all risks will be checked.
  The available `ids` are:

  * `sunburn`
  * `high-altitude`
  * `heat-illness`
  * `breathing-problems`
  * `frostbite`
  * `hypothermia`
  * `lightning`
</ParamField>

## Response

The response is a JSON object containing a `risks` array. Each object in the array represents a specific risk and includes an `id`, a `title`, a `score`, and a list of `tips`.

<ResponseField name="responseId" type="string">
  A unique identifier for this response. Use this ID if submitting feedback about the response.
</ResponseField>

<ResponseField name="risks" type="array">
  An array of risk objects.

  <Expandable title="child attributes">
    <ResponseField name="id" type="string">
      The unique identifier for the risk. Example: `heat-illness`.
    </ResponseField>

    <ResponseField name="title" type="string">
      The human-readable title of the risk. Example: `Heat Illness`.
    </ResponseField>

    <ResponseField name="status" type="enum">
      The status of this risk assessment:

      * `applicable`: Risk is present and relevant for this location
      * `not_applicable`: Risk is not present or relevant for this location
      * `unavailable`: Risk data is unavailable for this location
      * `error`: An error occurred while assessing this risk
    </ResponseField>

    <ResponseField name="score" type="number">
      A number from 0-3 representing the risk level:

      * 0: None
      * 1: Low
      * 2: Medium
      * 3: High
    </ResponseField>

    <ResponseField name="tips" type="array">
      A collection of 1-2 sentence strings with tips and recommendations.
    </ResponseField>

    <ResponseField name="summary" type="string">
      A 1-2 sentence summary of the tips and key information.
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message describing what went wrong. Only present when status is `error`.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

### Request

```bash theme={null}
curl "http://api.goes.health/v1/risks/environmental?ids=sunburn,heat-illness,frostbite&location=34.0522,-118.2437" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "responseId": "123e4567-e89b-12d3-a456-426614174000",
  "risks": [
    {
      "id": "sunburn",
      "title": "Sunburn",
      "status": "applicable",
      "score": 2,
      "summary": "...",
      "tips": [
        "..."
      ]
    },
    {
      "id": "heat-illness",
      "title": "Heat Illness",
      "status": "applicable",
      "score": 3,
      "summary": "...",
      "tips": [
        "..."
      ]
    },
    {
      "id": "frostbite",
      "title": "Frostbite",
      "status": "not_applicable",
      "score": 0,
      "summary": "...",
      "tips": [
        "..."
      ]
    }
  ]
}
```


## OpenAPI

````yaml GET /v1/risks/environmental
openapi: 3.1.0
info:
  title: GOES Health API
  description: API for accessing outdoor health risk data.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.goes.health
security: []
paths:
  /v1/risks/environmental:
    get:
      description: >-
        Returns a list of environmental health risks based on location and
        selected IDs.
      parameters:
        - name: location
          in: query
          description: The latitude and longitude, formatted as `{latitude},{longitude}`.
          required: true
          schema:
            type: string
        - name: ids
          in: query
          description: A comma-separated list of environmental risk IDs.
          required: false
          schema:
            type: string
        - name: exclude_risk_fields
          in: query
          description: >-
            Comma-separated list of sections to exclude from the response.
            Options: `tips`, `summary`, `score`
          required: false
          schema:
            type: string
          example: tips,summary
      responses:
        '200':
          description: A list of environmental risks.
          content:
            application/json:
              schema:
                type: object
                properties:
                  responseId:
                    type: string
                    format: uuid
                    description: A unique identifier for this response
                  risks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Risk'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    Risk:
      type: object
      required:
        - id
        - title
        - status
      properties:
        id:
          type: string
          description: The unique identifier for the risk
          example: sunburn
        title:
          type: string
          description: The human-readable title of the risk
          example: Sunburn
        status:
          type: string
          enum:
            - applicable
            - not_applicable
            - unavailable
            - error
          description: The status of this risk assessment
        score:
          type: integer
          minimum: 0
          maximum: 3
          description: >-
            A number from 0-3 representing the risk level (0: None, 1: Low, 2:
            Medium, 3: High).
          example: 2
        summary:
          type: string
          description: A 1-2 sentence summary of the tips and key information.
          example: <string>
        tips:
          type: array
          items:
            type: string
          description: A list of safety tips.
        error:
          type: string
          description: >-
            Error message describing what went wrong. Only present when status
            is 'error'.
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Enter your API key

````