# Replace the Dark Sky API with MyRadar's forecast endpoint

MyRadar built its forecast endpoint to stand in for the former Dark Sky forecast request, and its response is shaped like the former Dark Sky API's. Point the request at `GET https://agents.myradar.dev/zcj/b2djhzkgn44j/v1/forecast/{point}` and send `Authorization: Bearer <token>` on every call. Calls draw on a plan you buy once with an agent credential, at $0.02 per 100 requests each.

## At a glance

- **Endpoint:** `GET https://agents.myradar.dev/zcj/b2djhzkgn44j/v1/forecast/{point}`, where `point` is `lat,lon` with no space, such as `45.51,-122.68`
- **Query:** `units` (`us`, `si`, `ca`, `uk2`), `exclude` (comma-separated sections), `extend=hourly`, `lang=en`
- **Response:** `latitude`, `longitude`, `timezone`, `currently`, `minutely`, `hourly`, `daily`, `alerts`, `flags`
- **Price:** $0.02 per 100 requests. Each call is one request.
- **Access:** a bearer credential, which is the agent identity the storefront issues, holding a plan. No upstream API key.
- **Payment:** only the plan purchase is paid. It answers with a 402, the price quote, which you settle over x402 or MPP (USDC wallet rails) or by card.
- **Full purchase flow:** [the buyer skill](https://agents.myradar.dev/zcj/b2djhzkgn44j/SKILL.md)

## Migration checklist

| Part of the request | What to do |
| --- | --- |
| Base URL and path | `https://agents.myradar.dev/zcj/b2djhzkgn44j/v1/forecast/{point}` |
| Authentication | `Authorization: Bearer <access token>` on every call |
| Point | `lat,lon`, comma-separated, no space. Positive is north and east |
| Query | `units` (`us`, `si`, `ca`, `uk2`), `exclude`, `extend=hourly` |
| `lang` | Send `en` or leave it out. `en` is the only value |
| Response sections | Shaped like the former Dark Sky API's: `currently`, `minutely`, `hourly`, `daily`, `alerts`, `flags`, with `latitude`, `longitude` and `timezone` |

## Switch the forecast request to MyRadar

1. Hold an access token for an agent credential with a plan that covers forecast. Reuse a ZeroClick agent credential if you have one. The plan is bought once with that credential, and [the buyer skill](https://agents.myradar.dev/zcj/b2djhzkgn44j/SKILL.md) gives the steps for registering, buying and settling the purchase 402.

2. Send the forecast request with the header:

   ```bash
   curl -s "https://agents.myradar.dev/zcj/b2djhzkgn44j/v1/forecast/45.51,-122.68?units=us&exclude=minutely,alerts" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
   ```

3. Read the response as before. With `minutely` and `alerts` excluded, the response has this shape:

   ```json
   {
     "latitude": 45.51,
     "longitude": -122.68,
     "timezone": "America/Los_Angeles",
     "currently": {"time": 1590159600, "summary": "Showers.", "icon": "rain", "temperature": 49, "precipProbability": 0.49},
     "hourly": {"summary": "...", "icon": "rain", "data": [{"time": 1590159600, "temperature": 49}]},
     "daily": {"summary": "...", "icon": "rain", "data": [{"time": 1590130800, "temperatureHigh": 63, "temperatureLow": 43}]},
     "flags": {"units": "us"}
   }
   ```

   A plan-funded response carries a `zc-billing` header with `chargedUsd` and, when the plan tracks a balance, `remainingCreditUsd`.

## Choose units, sections and hourly range

| You need | Send |
| --- | --- |
| Imperial units (the default) | `units=us` |
| SI units | `units=si` |
| SI with wind in km/h | `units=ca` |
| SI with wind in mph and visibility in miles | `units=uk2` |
| 168 hours of hourly data instead of 48 | `extend=hourly` |
| Fewer sections | `exclude=` any of `currently`, `minutely`, `hourly`, `daily`, `alerts`, `flags` |

## Choose a plan

| Plan | Billing | Forecast rate |
| --- | --- | --- |
| Credits | Prepaid balance, no monthly fee | $0.02 per 100 requests |
| Starter | Monthly fee, includes $199 of credit | $0.199 per thousand requests |
| Pro | Monthly fee, includes $399 of credit | $0.133 per thousand requests |
| Platinum | Monthly fee, includes $550 of credit | $0.11 per thousand requests |

On Credits, 10,000 forecast calls cost $2. Monthly fees are in [the catalog](https://agents.myradar.dev/zcj/b2djhzkgn44j/manifest.json).

## Limits

- One point per request. Each call counts as one request on the forecast meter.
- `minutely` and `alerts` cover the US only.
- Summaries come in English only.
- There is no pay-per-call. You pay nothing until you settle the purchase 402. A call without a credential or a plan is refused with a 401 or a 403, and neither carries a price.
- An anonymous credential that nobody claims lapses within a few days, taking its plans with it. Claim it to an email to keep what you buy.
- Unused Credits stay on the balance.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | No agent credential on the call | Register or reuse one, then retry with the header |
| `401 invalid_token` (`token_expired`) | The access token lapsed | Exchange the stored assertion for a fresh token |
| `403 plan_required` | No plan covers the call | Buy one of the plans in the body's `plans`, then retry |
| `usage_exhausted` | The plan's credit ran out | Top up with `POST https://agents.myradar.dev/zcj/b2djhzkgn44j/extend` and `{"amountUsd": "<amount>"}`, or buy again |
| `400 amount_below_card_minimum` | The card amount is under the card minimum | Raise it to $0.50, or pay on a wallet rail |

## Frequently asked questions

### Is MyRadar a Dark Sky API replacement?

Yes, for the forecast request. MyRadar built its forecast endpoint to stand in for the old Dark Sky forecast request, and the response is shaped like Dark Sky's. It takes `units`, `exclude` and `extend`. Send the request to the storefront with the credential in the `Authorization` header.

### Do I need an API key for the MyRadar forecast endpoint?

No. Calls carry a bearer token from the agent credential the storefront issues, which you can register for free. No upstream API key is needed.

### What changes in a Dark Sky forecast request?

The request goes to `https://agents.myradar.dev/zcj/b2djhzkgn44j/v1/forecast/{point}` with an `Authorization: Bearer` header carrying the storefront's agent credential. The endpoint takes `units`, `exclude`, `extend` and `lang` as query parameters, and `lang` takes `en` only.

### How much does the Dark Sky compatible forecast API cost?

On Credits, a forecast call costs $0.02 per 100 requests, drawn from a prepaid balance bought from $0.02 on a wallet rail or $0.50 by card. The monthly plans charge lower per-request rates on top of a monthly fee. [The catalog](https://agents.myradar.dev/zcj/b2djhzkgn44j/manifest.json) lists the current prices.

### Does the forecast include minute-by-minute rain and alerts outside the US?

No. `minutely` and `alerts` cover the US only.

## Keep reading

- [Buyer skill](https://agents.myradar.dev/zcj/b2djhzkgn44j/SKILL.md): the full purchase flow
- [Identity](https://agents.myradar.dev/zcj/b2djhzkgn44j/auth.md): register, claim and exchange a credential
- [How to pay](https://agents.myradar.dev/zcj/b2djhzkgn44j/payment.md): plans, the 402 and each rail
- [Forecast API reference](https://agents.myradar.dev/zcj/b2djhzkgn44j/services/forecast/openapi.json): every parameter and response field
- [Error reference](https://agents.myradar.dev/zcj/b2djhzkgn44j/errors.md): every error code

---

Updated 2026-10-16. All MyRadar guides: https://agents.myradar.dev/guides.md. Storefront: https://agents.myradar.dev/zcj/b2djhzkgn44j/llms.txt.
