Actions24
- FIPE – Preço
- CEP (v1)
- CEP (v2)
- DDD → UF & cidades
- Banco por Código
- Câmbio – Cotação
- CNPJ
- Corretora por CNPJ
- Registro.br – Domínio
- Taxa por Sigla
- Feriados por Ano
- FIPE – Marcas
- FIPE – Veículos por Marca
- IBGE – UF por Código
- IBGE – Municípios
- NCM – Lista
- NCM por Código
- ISBN
- CPTEC – Buscar Cidade
- CPTEC – Clima Aeroporto
- CPTEC – Previsão 1 dia
- CPTEC – Previsão N dias
- CPTEC – Ondas 1 dia
- CPTEC – Ondas N dias
Overview
This node integrates with BrasilAPI, a public API service providing various Brazilian data endpoints. Specifically, the "CPTEC – Ondas N dias" operation fetches wave forecast data for a given city code over a specified number of days (1 to 6). This is useful for applications related to marine activities, surfing forecasts, coastal weather monitoring, or environmental research.
For example, a user can input a city code representing a coastal location and request a multi-day wave forecast to plan maritime operations or leisure activities safely.
Properties
| Name | Meaning |
|---|---|
| City Code | Numeric identifier of the city for which the wave forecast is requested. |
| Days (1-6) | Number of days (from 1 up to 6) for which the wave forecast should be retrieved. |
Output
The output is a JSON object containing the wave forecast data returned by the BrasilAPI endpoint /cptec/v1/ondas/{cityCode}/{days}. The structure typically includes details such as wave height, direction, period, and other relevant meteorological parameters for each day in the forecast range.
No binary data output is produced by this node.
Dependencies
- Requires internet access to call the BrasilAPI public endpoints.
- No authentication or API keys are needed since BrasilAPI is publicly accessible.
- Uses the HTTP client library internally to perform GET requests with a 10-second timeout.
Troubleshooting
Common issues:
- Invalid or unknown city codes may result in errors or empty responses.
- Requesting more than 6 days will likely cause an error since the API supports only up to 6 days.
- Network connectivity problems or BrasilAPI downtime will cause request failures.
Error messages:
Unsupported operationerror if an invalid operation name is used (not applicable here if using the correct operation).- Timeout errors if the API does not respond within 10 seconds.
Resolutions:
- Verify the city code is valid and corresponds to a supported location.
- Ensure the days parameter is between 1 and 6.
- Check network connection and BrasilAPI status.
- Retry after some time if the API is temporarily unavailable.
Links and References
- BrasilAPI official website: https://brasilapi.com.br/
- CPTEC (Brazilian Center for Weather Forecast and Climate Studies): https://portal.cptec.inpe.br/
- BrasilAPI GitHub repository: https://github.com/BrasilAPI/BrasilAPI