Getting started¶
Use Rainbow Weather APIs to add precipitation nowcasts, weather map tiles, and hourly or daily forecasts to your app. The Free plan includes 10,000 API calls per month, shared across all three APIs, with no credit card required.
1. Create and verify your account¶
- Sign up with your name, email address, and password.
- Open the confirmation email and follow its verification link.
- Sign in to the developer portal.
2. Activate the Free plan¶
- Open Subscriptions.
- Find Free and select Start free.
- Read the Terms of Service, select the agreement checkbox, and click I agree.
- Wait for your subscription to activate. Your API keys become available after activation.
3. Copy your API key¶
Open API Keys and click Copy next to Primary key for your active subscription.
In your terminal, replace YOUR_API_KEY with the copied value:
export RAINBOW_API_KEY='YOUR_API_KEY'
Keep your API key on the server
We do not recommend putting API keys in frontend code. Browser code and network requests are visible to users, including request headers. Store your key in the server environment and keep it out of public repositories. For a web map, use a backend proxy as shown in the Leaflet and MapLibre examples.
4. Make your first request¶
Fetch the latest precipitation map snapshot using the Ocp-Apim-Subscription-Key header:
curl --include \
--header "Ocp-Apim-Subscription-Key: ${RAINBOW_API_KEY}" \
'https://api.rainbow.ai/tiles/v1/snapshot'
A successful request returns HTTP 200 and a JSON object with an integer snapshot. This is a Unix timestamp in UTC seconds identifying the latest available map snapshot.
Illustrative response body — your timestamp will differ:
{"snapshot": 1791889800}
Use the timestamp returned by the API when requesting tiles. Snapshot requests do not consume your monthly allowance.
Authentication options¶
For terminal or server-side requests, prefer the header shown above to keep the key out of the request URL. If your server-side client requires query parameters, the same endpoint also accepts token:
curl --include \
"https://api.rainbow.ai/tiles/v1/snapshot?token=${RAINBOW_API_KEY}"
Either method is sufficient; you do not need to send both.
Troubleshooting¶
| What you see | What to check |
|---|---|
| No API key yet or activation is still pending | Confirm that you selected a subscription and accepted its terms. Wait for activation, then refresh API Keys if necessary. |
| 401 Unauthorized | The key is missing or invalid. Copy it again from your active subscription and check the header name or token parameter. |
| 404 Not Found on your first request | Check the complete URL: https://api.rainbow.ai/tiles/v1/snapshot. Other APIs may return 404 for different reasons; for example, Nowcast can return it when data is unavailable for a location. |
429 with quota_exceeded on other API requests |
Your monthly allowance has been used. Check Usage in the portal, wait until the reset indicated in the response, or upgrade in Subscriptions. The snapshot endpoint above is excluded from the monthly quota. |