--- name: skyviewor-data description: Integrate Skyviewor Data weather datasets into applications using their public HTTP and WebSocket contracts. Use for METAR aviation reports, SURF ground observations and batch downloads, or adding support for a documented Skyviewor dataset; not account administration, billing automation or unrelated providers. metadata: version: "2.0.0" reviewed: "2026-11-30" --- # Skyviewor Data integration Build the requested dataset integration in the user's existing stack. These are public overseas customer APIs, not upstream collector interfaces. Select a product before choosing credentials, routes, station identifiers or recovery behavior. ## Select a dataset Read [references/products.json](references/products.json) for the bundled dataset registry and official documentation links. Load only the references relevant to the user's task: - **METAR:** [HTTP](references/metar-http.md), [WebSocket](references/metar-websocket.md), [airport codes](references/airports.json), [troubleshooting](references/metar-troubleshooting.md). Helpers: `scripts/http_query.py` and `scripts/verify_stream.py`. - **SURF:** [HTTP, real-time and batch delivery](references/surf.md), [station identifiers](references/surf-stations.json). Helper: `scripts/surf_probe.py` for a bounded query, verified download or one WebSocket stream. - **Additional datasets:** consult the current [documentation index](https://skyviewor.io/docs/) and its product reference. A dataset absent from this bundle has no bundled contract; do not infer routes, units or quotas from METAR/SURF. Extend the registry with its product reference, supported identifiers and offline fixtures when maintaining this bundle. New datasets are peers, not METAR subsections. ## Shared integration decisions - HTTP origin: `https://data.skyviewor.io`; WebSocket origin: `wss://data.skyviewor.io`. Use a **separate application/API key for each product**. METAR and SURF keys are not interchangeable. `SKYVIEWOR_API_KEY` is the METAR helper's environment variable; `SKYVIEWOR_SURF_API_KEY` is SURF's. Neither is an upstream API key. - Keep long-lived keys in server/local environments, never browser bundles, prompts, logs or committed files. Use the Authorization header. METAR browser clients need a server relay; SURF alone has its documented five-minute token flow. Mint SURF tokens on a trusted backend. Treat short-lived tokens and signed download links as credentials and do not log them. - Paid keys: 2 HTTP requests/second and 3 WebSocket connections per key. New trial keys: one HTTP request every two seconds and 1 WebSocket connection. Existing METAR trial keys may retain earlier quotas; inspect the actual key's entitlement rather than changing its limits. SURF's data/batch sockets share its connection quota: test them sequentially with a trial key. METAR also has a 100-airport union limit; do not apply it to SURF ground station IDs. - Use bounded HTTP, connect, send, heartbeat and close waits. Own one reconnect supervisor and one reader per socket. Close and await the old connection before replacing it. Retry recoverable failures serially with capped backoff/jitter and a cancellation/attempt budget. A quota rejection is not permission to create parallel retry loops. Stop on invalid/inactive access until corrected. - Follow the selected product's application heartbeat protocol. A protocol-level ping is not an application heartbeat. Quiet weather is not proof of failure. Separate successful HTTP, handshake/heartbeat and **actual business delivery** in verification results. - Deduplicate using each dataset's identity: METAR includes corrected raw text; SURF real-time observations use `(station_id, publish_time)` and batches use `(batch_start, revision)`. Do not merge identifiers or overwrite newer versions with older arrivals. Missing values are not zero measurements. - HTTP data and WS updates have different recovery semantics: METAR latest snapshots recover current state, not every missed report; SURF batch queries/downloads recover only the history actually collected and retained for seven days. Never claim complete coverage where there are gaps. ## Implementation and verification 1. Confirm the product, required identifiers, HTTP/live/batch behavior and existing stack. Read its product reference before coding; Python helpers are examples, not a requirement to replace the project. 2. Test authorization routing, parsing, duplicates, corrections/revisions, reconnects, quotas, stale/absent data and recovery races using synthetic fixtures first. Default tests must not call live APIs. 3. Run real requests only with user authorization and privately supplied credentials. Helpers require `--live`; stream checks are bounded to 1800 seconds, download checks to one bounded batch. They do not authorize purchases, account changes, deployment or load tests. 4. Report HTTP success, download integrity, heartbeat success and actual business update success separately. No business event before the deadline is **unverified**, not a pass. Label simulated fixtures and distinguish documented capabilities from verified production behavior. Official references: [METAR API](https://skyviewor.io/docs/metar/) · [SURF API](https://skyviewor.io/docs/surf/) · [AI Skill](https://skyviewor.io/docs/skill/).