WeatherTrigger API

Get Started

Before you start using the WeatherTrigger API, it is important to know the following

  1. To use the API you will need to sign up for a key. The good news is it’s absolutely free so why not get started now.
  2. You can find your API key on your dashboard
  3. API requests are made over HTTP or HTTPS. Data features return JSON, XML or JSONP.
  4. The documentation provides some examples of how to use the API features. See code samples for several languages, and user-generated code and libraries.
  5. WeatherTrigger is moving away from the idea of providing a set of specific 'methods'. To make an API call you must create a valid query. The Components page documents how different "components" can be combined into a query.
  6. A single HTTP request can contain queries for up to 3 separate elements. This is an easy way to economize your requests. Find out more on the Multiple Queries page.
  7. The WeatherTrigger Request Builder can help you quickly understand how to create queries with little or no documentation reading.
  8. Sign up and join in the forum. It will help you to make best use of the WeatherTrigger API.

The API provides as open a system as possible to allow users to query a wide range of weather elements. It's based around logical Components to help create intuitive requests.


API Base URL: http://api.weatherunlocked.com/ or https://api.weatherunlocked.com/

Request Structure

api/trigger/{Location}/{DataType} {Element} {TimePeriod} {Operator} {Value}?app_id={APP_ID}&app_key={APP_KEY}

Example: for London, will the temperature tomorrow be greater than 16 degrees?

http://api.weatherunlocked.com/api/trigger/51.50,-0.12/forecast 2014.04.24.12,2014.04.25.12 temperature gt 16?app_id={APP_ID}&app_key={APP_KEY}

Response

{
"ConditionMatched":"No",
"ConditionMatchedNum":"0"
}

Response Fields

ConditionMatched - "Yes" or "No"

ConditionMatchedNum - "1" or "0"