Free weather api?

elbawonknu

Forum Guru
Elite
Joined
Dec 9, 2018
Posts
3,730
Solutions
1
Reaction
1,319
Points
1,519
Age
23
hi po nasa topic na kasi ako ng api...jquery ajax gamit ko pinagaaralan ko pa sya may mga free api sa github kaso parang mga fixed na sya sa isang location😅 kasi pag search ko ng longitude at langitude parepareho kahit i refresh ko same sa console.log nya or baka kailangan pa na modify yata ang script ko hayss..kaya nag search na ako sa YøùTùbé kaso may mga bayad yung kinukuhanan nila ng api... baka may alam kayo na libre jan na api yung pwede ako mag input sa html ko na address them auto mag search sya sa wheather apo..
 
Hello! It's great to hear that you are exploring APIs and learning more about how to integrate them into your projects. In response to your query about free weather APIs that you can use in your project, I recommend looking into the OpenWeatherMap API. OpenWeatherMap provides a free tier that allows you to access current weather data, forecasts, and historical weather data for various locations around the world.

To use the OpenWeatherMap API, you will need to sign up for a free account to obtain an API key which you can then use in your jQuery AJAX requests to fetch weather data for a specific location based on its latitude and longitude or address.

Here is a simple example of how you can make a request to the OpenWeatherMap API using jQuery AJAX to fetch current weather data for a specific location:

JavaScript:
$(document).ready(function() {
    // Replace 'YOUR_API_KEY' with your actual API key from OpenWeatherMap
    var apiKey = 'YOUR_API_KEY';
    var address = 'Manila'; // You can replace this with the address you want to get weather data for

    $.ajax({
        url: 'https://api.openweathermap.org/data/2.5/weather',
        data: {
            q: address,
            appid: apiKey
        },
        success: function(response) {
            console.log(response);
            // Process the weather data here
        },
        error: function(err) {
            console.log(err);
        }
    });
});

Remember to replace 'YOUR_API_KEY' with your actual API key from OpenWeatherMap and update the address variable with the location you want to retrieve weather data for. This is just a basic example to get you started, and you can explore the OpenWeatherMap API documentation to learn more about the available endpoints and parameters.

I hope this helps you in integrating weather data into your project using a free API like OpenWeatherMap. Let me know if you have any more questions or need further assistance!
 
Openweathermap.org

Create kalang account dyan may free api kana
orca-image-1245219979.jpeg


boss salamat napagana ko na sya...kaso yung sa temp nya nasa 300 sya sabi sa documentation default value ay kelvin daw kaya ayun kinunvert ko to celcius kaso around 27c sya tapos kinumpara ko sa na search ko sa google aroung 31 degress naman dun ang nalabas...natural lang ba na mag kaiba sya?
 

Attachments

View attachment 2899089

boss salamat napagana ko na sya...kaso yung sa temp nya nasa 300 sya sabi sa documentation default value ay kelvin daw kaya ayun kinunvert ko to celcius kaso around 27c sya tapos kinumpara ko sa na search ko sa google aroung 31 degress naman dun ang nalabas...natural lang ba na mag kaiba sya?
You do not have permission to view the full content of this post. Log in or register now.
basin mo dito api docs depende sa anong klaseng api ang nakuha mo

for current parameter may support for celsius
current Current weather data API response
  • current.dt Current time, Unix, UTC
  • current.sunrise Sunrise time, Unix, UTC. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • current.sunset Sunset time, Unix, UTC. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • current.temp Temperature. Units - default: kelvin, metric: Celsius, imperial: Fahrenheit. You do not have permission to view the full content of this post. Log in or register now.
  • current.feels_like Temperature. This temperature parameter accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.
  • current.pressure Atmospheric pressure on the sea level, hPa
  • current.humidity Humidity, %
  • current.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit
  • current.clouds Cloudiness, %
  • current.uvi Current UV index.
 
You do not have permission to view the full content of this post. Log in or register now.
basin mo dito api docs depende sa anong klaseng api ang nakuha mo

for current parameter may support for celsius
current Current weather data API response
  • current.dt Current time, Unix, UTC
  • current.sunrise Sunrise time, Unix, UTC. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • current.sunset Sunset time, Unix, UTC. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • current.temp Temperature. Units - default: kelvin, metric: Celsius, imperial: Fahrenheit. You do not have permission to view the full content of this post. Log in or register now.
  • current.feels_like Temperature. This temperature parameter accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.
  • current.pressure Atmospheric pressure on the sea level, hPa
  • current.humidity Humidity, %
  • current.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit
  • current.clouds Cloudiness, %
  • current.uvi Current UV index.
nahanap ko na sa baba ng documentation pwede pala mag change ng degress gamit ang unit parameter
 

Similar threads

Back
Top