---
title: Weather Trigger
description: Based on Weather and real-time conditions.
---

[Skip to content](https://helpdesk.displayce.com/en/knowledge/weather-trigger#main-content)

English

Show submenu for translations

![DSP Light](https://helpdesk.displayce.com/hs-fs/hubfs/DSP%20Light.png?width=300&height=53&name=DSP%20Light.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations

 Advice and answers from Displayce

- There are no suggestions because the search field is empty.

1. [Helpdesk](https://helpdesk.displayce.com/en/knowledge?hsLang=en)
2. [Knowledge Base](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en)
3. [Additional services](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#additional-services)

# Weather Trigger

### Weather conditions

Advertisements can change depending on the weather. For example, an advertisement for umbrellas may be displayed when it's raining; a sunscreen advertising is automatically displayed on screens when the temperature exceeds 25°C.

**Here are the following items for the weather conditions:**

- Weather (sunny, cloudy, rainy, not rainy, snowy, half cloudy)
- Temperature (threshold of temperature in celcius)
- Air pollution (Good, poor,...)
- UV index (threshold of UV index)

*Not rainy* means: the combination of all other possible weather conditions, except rain.

#### Our data provider

For weather targeting, we work with the **Open Weather API** (https://openweathermap.org/) which is based on latitude/longitude.

There's a **caching mechanism for weather data within a 500-meter radius**. Here's a detailed explanation of this concept:

#### **Caching Principle**

- When a request is made for weather data for a specific location, the results are stored in a **cache**.
- If a new request is made for a location within **500 meters** of a previously requested location, the system will use the cached data **instead of recalculating or re-fetching the data from the OpenWeatherMap API**.

**Concrete Example**

- If a weather application requests data for point A (latitude 40.7128, longitude -74.0060) and gets the results, these data are stored in the cache.
- If later a request is made for point B very close by (e.g., latitude 40.7130, longitude -74.0055), the system will use the cached data from point A because B is within 500 meters of A.

**Advantages**

- **Efficiency**: Reduces the number of requests to the API, decreasing server load and improving response times.
- **Consistency**: Ensures that weather data remains consistent for geographically close areas, avoiding minor but potentially confusing discrepancies.

### **Granularity**

For **Air pollution**, the data is retrieved from Open Weather **every two hours**.

For **Weather, UV index and Temperature** the data is retrieved from Open Weather **every hour.** 

We have **hourly granularity** on triggers.

**To illustrate that, let's assume you select a trigger Weather \> Not rainy, and you didn't apply any dayparting in the setup of your line item.**

- We retrieve data from Open Weather **every hour**. The interval is labelled as 'not rainy', so we'll buy during that period. 
    - If the weather changes within the hour and becomes 'rainy', the buying process will still happen until the next refresh.
- We retrieve data from Open Weather **every hour**. The interval 1pm-2pm is labeled 'rainy', the interval 2pm-3pm is labeled 'not rainy'.

- - Purchase will start at 2pm but no earlier.
    - Even though it only rains from 1pm to 1:45pm, purchase will not resume until 2pm.

 

- [Knowledge Base](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#main-content)

    - [Get started](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#get-started)
    - [Set up my campaign](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#set-up-my-campaign)
    - [Set up my Line Item](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#set-up-my-line-item)
    - [Additional services](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#additional-services)
    - [Campaign follow-up](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#campaign-follow-up)
    - [Troubleshooting](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#troubleshooting)
    - [Inventory](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#inventory)
    - [Other](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#other)
    - [New releases](https://helpdesk.displayce.com/en/knowledge/knowledge-base?hsLang=en#new-releases)
- [FAQ](https://helpdesk.displayce.com/en/knowledge/faq?hsLang=en#main-content)

    - [Set-up](https://helpdesk.displayce.com/en/knowledge/faq?hsLang=en#set-up)
    - [Troubleshooting](https://helpdesk.displayce.com/en/knowledge/faq?hsLang=en#troubleshooting)
    - [User access](https://helpdesk.displayce.com/en/knowledge/faq?hsLang=en#user-access)

[![DSP Dark](https://helpdesk.displayce.com/hs-fs/hubfs/DSP%20Dark.png?width=300&height=53&name=DSP%20Dark.png "DSP Dark")](http://displayce.com)

Copyright © 2025, Displayce