Warm a weather.gov forecast profile

Site forecast.weather.govTask warm-weather-profileVersion v1Updated Aug 1, 2026Category navigation

Quickly open and inspect a weather.gov point forecast using its direct MapClick URL format. This skill was captured from a live agent session on forecast.weather.gov and publishes here verbatim, exactly as an agent receives it.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Purpose

Warm a forecast.weather.gov location profile and return its current page identity, current conditions, and available forecast-period summaries without replaying homepage navigation.

When to Use

Use when a caller needs to preload or inspect a weather.gov forecast profile for a city or point. Prefer the direct MapClick URL when the caller supplies the weather-office code and location parameters.

Workflow

  1. Build the direct forecast URL: https://forecast.weather.gov/MapClick.php?CityName={city}&state={state}&site={office-code} Add &textField1={latitude}&textField2={longitude}&e=0 when exact point coordinates are available.
  2. In one browser-agent call, navigate to that URL with waitUntil: "domcontentloaded", allow the forecast content to settle, and run this evaluator on the loaded page:
    (() => {
      const text = (selector) => {
        const el = document.querySelector(selector);
        return el ? el.textContent.replace(/\\s+/g, " ").trim() : null;
      };
      const periods = [
        ...document.querySelectorAll(
          "#seven-day-forecast .tombstone, #seven-day-forecast .forecast-tombstone",
        ),
      ]
        .map((el) => ({
          name:
            el
              .querySelector(".period-name")
              ?.textContent.replace(/\\s+/g, " ")
              .trim() || null,
          description:
            el
              .querySelector(".short-desc")
              ?.textContent.replace(/\\s+/g, " ")
              .trim() || null,
          temperature:
            el.querySelector(".temp")?.textContent.replace(/\\s+/g, " ").trim() ||
            null,
          imageAlt: el.querySelector("img")?.getAttribute("alt") || null,
        }))
        .filter((p) => p.name || p.description || p.temperature);
      return {
        url: location.href,
        title: document.title,
        location: text("#seven-day-forecast h2, #location h1, .panel-title"),
        currentConditions: text("#current_conditions-summary"),
        currentDetails: text("#current_conditions_detail"),
        forecastPeriods: periods,
      };
    })();

Site-Specific Gotchas

  • The forecast page is directly reachable at /MapClick.php; a homepage visit and search-box interaction are unnecessary.
  • site={office-code} is a weather-office identifier, not a freely guessed city slug. Preserve an office code supplied by the caller or obtained from weather.gov location lookup.
  • textField1 is latitude and textField2 is longitude. Include them for an exact point forecast; e=0 is the observed point-selection flag.
  • Forecast content is rendered in the standard #current_conditions-summary, #current_conditions_detail, and #seven-day-forecast regions. Some pages may omit one region, so the evaluator returns null or an empty list rather than failing.

Expected Output

An object containing the final URL, document title, location heading when present, current-condition text, current-detail text, and structured forecast-period summaries.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=forecast.weather.gov&task=warm-weather-profile