Skip to content
Docs
Weather

Free weather forecast

Current conditions, an hourly forecast (48 hours by default) and a daily forecast (7 days by default, up to 10) for any coordinates: temperature, feels-like, precipitation and its probability (where the source has one), wind speed and direction, humidity, cloud cover and a simple condition code (clear, mostly_clear, partly_cloudy, cloudy, fog, light_rain, rain, heavy_rain, sleet, snow, thunderstorm).

GET/v1/weather/forecast
FreeTry it

Free: 0 credits. Data from MET Norway (CC BY 4.0, global) and the NOAA National Weather Service (US, public domain); every answer carries attribution and license, and showing the attribution is a condition of the MET Norway licence. Coordinates are rounded to 2 decimals (about 1 km) and answers are cached until the source's next update (at least 10 minutes): cached, fetched_at and expires_at say which you got. Limits: your plan's per-minute limit, 1,000 calls an hour per account and 200 an hour for points not recently asked for.

Request

GEThttps://api.scrapercompany.com/v1/weather/forecast

Authenticate with your API key in the x-api-key header (see Authentication).

Run this request on your own API key from this page, with the values you type. Signed out? Sign in or get an API key.

Parameters

  • latnumberrequiredmin -90, max 90

    Latitude, WGS84.

  • lonnumberrequiredmin -180, max 180

    Longitude, WGS84.

  • hoursintegerdefault 48min 0, max 168

    Hourly rows to return (MET Norway has about 60 hours of hourly steps, NWS 7 days).

  • daysintegerdefault 7min 1, max 10

    Daily rows to return, today first.

  • unitsstringdefault metric

    metric: °C, km/h, mm. imperial: °F, mph, in.

    One ofmetricimperial

  • tzstring | nullmax length 64

    IANA time zone that groups hours into days (America/Toronto). Default: NWS's zone for US points, else the nearest major city's within 100 km, else an offset from the longitude.

  • sourcestringdefault auto

    auto: NWS for US points when it answers, MET Norway everywhere else and as the fallback.

    One ofautomet_norwaynws

Example request

curl "https://api.scrapercompany.com/v1/weather/forecast?lat=43.65&lon=-79.38" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY"

Response

200 — Current, hourly and daily forecast.

200 response
{
  "location": {
    "lat": 40.71,
    "lon": -74.01,
    "timezone": "America/New_York",
    "timezone_source": "nws",
    "requested": {
      "lat": 40.7128,
      "lon": -74.006
    },
    "elevation_m": 2,
    "place": "New York, NY"
  },
  "source": "nws",
  "attribution": "Weather data from the NOAA National Weather Service",
  "license": {
    "provider": "NOAA National Weather Service",
    "url": "https://www.weather.gov/",
    "license": "US public domain",
    "license_url": "https://www.weather.gov/disclaimer",
    "changes": "Expanded grid intervals to hours, converted units, derived condition codes and summed hours into daily values."
  },
  "units": {
    "temperature": "°C",
    "wind_speed": "km/h",
    "precipitation": "mm",
    "humidity": "%",
    "cloud_cover": "%",
    "precipitation_probability": "%",
    "wind_direction": "°"
  },
  "updated_at": "2026-11-02T20:41:42+00:00",
  "fetched_at": "2026-11-03T04:24:00Z",
  "expires_at": "2026-11-03T05:24:00Z",
  "cached": false,
  "stale": false,
  "current": {
    "time": "2026-11-03T04:00:00Z",
    "local_time": "2026-11-02T23:00-05:00",
    "temperature": 16.1,
    "feels_like": 16.1,
    "humidity": 51,
    "wind_speed": 13,
    "wind_direction": 230,
    "cloud_cover": 23,
    "precipitation": 0,
    "precipitation_probability": 1,
    "condition": "mostly_clear"
  },
  "hourly": [
    {
      "time": "2026-11-03T04:00:00Z",
      "local_time": "2026-11-02T23:00-05:00",
      "temperature": 16.1,
      "feels_like": 16.1,
      "humidity": 51,
      "wind_speed": 13,
      "wind_direction": 230,
      "cloud_cover": 23,
      "precipitation": 0,
      "precipitation_probability": 1,
      "condition": "mostly_clear"
    },
    {
      "time": "2026-11-03T05:00:00Z",
      "local_time": "2026-11-03T00:00-05:00",
      "temperature": 15,
      "feels_like": 15,
      "humidity": 55,
      "wind_speed": 11.1,
      "wind_direction": 240,
      "cloud_cover": 21,
      "precipitation": 0,
      "precipitation_probability": 1,
      "condition": "mostly_clear"
    }
  ],
  "daily": [
    {
      "date": "2027-02-19",
      "hours_covered": 1,
      "temperature_max": 16.1,
      "temperature_min": 16.1,
      "precipitation": 0,
      "precipitation_probability": 1,
      "wind_speed_max": 13,
      "condition": "mostly_clear"
    },
    {
      "date": "2027-02-20",
      "hours_covered": 24,
      "temperature_max": 20,
      "temperature_min": 11.7,
      "precipitation": 0,
      "precipitation_probability": 3,
      "wind_speed_max": 16.7,
      "condition": "mostly_clear"
    }
  ]
}

Errors

Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.

StatusMeaningRetry?
401Unauthorized

Missing or invalid API key.

{"detail":"missing or invalid API key"}
No, fix the request
422Unprocessable Content

Request validation failed. detail is a list of problems for schema errors, or a string for semantic checks performed by the endpoint.

{"detail":[{"loc":["body","name"],"msg":"Field required","type":"missing"}]}
No, fix the request
429Too Many Requests

Too many requests: the key's requests-per-minute limit was exceeded, or (in enforce credits mode) the plan's concurrent-request limit. No rate-limit or Retry-After headers are sent; back off and retry.

{"detail":"rate limit 60/min exceeded"}
Yes, with backoff
503Service Unavailable

Temporarily unavailable: a dependency of this endpoint is down, or the upstream source changed its contract. Retry later.

{"detail":"database unavailable: OperationalError"}
Yes, with backoff

Try it

Press Try it above to run this request on your own key, with the values you type (sign in first). For a no-code walkthrough, use the workspace’s guided Try it.

  1. Export your key: export SCRAPERCOMPANY_API_KEY=sk_... (no key yet? start a free trial).
  2. Copy the cURL example above and run it in a terminal.

Questions about this page?

Send the page link and your question, and the team will answer.

Email support