Git Product home page Git Product logo

weather-api's Introduction

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).
  • 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://7ajk43.deta.dev/auto

Manually Fetch weather From Location:

https://[YOUR-URL]/location/{PLACE-NAME}

##ex
https://7ajk43.deta.dev/location/kolkata

Fetch weather From GEO Location:

https://[YOUR-URL]/geolocation/{Latitude}/{Longitude}

##ex
https://7ajk43.deta.dev/geolocation/22.54994/88.371582

Result:

{
    "status": true,
    "weather_info": {
        "location": {
            "city": "Kolkata",
            "region": " WB",
            "woeid": 2295386,
            "country": "India",
            "lat": 22.54994,
            "long": 88.371582,
            "timezone_id": "Asia/Kolkata"
        },
        "current_observation": {
            "wind": {
                "chill": 26,
                "direction": 225,
                "speed": 11
            },
            "atmosphere": {
                "humidity": 63,
                "visibility": 16.1,
                "pressure": 1009,
                "rising": 0
            },
            "astronomy": {
                "sunrise": "5:59 am",
                "sunset": "5:40 pm"
            },
            "condition": {
                "text": "Sunny",
                "code": 32,
                "temperature": 26
            },
            "pubDate": 1614481200
        },
        "forecasts": [
            {
                "day": "Sun",
                "date": 1614450600,
                "low": 20,
                "high": 35,
                "text": "Sunny",
                "code": 32
            },
            # More
        ]
    }
}

Deploy Your Own:

1. Create an App for Yahoo Weather API ๐Ÿ‘‡

  • Open this Url
    https://developer.yahoo.com/weather/
  • Go to 'Get your API Keys' section and click 'Create an App'.
  • Give a Name of it.
  • Application Type will be 'Web Application'.
  • Give any URL in 'Redirect URI(s)'.
  • 'API Permissions' will be default.
  • Now click on 'Create App'.
  • You will get 'App ID' & 'Client ID' & 'Client Secret' in next page.

2. Deploy the API:

Deploy

Deploy to VPS or Local Machine ๐Ÿ‘‡ NodeJS & Npm are Required.

apt install npm
apt install nodejs

git clone https://github.com/cachecleanerjeet/weather-api.git
cd weather-api

//edit config.js
nano config.js
//after that add your api credentials

npm install
node main.js

Project is comptible with deta.sh

License & Copyright :

Connect :

weather-api's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.