# Weather Bid Adjustments for Google Ads: Forecast Rules & CSV (`solidfetch/weather-ad-signals`) Actor

Weather based bidding for PPC: weather triggered ads rules turn a forecast into bid adjustments per city and day. Set rules (sunny +40%, rain -20%), get the combined bid adjustment and a Google Ads Editor CSV. $2 per 1,000 location-days. It never edits your Google Ads account.

- **URL**: https://apify.com/solidfetch/weather-ad-signals.md
- **Developed by:** [Solid Fetch](https://apify.com/solidfetch) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 location days

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Weather Bid Adjustments for Google Ads: Forecast Rules & CSV

Weather ads for Google Ads: raise bids on sunny days or run more ads when it rains. Give the actor your cities and your own rules (sunny +40%, rain -20%) and it returns the weather forecast and one weather bid adjustment per city and day, plus a Google Ads Editor CSV. It is weather marketing and weather triggered ads for PPC managers, with the weather data in every row. $2 per 1,000 location-days on the free plan; locations that are not found are free. It never changes your Google Ads account.

```json
{ "locations": ["Oslo, NO", "Madrid, ES"], "rules": [{ "condition": "sunny", "adjustment": 40 }, { "condition": "rain", "adjustment": -20 }], "days": 3 }
```

One row of the result (shortened, rounded; see [Output](#output) for all fields):

```json
{ "location": "Madrid, ES", "date": "2026-10-29", "tempMaxC": 20.4, "precipitationMm": 0, "cloudCoverPct": 76, "matchedRules": [], "bidAdjustmentPct": 0, "status": "ok" }
```

A weather forecast API for marketing, with weather-based bidding on top. Weather data for marketing teams: for every city and day you get plain numbers (temperature min, max and mean, precipitation in mm, cloud cover, wind in m/s) in the same row as the bid adjustment, so one run feeds a spreadsheet, a BI tool or a bidding script. Weather based bidding for PPC managers: give the actor your locations and your own rules ("+40% when it is sunny, -20% when it rains") and it returns, for every location and every day, the forecast, the rules that match, and one combined **bid adjustment in percent** (-90% to +900%, the range Google Ads accepts). Rows for locations with a campaign also carry a **Google Ads Editor CSV record** (Campaign, Location, Bid adjustment), and the run saves the first day's records as one `GOOGLE_ADS_EDITOR.csv` file. Price: **$2 per 1,000 location-days** on the free plan ($1.20 on Gold and above). Locations that are not found, repeats and failed forecasts are free.

**It never changes your Google Ads account.** The actor has no Google login, calls no Google Ads API and sends nothing to Google. It produces numbers and a file; you (or your own import step) apply them. Check them on one campaign before you trust a rule set, and keep a baseline: a bid adjustment is a rule of yours, the forecast only says which day it applies to.

### What people use it for

- **Weather triggered ads for local services.** Ice cream, garden centres, air conditioning, umbrellas, ski rental, roofing, tyre changes: raise bids in the cities where the forecast fits and lower them where it does not.
- **A daily bid worksheet for an agency.** One run per morning for all client cities, one row per city and day, ready to review.
- **Weather data for marketing without a weather API of your own.** The raw columns (`tempMinC`, `tempMaxC`, `tempAvgC`, `precipitationMm`, `cloudCoverPct`, `windMaxMs`) are in every row, with or without rules. Leave `rules` out (through the API) and use it as a plain city forecast API: a location is a city name or `lat,lon`, a day is one row, and the output is a flat JSON/CSV table.
- **Planning a week ahead.** Up to 9 days per location, so a heat wave on day 5 is visible while there is still time to prepare the campaign.

### How to use it

```json
{
    "locations": [
        { "name": "Oslo, NO", "campaign": "Summer sale" },
        { "name": "Madrid, ES", "campaign": "Summer sale", "googleAdsLocation": "Madrid, Community of Madrid, Spain" },
        "59.9139,10.7522"
    ],
    "rules": [
        { "condition": "sunny", "adjustment": 40 },
        { "condition": "rain", "adjustment": -20 },
        { "condition": "temperature>28 and dry", "adjustment": 15 }
    ],
    "days": 3,
    "combineRules": "multiply"
}
```

A field name the actor does not know stops the run with a hint such as `"location" (did you mean "locations"?)`, so a typo cannot give you a run that ignored a setting. A rule it cannot read stops the run before anything is requested or charged.

### Input

| Field | What it does |
|---|---|
| `locations` | A city name (`Oslo`, or `Portland, US` with a two-letter country code when the name is not unique), a `lat,lon` pair, or an object with `name` or `lat` and `lon` plus optional `label`, `campaign`, `timezone`, `googleAdsLocation` and `rules` (rules for this place only). Up to 1,000 per run. |
| `rules` | List of `{ "condition": ..., "adjustment": ... }`. Adjustment is a percent from -90 to 900. Optional `label` for your own notes. |
| `days` | 1 to 9 local days per location, starting with today at the location. Default 3. |
| `combineRules` | `multiply` (default) or `add`: how matching rules become one number. |
| `campaign` | Campaign name for every location without its own. |

#### Conditions

A condition is a fixed grammar, not code: nothing is evaluated, and anything outside the grammar stops the run with a message that lists what is allowed.

| Condition | True when |
|---|---|
| `sunny` | Average cloud cover of the daytime steps (08:00 to 19:59 local) is 30% or less and the day's precipitation is under 0.5 mm. |
| `cloudy` | Average daytime cloud cover is 80% or more. |
| `dry` | Precipitation for the day is under 0.2 mm. |
| `rain` | At least 1 mm of the day's precipitation falls as rain or sleet. |
| `snow` | At least 0.5 mm (water equivalent) falls as snow. |
| `temperature>25` | The day's highest temperature is above 25 °C. Also `temp`, `temp_max`, `temp_min` (lowest). Operators `>`, `>=`, `<`, `<=`, `=`. A unit is allowed: `temperature>77F`. |
| `precipitation>=2` | The day's total precipitation in mm. `rain>2` and `snow>2` compare the rain and snow parts. |
| `wind>10` | The strongest wind of the day in m/s. Units: `wind>36kmh`, `wind>20mph`, `wind>20kn`. |
| `cloud<30` | Average daytime cloud cover in percent. |
| `temperature>25 and sunny` | `and` (or `&&`) needs every part. There is no `or`: use two rules. |

A value that is missing (for example cloud cover on a day with fewer than 4 hours of daytime forecast) never matches, it is not treated as 0.

#### How rules are combined

With `multiply`, adjustments are factors: +40% and -20% make 1.4 x 0.8 = +12%. With `add` they make +20%. The result is rounded to a whole percent (Google Ads Editor takes whole numbers) and kept inside -90% to +900%. `rawAdjustmentPct` shows the number before rounding and the cap, `capped` says when the cap applied. No matching rule gives 0, which is a real answer: "no weather adjustment today".

### Output

One row per location and day, in input order. Example (rounded, abridged):

```json
{
    "input": "Madrid, ES",
    "campaign": "Summer sale",
    "location": "Madrid, ES",
    "latitude": 40.416,
    "longitude": -3.703,
    "timezone": "Europe/Madrid",
    "date": "2026-10-29",
    "dayIndex": 1,
    "tempMinC": 8.3,
    "tempMaxC": 20.4,
    "tempAvgC": 14.5,
    "precipitationMm": 0,
    "cloudCoverPct": 76,
    "windMaxMs": 1.7,
    "symbol": "partlycloudy",
    "matchedRules": [],
    "bidAdjustmentPct": 0,
    "googleAdsEditorCsv": "\"Summer sale\",\"Madrid, Community of Madrid, Spain\",\"+0%\"",
    "status": "ok"
}
```

| Field | Meaning |
|---|---|
| `date`, `dayIndex`, `timezone`, `timezoneSource` | The local calendar date at the location (day 0 is today there), the IANA zone, and where the zone came from (the city list, your `timezone`, or the nearest city to your coordinates). |
| `partialDay`, `hoursCovered` | `partialDay` is true when fewer than 18 hours of the day are covered: the first day of a run late in the day, or the last day of the forecast. Rules still run on it. |
| `resolution` | `hourly`, `6-hourly` or `mixed`. MET gives hourly steps for about 2.5 days, then 6-hourly. |
| `tempMinC`, `tempMaxC`, `tempAvgC` | Lowest, highest and mean air temperature of the day's forecast steps, in degrees Celsius. |
| `precipitationMm`, `rainMm`, `snowMm` | Precipitation of the day in millimetres, and how much of it falls as rain and as snow. |
| `cloudCoverPct` | Average cloud cover in percent over the daytime steps (08:00 to 19:59 local); null with fewer than 4 hours of daytime forecast. |
| `windMaxMs`, `windAvgMs` | Strongest and mean wind speed of the day in metres per second. |
| `precipProbabilityPct`, `uvIndexMax` | Highest chance of precipitation (0 to 100) and highest clear-sky UV index of the day, **when the forecast carries them**. MET Norway's compact forecast, which the actor uses, has neither, so these are null for now; the columns are there so a richer forecast product fills them without changing your table. |
| `symbol` | The most frequent MET weather symbol of the daytime steps. |
| `matchedRules`, `matchedRuleCount` | Which rules matched, with their adjustments. |
| `bidAdjustmentPct`, `rawAdjustmentPct`, `capped` | The result, see above. |
| `googleAdsEditorCsv` | One CSV record, only when the location has a campaign. |
| `status` | `ok`, `invalid-location`, `duplicate-location`, `forecast-unavailable` or `no-forecast-for-day`. Only `ok` rows are charged. |
| `message` | A note, for example that several cities share the name, or why a row is free. |
| `forecastUpdatedAt`, `forecastSource` | When MET computed the forecast, and whether it was loaded now, revalidated or read from the cache. |

The run also writes a `SUMMARY` record (counts, which rules matched how often, attribution) and, when any location has a campaign, `GOOGLE_ADS_EDITOR.csv`.

### Google Ads Editor file

`GOOGLE_ADS_EDITOR.csv` has the header `"Campaign","Location","Bid adjustment"` and one record per location with a campaign, for the first forecast day (day 0, today at the location). Per-day records for the other days are in the dataset, in `googleAdsEditorCsv`.

- **Location** is the text you gave in `googleAdsLocation`, otherwise the city and country code (`Madrid, ES`). Google Ads matches locations by its own names or IDs, which are longer (`Madrid, Community of Madrid, Spain`), so set `googleAdsLocation` to the name Google Ads uses for the location you target.
- **Bid adjustment** is written as a signed percent (`+40%`, `-20%`, `+0%`).
- Google Ads Editor matches columns by header and its import options differ between versions. If yours calls the column `Bid Modifier`, rename the header. Try the file on one campaign in a test account first and read the preview before you post anything.
- A location bid adjustment in Google Ads does not have a date: it stays until you change it. That is why the schedule below runs every morning, and why a day with no matching rule is written as `+0%` (it resets the location to the baseline).

### Run it every morning at 6

1. In Apify Console open **Schedules**, create a schedule with the cron expression `0 6 * * *` and choose the time zone you work in (a schedule has its own time zone setting).
2. Add this actor as the task, with your `locations`, `rules` and `days` saved in the task input. Use `days: 1` for a worksheet of today, or `days: 3` to see ahead.
3. Read the result from `https://api.apify.com/v2/acts/<actor>/runs/last/dataset/items?token=<token>` (dataset) or from the run's key-value store, key `GOOGLE_ADS_EDITOR.csv`, then review it, import it in Google Ads Editor, and post the changes yourself. A webhook or an integration can send the file to a sheet or a chat for review.

A run of 20 cities with 1 day is 20 `location-day` events, $0.04 on the free plan. The weather data itself is free.

### Where the data comes from

- **Forecasts: MET Norway Locationforecast 2.0** (`api.met.no`), worldwide, licensed CC BY 4.0 and the Norwegian Licence for Open Government Data (NLOD). Weather data from MET Norway; this actor summarises it per local day and applies your rules, so it is changed from the original. The terms are at https://api.met.no/doc/TermsOfService. The actor follows them: it identifies itself with a User-Agent that names the actor and its project page, cuts coordinates to 4 decimals, asks once per place, keeps forecasts in a named key-value store in your account (`weather-ad-signals-met-cache`, safe to delete; the actor works without it when it cannot be opened) and honours `Expires` and `If-Modified-Since`, keeps a gap between requests (far below the allowed rate), and stops at once on HTTP 403 or 429. It does not claim to be made by MET Norway or Yr.
- **City names and time zones: GeoNames** (geonames.org), the `cities15000` list of cities with 15,000 or more inhabitants, CC BY 4.0, bundled with the actor. Nothing is geocoded online. I chose this over Nominatim, whose usage policy forbids heavy and commercial bulk use, and over asking every user for coordinates. Places that are not in the list (small towns and villages) need `lat,lon`. When a name is shared by several cities the most populous one is used and the row says so (`matchedCity` names the city, `ambiguous` is `true`); add a country code (`Paris, US`) to choose another. Coordinates get the time zone of the nearest city in the list, and a note when that city is more than 300 km away; set `timezone` to override.
- **The US National Weather Service** is not used. MET Norway already covers the US, and a second source would give two different answers for the same city.

Forecast limits to know: the values are for a point (the city centre), not the whole area; later days come from 6-hourly steps, so their minimum and maximum temperature are coarser; precipitation belongs to the day on which its forecast window starts; the forecast is a forecast.

Optionally set the environment variable `MET_CONTACT` (an e-mail address or URL) in the Actor settings: it is added to the User-Agent so MET Norway can reach you, as their terms ask.

### Pricing

Pay per event, prices on the Pricing tab: **$2 per 1,000 location-days** on the free plan, less on paid plans. A location-day is one location with a forecast for one day. Locations that are not found, repeats of a location (same place, campaign and label), days beyond the forecast and places MET Norway could not answer for are saved free. If the run reaches your cost limit it stops and says how many rows were not saved.

If MET Norway cannot be reached for any place the run fails and charges nothing.

Did this help? A review on this page, or an issue saying what is missing, helps other people find it.

# Changelog

This Actor's version history is a separate document: https://apify.com/solidfetch/weather-ad-signals/changelog.md

# Actor input Schema

## `locations` (type: `array`):

Required. A list of places. Each entry is a city name ("Oslo", or "Portland, US" with a two-letter country code when the name is not unique), a "lat,lon" pair, or an object with name or lat and lon plus optional label, campaign, timezone (IANA name such as Europe/Oslo), googleAdsLocation (the text for the Location column of the CSV) and rules (rules for this place only). City names come from a bundled list of about 34,000 cities with 15,000 or more inhabitants; use coordinates for anything else. Up to 1,000 per run. An empty list stops the run.

## `rules` (type: `array`):

Optional. Leave empty to get only the forecast columns with a bid adjustment of 0. Each rule has a condition and an adjustment in percent (-90 to 900). Conditions: sunny, cloudy, dry, rain, snow, or a comparison such as temperature>25, temp_min<0, precipitation>=2, wind>10 (m/s; add kmh, mph or kn), cloud<30. Join parts with "and": "temperature>25 and sunny". Temperature is the day's highest in °C (add F for Fahrenheit), precipitation the day's total in mm. The README lists exactly what each word means.

## `days` (type: `integer`):

Whole number from 1 to 9. How many local days to forecast per location, starting with today at the location. One row per location and day. MET Norway forecasts about 9 days; days 4 and later are built from 6-hourly steps and are less detailed.

## `combineRules` (type: `string`):

How the adjustments of all matching rules become one. The result is rounded to a whole percent and kept between -90% and +900%, the range Google Ads accepts.

## `campaign` (type: `string`):

Name of an existing Google Ads campaign, written exactly as in your account. Used for every location that has no campaign of its own. Leave empty when you only want the forecast and the bid adjustment. Rows with a campaign get a googleAdsEditorCsv record, and the run saves a GOOGLE_ADS_EDITOR.csv file of the first day's records.

## Actor input object example

```json
{
  "locations": [
    {
      "name": "Oslo, NO",
      "campaign": "Summer sale"
    },
    "59.9139,10.7522"
  ],
  "rules": [
    {
      "condition": "sunny",
      "adjustment": 40
    },
    {
      "condition": "rain",
      "adjustment": -20
    }
  ],
  "days": 3,
  "combineRules": "multiply",
  "campaign": "Summer sale"
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset table with one row per location and forecast day: temperature, precipitation, cloud and wind, the rules that matched, the combined bid adjustment in percent and a Google Ads Editor CSV record.

## `googleAdsEditorCsv` (type: `string`):

GOOGLE_ADS_EDITOR.csv in the key-value store: Campaign, Location and Bid adjustment records of the first forecast day for locations that have a campaign, ready to import into Google Ads Editor.

## `summary` (type: `string`):

SUMMARY record in the key-value store: row counts by status, which rules matched how often and the MET Norway attribution.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        {
            "name": "Oslo, NO",
            "campaign": "Summer sale"
        },
        {
            "name": "Madrid, ES",
            "campaign": "Summer sale"
        },
        "59.9139,10.7522"
    ],
    "rules": [
        {
            "condition": "sunny",
            "adjustment": 40
        },
        {
            "condition": "rain",
            "adjustment": -20
        },
        {
            "condition": "temperature>28",
            "adjustment": 15
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidfetch/weather-ad-signals").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "locations": [
        {
            "name": "Oslo, NO",
            "campaign": "Summer sale",
        },
        {
            "name": "Madrid, ES",
            "campaign": "Summer sale",
        },
        "59.9139,10.7522",
    ],
    "rules": [
        {
            "condition": "sunny",
            "adjustment": 40,
        },
        {
            "condition": "rain",
            "adjustment": -20,
        },
        {
            "condition": "temperature>28",
            "adjustment": 15,
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("solidfetch/weather-ad-signals").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    {
      "name": "Oslo, NO",
      "campaign": "Summer sale"
    },
    {
      "name": "Madrid, ES",
      "campaign": "Summer sale"
    },
    "59.9139,10.7522"
  ],
  "rules": [
    {
      "condition": "sunny",
      "adjustment": 40
    },
    {
      "condition": "rain",
      "adjustment": -20
    },
    {
      "condition": "temperature>28",
      "adjustment": 15
    }
  ]
}' |
apify call solidfetch/weather-ad-signals --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solidfetch/weather-ad-signals"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MdlZAAt2Gdm2PIWE1/builds/AcEpZk0DQZXxphCA7/openapi.json
