# Resolve radio context from edge location

Private, no-store context. Precise location is never included in the result. POST accepts at most 512 UTF-8 bytes. Provider failures produce unknown weather/holiday values. No automatic retries.

Operation: getRadioContext
GET /api/radio/context

Access: anonymous. Automatic retries: none. Redirects: manual. Request body limit: 0 bytes.
Default timeout: 30 seconds. Response limit: 16 MiB. Pagination is opt-in and bounded; an exhausted bound reports incomplete execution.

[HTML reference](/developers/api/getRadioContext) · [Authoritative schemas](/api/openapi.json)

## Wire contract

```json
{
  "operationId": "getRadioContext",
  "summary": "Resolve radio context from edge location",
  "description": "Private, no-store context. Precise location is never included in the result. POST accepts at most 512 UTF-8 bytes. Provider failures produce unknown weather/holiday values. No automatic retries.",
  "tags": [
    "radio"
  ],
  "responses": {
    "200": {
      "description": "Local clock, season, weather and holiday context",
      "headers": {
        "Cache-Control": {
          "schema": {
            "const": "private, no-store"
          }
        },
        "Vary": {
          "schema": {
            "const": "CF-IPCountry"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "locationLabel": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              },
              "localDate": {
                "type": "string"
              },
              "localTime": {
                "type": "string"
              },
              "timeOfDay": {
                "type": "string",
                "enum": [
                  "dawn",
                  "morning",
                  "afternoon",
                  "evening",
                  "night"
                ]
              },
              "season": {
                "type": "string",
                "enum": [
                  "spring",
                  "summer",
                  "autumn",
                  "winter",
                  "unknown"
                ]
              },
              "daylight": {
                "type": "string",
                "enum": [
                  "day",
                  "night",
                  "unknown"
                ]
              },
              "weekday": {
                "type": "string"
              },
              "isWeekday": {
                "type": "boolean"
              },
              "holiday": {
                "type": "object",
                "properties": {
                  "isHoliday": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "isHoliday",
                  "name"
                ],
                "additionalProperties": false
              },
              "weather": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "clear",
                      "cloudy",
                      "fog",
                      "drizzle",
                      "rain",
                      "snow",
                      "storm",
                      "unknown"
                    ]
                  },
                  "description": {
                    "type": "string"
                  },
                  "temperatureC": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "apparentTemperatureC": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "isDay": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "description",
                  "temperatureC",
                  "apparentTemperatureC",
                  "isDay"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "locationLabel",
              "timezone",
              "localDate",
              "localTime",
              "timeOfDay",
              "weekday",
              "isWeekday",
              "holiday",
              "weather"
            ],
            "additionalProperties": false
          }
        }
      }
    }
  }
}
```

## Synthetic examples

### curl

```bash
curl --fail-with-body --max-time 30 --max-filesize 16777216 --request GET 'https://irvinebroque.com/api/radio/context' --header 'Accept: application/json'
```

### TypeScript

```typescript
import { PublicApi } from '@irvinebroque/public-api';
const api = new PublicApi();
const result = await api.radio.context({});
console.log(result.status, result.headers.get('content-type')); // Keep transient capabilities in memory.
```

### CLI

```bash
irvinebroque radio context
```
