Insights API
The Insights API allows you to create and manage weather-based insights that can be used for automated monitoring and alerting. Insights are defined by custom conditions using weather parameters, severity levels, and descriptive tags.
Key Features: Custom weather condition logic • Severity level classification • Tag-based organization • Integration with monitoring and alerting systems
Information
Important: Insight endpoint units are in Metric. Deleting an insight will result in deleting any linked alerts, and removing it from linked dashboards.
Conditions Structure
Basic Condition Structure
Conditions are defined using a tree structure with operators and parameters. Each condition has a type
, content
, and optional children
array.
{
"type": "OPERATOR",
"content": {
"operator": "GREATER"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "windSpeed"
}
},
{
"type": "CONST",
"content": {
"const": 25
}
}
]
}
Supported Operators
Comparison Operators
- •
GREATER
- Greater than (>) - •
GREATER_EQUAL
- Greater than or equal (>=) - •
LESS
- Less than (<) - •
LESS_EQUAL
- Less than or equal (<=) - •
EQUAL
- Equal to (=)
Logical Operators
- •
AND
- Logical AND - •
OR
- Logical OR - •
DURATION
- Duration-based conditions
Severity Levels
Available Severity Levels
- •
unknown
- Severity not determined - •
minor
- Low impact conditions - •
moderate
- Medium impact conditions - •
severe
- High impact conditions - •
extreme
- Critical impact conditions
Usage Guidelines
The severity level indicates the intensity of impact when conditions occur. Use appropriate severity levels to prioritize alerts and responses.
List Insights
List Insights
https://api.tomorrow.io/v4/insights
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
apikey | String | Required | Your Tomorrow.io API key for authentication | YOUR_API_KEY |
Request Example
curl --request GET \
--url 'https://api.tomorrow.io/v4/insights?apikey=YOUR_API_KEY' \
--header 'Accept-Encoding: gzip, deflate'
Response Example
{
"data": {
"insights": [
{
"id": "003cccdd-d088-4051-b432-6244e094c6b1",
"type": "standard",
"conditions": {
"type": "OPERATOR",
"content": {
"operator": "LESS"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "temperature"
}
},
{
"type": "CONST",
"content": {
"const": 1
}
}
]
},
"name": "Implement Extreme Cold Protocol: Low Temps",
"description": "Salt surfaces and avoid any unnecessary work outdoors. Brief employees for general weather safety operations (frost bite, hypothermia, slipping on ice, etc.).",
"severity": "minor",
"tags": [
"Maritime Operations 2025-05-28 21:41"
],
"createdAt": "2025-05-28T21:41:19.569Z",
"updatedAt": "2025-05-28T21:41:19.569Z",
"isAccountResource": true
},
{
"id": "02008acb-d36a-47f9-b43e-19f107021219",
"type": "standard",
"conditions": {
"type": "OPERATOR",
"content": {
"operator": "DURATION"
},
"children": [
{
"type": "CONST",
"content": {
"const": 180
}
},
{
"type": "OPERATOR",
"content": {
"operator": "GREATER_EQUAL"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "precipitationIntensity"
}
},
{
"type": "CONST",
"content": {
"const": 7.5
}
}
]
}
]
},
"name": "Prepare Elevated Shelter: Heavy Rain",
"description": "Risk Knowledge: Waters may damage lower levels of buildings and homes. People need elevated shelter. Communicate Risk: Local officials and residents\nResponse Capability: Ensure there are enclosed shelters above ground that can house people who need shelter when water levels rise.",
"severity": "extreme",
"tags": [
"Early Warning System: Floods 2025-06-02 12:29"
],
"createdAt": "2025-06-02T12:29:05.353Z",
"updatedAt": "2025-06-02T12:29:05.353Z",
"isAccountResource": true
},
{
"id": "02f70a75-317c-439a-83ad-6bba0685afe9",
"type": "standard",
"conditions": {
"type": "OPERATOR",
"content": {
"operator": "LESS"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "visibility"
}
},
{
"type": "CONST",
"content": {
"const": 1
}
}
]
},
"name": "Implement Fog Protocol: Poor Visibility",
"description": "Slow down and consider dropping anchor if necessary. Listen to audio signals from the surrounding and blow your horn as needed. Use radar and electronics. Notify crews.",
"severity": "extreme",
"tags": [
"Maritime Operations 2025-05-28 21:41"
],
"createdAt": "2025-05-28T21:41:19.587Z",
"updatedAt": "2025-05-28T21:41:19.587Z",
"isAccountResource": true
}
]
},
"meta": {
"totalItems": 119
},
"links": {
"self": "/v4/insights?limit=10&offset=0",
"next": "/v4/insights?limit=10&offset=10"
}
}
Create an Insight
Create Insight
https://api.tomorrow.io/v4/insights
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
name | String | Required | The name of the insight used when setting alert notifications | High Wind Alert |
rules | String | Optional | The rules for which the linked locations will be checked. Either rules or conditions is required (e.g., windSpeed > 30) | windSpeed > 30 |
conditions | JSON | Optional | The conditions for which the linked locations will be checked. Either rules or conditions is required | {"type": "OPERATOR", "content": {"operator": "GREATER"}, "children": [...]} |
tags | Array<String> | Optional | Any descriptive tags to be used to filter insights | ["weather", "safety"] |
severity | String | Optional | The code denoting the intensity of impact when conditions occur (extreme, severe, moderate, minor, unknown) | moderate |
description | String | Optional | The description detailing this insight use-case | Monitor wind conditions and implement safety protocols when wind speeds exceed threshold |
Request Example
curl --request POST \
--url 'https://api.tomorrow.io/v4/insights?apikey=YOUR_API_KEY' \
--header 'Accept-Encoding: gzip, deflate' \
--header 'Content-Type: application/json' \
--data '{
"name": "High Wind Alert",
"rules": "windSpeed > 25",
"tags": ["weather", "safety", "wind"],
"severity": "moderate",
"description": "Monitor wind conditions and implement safety protocols when wind speeds exceed 25 m/s."
}'
Response Example
{
"data": {
"insight": {
"id": "51b1c71b-3ba7-4b6d-b5ff-702c35937ea4",
"type": "standard",
"conditions": {
"type": "OPERATOR",
"content": {
"operator": "GREATER"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "windSpeed"
}
},
{
"type": "CONST",
"content": {
"const": 25
}
}
]
},
"name": "High Wind Alert",
"description": "Monitor wind conditions and implement safety protocols when wind speeds exceed 25 m/s. Secure loose objects and consider postponing outdoor activities.",
"severity": "moderate",
"tags": [
"weather",
"safety",
"wind"
],
"createdAt": "2025-07-07T04:28:30.133Z",
"updatedAt": "2025-07-07T04:28:30.133Z",
"isAccountResource": true
}
}
}
Retrieve an Insight
Retrieve Insight
https://api.tomorrow.io/v4/insights/{insightId}
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
insightId | String | Required | ID of a pre-defined insight | insight_id_123 |
apikey | String | Required | Your Tomorrow.io API key for authentication | YOUR_API_KEY |
Request Example
curl --request GET \
--url 'https://api.tomorrow.io/v4/insights/insight_id_123?apikey=YOUR_API_KEY' \
--header 'Accept-Encoding: gzip, deflate'
Response Example
{
"data": {
"insight": {
"id": "51b1c71b-3ba7-4b6d-b5ff-702c35937ea4",
"type": "standard",
"conditions": {
"type": "OPERATOR",
"content": {
"operator": "GREATER"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "windSpeed"
}
},
{
"type": "CONST",
"content": {
"const": 25
}
}
]
},
"name": "High Wind Alert",
"description": "Monitor wind conditions and implement safety protocols when wind speeds exceed 25 m/s. Secure loose objects and consider postponing outdoor activities.",
"severity": "moderate",
"tags": [
"weather",
"safety",
"wind"
],
"createdAt": "2025-07-07T04:28:30.133Z",
"updatedAt": "2025-07-07T04:28:30.133Z",
"isAccountResource": true
}
}
}
Update an Insight
Update Insight
https://api.tomorrow.io/v4/insights/{insightId}
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
insightId | String | Required | ID of a pre-defined insight | insight_id_123 |
name | String | Optional | The name of the insight used when triggering alert notifications | Updated High Wind Alert |
rules | String | Optional | The rules for which the linked locations will be checked. i.e (windSpeed > 30) | windSpeed > 35 |
conditions | JSON | Optional | The conditions for which the linked locations will be checked | {"type": "OPERATOR", "content": {"operator": "GREATER"}, "children": [...]} |
tags | Array<String> | Optional | Any descriptive tags to be used to filter insights | ["weather", "safety", "updated"] |
severity | String | Optional | The code denoting the intensity of impact when conditions occur | severe |
description | String | Optional | The description detailing this insight use-case | Updated description for the insight |
Request Example
curl --request PUT \
--url 'https://api.tomorrow.io/v4/insights/insight_id_123?apikey=YOUR_API_KEY' \
--header 'Accept-Encoding: gzip, deflate' \
--header 'Content-Type: application/json' \
--data '{
"name": "Updated High Wind Alert",
"severity": "severe",
"description": "Updated description for enhanced wind monitoring"
}'
Response Example
{
"data": {
"insight": {
"id": "insight_id_123",
"type": "standard",
"conditions": {
"type": "OPERATOR",
"content": {
"operator": "GREATER"
},
"children": [
{
"type": "PARAMETER",
"content": {
"parameter": "windSpeed"
}
},
{
"type": "CONST",
"content": {
"const": 25
}
}
]
},
"name": "Updated High Wind Alert",
"description": "Updated description for enhanced wind monitoring",
"severity": "severe",
"tags": [],
"createdAt": "2025-07-07T04:28:30.133Z",
"updatedAt": "2025-07-07T04:28:49.174Z",
"isAccountResource": true
}
}
}
Delete an Insight
Delete Insight
https://api.tomorrow.io/v4/insights/{insightId}
Warning
Deleting an insight will result in deleting any linked alerts, and removing it from linked dashboards.
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
insightId | String | Required | ID of a pre-defined insight | insight_id_123 |
apikey | String | Required | Your Tomorrow.io API key for authentication | YOUR_API_KEY |
Request Example
curl --request DELETE \
--url 'https://api.tomorrow.io/v4/insights/insight_id_123?apikey=YOUR_API_KEY' \
--header 'Accept-Encoding: gzip, deflate'
Response Example
{
"message": "Insight deleted successfully"
}
Error Responses
400 Bad Request
{
"code": 400,
"type": "Bad Request",
"message": "Invalid request format or missing required parameters"
}
401 Unauthorized
{
"code": 401,
"type": "Unauthorized",
"message": "Invalid API key or insufficient permissions"
}
404 Not Found
{
"code": 404,
"type": "Not Found",
"message": "Insight not found"
}