RealComposer

OpenWeather Safe & Unsafe Practices

Direct Answer

OpenWeather appid keys are server-only because anyone holding one can consume your call quota. Weather data updates on a schedule of minutes, so proxy requests through a server or edge cache keyed by location instead of calling from every client.

Credentials & Where They Belong

Server only
API key (appid)

Counts calls against your plan limits.

Safe Practices

  • Cache by rounded coordinates

    Round latitude and longitude so nearby users share cache entries.

  • Slim responses to displayed fields

    Return temperature, condition, and icon instead of the full forecast payload.

Unsafe Practices

  • Calling OpenWeather from every app instance

    Popular apps exceed free and paid limits quickly and expose the key.

The RealComposer Pattern

Store OPENWEATHER_KEY in the vault and enable a 10 minute edge cache TTL on the pipeline so thousands of users share each upstream call.

START BUILDING FREE

Frequently Asked Questions

Q:How long should I cache OpenWeather responses?

Around 10 minutes works for current conditions since upstream data does not refresh more often.

OpenWeather Recipes

Edge Caching & Rate Limits

Cache a Weather API for a Wix Velo Site

Calling OpenWeather from Wix page code exposes the appid key and spends one call per visitor. A RealComposer pipeline keeps the key in the vault, caches results by location for ten minutes, and returns only temperature, condition, and icon for your Wix weather widget.

Sub-10ms edgeView Recipe

Merge contentful with openweather for location pages

Contentful page body and OpenWeather current conditions in parallel. For "merge contentful with openweather for location pages", store CONTENTFUL_ACCESS_TOKEN, OPENWEATHER_API_KEY in Secret Vault, call https://cdn.contentful.com/spaces/{{query.spaceId}}/entries from a Worker, and let Static HTML / Jamstack hit only https://realcomposer.com/v1/workspace/merge-contentful-with-openweather-pages with an rc_live_ client token.

Sub-10ms edgeView Recipe

Related Concepts