Actions2
- Forecast Actions
- Time Machine Actions
Overview
The node provides access to historical weather data from the Pirate Weather API's Time Machine resource. It allows users to retrieve detailed past weather information for a specific location (latitude and longitude) at a given time. This is useful for scenarios such as analyzing weather conditions during past events, verifying historical climate data, or integrating past weather context into reports or applications.
For example, a user could input coordinates of a city and a timestamp to get the weather conditions that occurred at that place and time, including temperature, precipitation, wind, and other meteorological data.
Properties
| Name | Meaning |
|---|---|
| Latitude | The latitude coordinate of the location for which to retrieve historical weather data. |
| Longitude | The longitude coordinate of the location for which to retrieve historical weather data. |
| Time | The specific time for which to retrieve weather data, provided as a UNIX timestamp or ISO 8601 string. |
| Additional Fields | Optional parameters to customize the response: |
| - Exclude | Data blocks to exclude from the response. Options: Alerts, Currently, Daily, Hourly, Minutely. |
| - Extend | Option to extend the hourly forecast data (None or Hourly up to 168 hours). |
| - Icon Style | Style of weather condition icons (Default or Pirate expanded set). |
| - Language | Language code for text summaries in the response (e.g., English, Spanish, French, etc.). |
| - Units | Units system for weather data (Auto, CA, SI, UK, US). |
| - Version | API version to use; v2 includes additional fields like smoke and fire index. |
Output
The node outputs JSON data containing the historical weather information retrieved from the Pirate Weather API for the specified location and time. The structure typically includes various weather data blocks such as current conditions, minutely, hourly, daily forecasts, alerts, and other metadata depending on the selected options.
If binary data were supported, it would represent media or files related to the weather data, but this node focuses solely on JSON weather data output.
Dependencies
- Requires an API key credential for the Pirate Weather API.
- The node makes HTTP GET requests to the Pirate Weather API endpoints:
- For historical data:
https://timemachine.pirateweather.net/forecast/{apiKey}/{latitude},{longitude},{time}
- For historical data:
- Proper configuration of the API key credential within n8n is necessary.
Troubleshooting
- Common Issues:
- Invalid or missing API key will cause authentication errors.
- Incorrect latitude, longitude, or time format may result in request failures or empty responses.
- Requesting data outside the allowed historical range of the API might return errors or no data.
- Error Messages:
- Authentication errors indicate issues with the API key; verify and update credentials.
- "Invalid time" or similar errors suggest the time parameter is not correctly formatted or out of range.
- Network or timeout errors require checking connectivity and API service status.