# fyi.wed.getForecast

> Published by [wed.fyi](https://lexicon.garden/identity/did:plc:jw2rjf3xwlxrrcg4i7rfozgc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:jw2rjf3xwlxrrcg4i7rfozgc/fyi.wed.getForecast)
- [Documentation](https://lexicon.garden/lexicon/did:plc:jw2rjf3xwlxrrcg4i7rfozgc/fyi.wed.getForecast/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:jw2rjf3xwlxrrcg4i7rfozgc/fyi.wed.getForecast/examples)

## Definitions

### `fyi.wed.getForecast`

**Type**: `query`

Fetches a weather forecast for an event identified by an AT URI record. Accepts format=svg or format=png to return an SVG or PNG meteogram instead of JSON.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes | The AT URI of the event record (fyi.wed.event or community.lexicon.calendar.event). |
| `units` | `string` | No | Units for the forecast: 'metric' (default) or 'imperial'. |
| `format` | `string` | No | Output format: 'json' (default), 'svg', or 'png' (as base64). |

#### Output

**Encoding**: `application/json`

## Raw Schema

```json
{
  "id": "fyi.wed.getForecast",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "encoding": "application/json",
        "description": "Weather forecast JSON when format is omitted or 'json', an SVG meteogram when format is 'svg', or a base64-encoded PNG data URI when format is 'png'."
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "maxLength": 2048,
            "description": "The AT URI of the event record (fyi.wed.event or community.lexicon.calendar.event)."
          },
          "units": {
            "enum": [
              "metric",
              "imperial"
            ],
            "type": "string",
            "maxLength": 16,
            "description": "Units for the forecast: 'metric' (default) or 'imperial'."
          },
          "format": {
            "enum": [
              "json",
              "svg",
              "png"
            ],
            "type": "string",
            "maxLength": 16,
            "description": "Output format: 'json' (default), 'svg', or 'png' (as base64)."
          }
        }
      },
      "description": "Fetches a weather forecast for an event identified by an AT URI record. Accepts format=svg or format=png to return an SVG or PNG meteogram instead of JSON."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
