About API

To make use of our API make sure to checkout NPM package documentation too.

HackYourForecast provides weather data from different official meteorological agencies around the world.
Our aim is to get them all but so far we have

Applications that want to benefit from open Data Meteorological Forecasts can use this service to retrieve data. The Entry point is located at http://www.hackyourforecast.com/api/weather The data is returned as application/json (JSON). All times are in in Timestamp format complying to UTC (Coordinated Universal Time).

ENDPOINT IS :

https://www.hackyourforecast.com/api/weather
To get a forecast, send post request to our API use the body to send the coordination of the location/city , and the hour you need the weather data for (this is optional, if this wasn’t sent in the request body the weather data for the current time will be returned) this information should be in a JSON format. To get started with the API, see Example and Forecast Demo.

Example:


 
    axios.post(‘http://www.hackyourforecast.com/api/weather’,
    {"locations" : [
    
    {
    		"lat" : -26.44 ,
    		"lng" : 152.94 ,
    		"timestamp" : 1539969000
    	},
    	{
    		"lat": 23,
    		"lng": 15,
    		"timestamp": 1539894600
    	}
    ]
    }).then(function (response) {
    console.log(response);
    }).catch(function (error) {
    console.log(error);
    });

Forecast Demo: Here is a sample of the result you get.
{
    
    "result": [
    	{
    		"weather": {
    			"geohash5": "r7kcf",
    			"geohash3": "r7k",
    			"sourceApi": "Australia",
    			"symbol": null,
    			"fromHour": 1539969000,
    			"altitude": 6.4,
    			"fogPercent": null,
    			"pressureHPA": 1017,
    			"cloudinessPercent": null,
    			"windDirectionDeg": null,
    			"dewpointTemperatureC": 17.4,
    			"windGustMps": 1.944,
    			"humidityPercent": 99,
    			"areaMaxWindSpeedMps": null,
    			"windSpeedMps": 2,
    			"temperatureC": 18,
    			"lowCloudsPercent": null,
    			"mediumCloudsPercent": null,
    			"highCloudsPercent": null,
    			"temperatureProbability": null,
    			"windProbability": null,
    			"updatedTimestamp": 1539976824
    		},
    		"location": {
    			"lat": -26.39,
    			"lng": 153.04,
    			"fromHour": 1539969000,
    			"distance": 0.11180339887498472
    		}
    	},
    	{
    		"Data not found for this location": {
    			"lat": 23,
    			"lng": 15
    		}
    	},
    	...
    ]

Parameters: The parameters and the unites of the parameters are concatenated in the property name of the returned result object.

LICENSE:

HackYourForecast API is published under the following terms and conditions.
When using our Data please mention where the source data came from. You can reach these licenses at

https://www.hackyourforecast.com/api/weather/license