musicder-api / weather-api

World's First Unlimited Free Weather API, Made with NodeJS

Home Page:http://weather.thetuhin.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weather-API

World's First Unlimited Free Weather API, Made with NodeJS

Features:

  • Auto Fetch Weather using IP's Location.
  • Unlimited API Calls.
  • Weather Forecasts (Next Ten Days).
  • Fetch Weather From Location (City Name).
  • Fetch weather From Geo Location (Lat & Lon).
  • Low Latency.
  • Open Source So Deploy Your Own.
  • Totally Free of Cost.

API Calls (Method : GET):

Automatically fetch weather from IP's Location (Only works if server & client connects directly [No Proxy]):

https://[YOUR-URL]/auto
##ex
https://weather.thetuhin.com/auto

Manually Fetch weather From Location:

https://[YOUR-URL]/loc?query={PLACE-NAME}
##ex
https://weather.thetuhin.com/loc?query=bolpur

Fetch weather From GEO Location:

https://[YOUR-URL]/geolocation?lat={Latitude}&lon={Longitude}
##ex
https://weather.thetuhin.com/?lat=23.66188&lon=87.697304

Result:

{
    "location": {
        "city": "Bolpur",
        "region": " WB",
        "woeid": 2289871,
        "country": "India",
        "lat": 23.66188,
        "long": 87.697304,
        "timezone_id": "Asia/Kolkata"
    },
    "current_observation": {
        "wind": {
            "chill": 91,
            "direction": 68,
            "speed": 3.73
        },
        "atmosphere": {
            "humidity": 65,
            "visibility": 10.0,
            "pressure": 29.44,
            "rising": 0
        },
        "astronomy": {
            "sunrise": "5:27 am",
            "sunset": "5:37 pm"
        },
        "condition": {
            "text": "Scattered Thunderstorms",
            "code": 47,
            "temperature": 91
        },
        "pubDate": 1600495200
    },
    "forecasts": [
        {
            "day": "Sat",
            "date": 1600453800,
            "low": 78,
            "high": 92,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Sun",
            "date": 1600540200,
            "low": 80,
            "high": 96,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Mon",
            "date": 1600626600,
            "low": 79,
            "high": 83,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Tue",
            "date": 1600713000,
            "low": 78,
            "high": 86,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Wed",
            "date": 1600799400,
            "low": 78,
            "high": 87,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Thu",
            "date": 1600885800,
            "low": 79,
            "high": 88,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Fri",
            "date": 1600972200,
            "low": 79,
            "high": 89,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Sat",
            "date": 1601058600,
            "low": 78,
            "high": 89,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Sun",
            "date": 1601145000,
            "low": 78,
            "high": 90,
            "text": "Thunderstorms",
            "code": 4
        },
        {
            "day": "Mon",
            "date": 1601231400,
            "low": 78,
            "high": 91,
            "text": "Cloudy",
            "code": 26
        }
    ]
}



Deploy Your Own:

NodeJS & Npm are Required.

apt install nodejs & npm

git clone https://github.com/cachecleanerjeet/weather-api.git
cd weather-api
npm install
node main.js

Using Yahoo Weather API, if You want to use own Yahoo API Change Api Details in main.js.



Star this Repo if you Liked it ⭐⭐⭐



My Website & Social


Website .. Facebook .. Instagram .. YouTube .. Blogger

About

World's First Unlimited Free Weather API, Made with NodeJS

http://weather.thetuhin.com/

License:Apache License 2.0


Languages

Language:JavaScript 100.0%