How to use API key

Add the following parameter to the GET request: APPID=APIKEY Example: api.openweathermap.org/data/2.5/forecast/city?APPID=YOURAPIKEY & what ever you want to request.

<?php

    $request = 'http://api.openweathermap.org/data/2.5/forecast/city?APPID=***YOURAPIKEY***';
    $response  = file_get_contents($request);
    $jsonobj  = json_decode($response);
    print_r($jsonobj);
?>

To request specific information just look at the keys that the API accepts and append & to the end of the url KEY=VAL.

An example would be

http://api.openweathermap.org/data/2.5/weather?APPID=YourAPIKey&q=London

I would also like to add when working with API's I recommend installing a JSON viewer plugin. I got the JSONView installed as a Google chrome extension which is brilliant for viewing json.

https://chrome.google.com/webstore/search/jsonview?hl=en

Answer from Mark on Stack Overflow
🌐
OpenWeatherMap
openweathermap.org › appid
How to start to work with Openweather API
Once you sign up using your email, the API key (APPID) will be sent to you in a confirmation email. Your API keys can always be found on your account page, where you can also generate additional API keys if needed.
APIs
This key is required for all API requests. ... OpenWeather offers a variety of APIs to fit different needs. Get full technical documentation, response examples, and integration tips.
Guide
Explore OpenWeather's user-friendly weather data products and APIs, offering short and long-term forecasts, historical observations, and specialized solutions like Road Risk and Solar Energy Prediction. Ideal for range of applications, from simple ones to complex enterise level systems.
Maps
Interactive global weather map with temperature, precipitation, wind, clouds, and pressure layers
Initiatives
Discover OpenWeather's initiatives supporting Education, Healthcare research, Open Source development, and global weather station contributions. Join our vibrant community of weather enthusiasts in advancing meteorological data for critical global challenges.
🌐
OpenWeatherMap
openweathermap.org › api
Weather API
You can cap how many locations with the same name or the nearby geographic coordinates will be seen in the API response ... Create an account on OpenWeather to access your dashboard and generate your unique API key.
Discussions

php - How to use openweathermap api key? - Stack Overflow
I have openweathermap api key , but how can I use it in PHP ? and the weather report should be report from a city name, not from the location weather ID More on stackoverflow.com
🌐 stackoverflow.com
how do i use a weather key API? i don't really understand how to put it in or how to work weather key itself
The developer notes say you need an open weather api key. https://openweathermap.org/api More on reddit.com
🌐 r/Ubersicht
5
2
January 22, 2023
python - How to use openweathermap API Key - Stack Overflow
I'm trying to use Openweathermap for Python with PyOWM, and I have my API key but I've got no idea how to use it in my python program. I've got no idea what the Use OpenWeatherMap API page is tryi... More on stackoverflow.com
🌐 stackoverflow.com
Beginner to API's. Why does this OpenWeatherMap API request doesn't work?
this error message tells you exactly whats wrong. here you will find information about how to get and use an api key api keys are a simple way to recognize users when providing an api and allow openweathermap to control how often you request information, to prevent abuse. the limits as afar as I can see are listed here https://openweathermap.org/price and show that you can use one api key to request 60 request per minute More on reddit.com
🌐 r/learnprogramming
2
1
August 10, 2017
🌐
OpenWeatherMap
openweathermap.org › faq
Frequently Asked Questions
How to do it: Sign up and get an API key (APPID) on your account page.
🌐
Samsung Developer
developer.samsung.com › galaxy-watch-tizen › studio › tutorial › get-weather-api-key.html
Get a Weather API Key | Samsung Developer
You must read and comply with OpenWeather’s terms of service. Once you get confirmation that your account is active, log in. After you log in to your OpenWeather account, click the API keys tab and copy your API key.
🌐
GitHub
gist.github.com › lalithabacies › c8f973dc6754384d6cade282b64a8cb1
Open weather API key · GitHub
this code can be written in a simple notepad and saved in an html file, replacing the icon with any .ico if something doesn't work, you can create your own icon from any photo on the internet directly from .png to .ico Thank you all for your attention)) There is also an option to replace the weather city with your own instead of "London" and specify your API-Key. ... Можу підтвердити, що 27 квітня ключ все ще працює. URL-адреса: https://api.openweathermap.org/data/2.5/weather?q=London&appid=bd5e378503939ddaee76f12ad7a97608&units=metric
🌐
OpenWeather
docs.openweather.co.uk › appid
How to start to work with Openweather API - OpenWeather
Click on Sign up and fill out a short form and get an API key (APPID) on your account page.
Find elsewhere
🌐
Educative
educative.io › answers › how-to-get-the-openweather-api-key
How to get the OpenWeather API key
Click the "Run" button to test whether the API key is valid. ... print('Your account is temporary blocked due to exceeding of requests limitation of your subscription type. Please choose the proper subscription http://openweathermap.org/price')
🌐
IONOS
ionos.com › digital guide › websites › web development › openweather api key
How to generate an OpenWeather API key - IONOS
May 6, 2024 - Step 3: Fill out the invoice form and complete sign up. Make sure to link your plan to your API key for API calls. Step 4: Find your server IP for the paid API plan in your con­fir­ma­tion email. If you want to create new API keys or see an overview of already created keys, follow these steps:
🌐
Stanford
web.stanford.edu › group › csp › cs22 › using-an-api.pdf pdf
Using an API (with OpenWeatherMap.org as an example)
For this tutorial, we will be using OpenWeatherMap.org’s API to display current weather information. 1. Visit http://openweathermap.org/appid and click Sign Up. 2. Create a new account by entering the desired information, and then click Create Account. 3. Click API Keys to view your existing ...
🌐
OpenWeatherMap
openweathermap.org › guide
OpenWeatherMap API guide
Detailed API documentation and integration guidance are available for all products. ... Data updates are released every 10 minutes to ensure timely delivery.
🌐
Locationweather
locationweather.io › docs › get-openweathermap-api-key
Get Your Weather API Key – Location Weather Docs
November 13, 2023 - Once logged in, go to My API keys or visit home.openweathermap.org/api_keys.
🌐
Thingpulse
docs.thingpulse.com › how-tos › openweathermap-key
Create OpenWeatherMap API key -
It uniquely ties requests from ... in the "Free" column. By using the free plan you are limited to 60 calls per minute. In the "Free" column click on "Get API key and Start"....
🌐
Stack Overflow
stackoverflow.com › questions › 41929396 › how-to-use-openweathermap-api-key
python - How to use openweathermap API Key - Stack Overflow
api_key = "yourkey" base_url = "http://api.openweathermap.org/data/2.5/weather?" city_name = ("example_city") complete_url = base_url + "appid=" + api_key + "&q=" + city_name response = requests.get(complete_url)
🌐
OpenWeatherMap
openweathermap.org › current
Current weather data
You can use the lang parameter to get the output in your language. Translation is applied for the city name and description fields. https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API key}&lang={lang} { "coord": { "lon": 37.62, "lat": 55.75 }, "weather": [ { "id": 501, "main": "Rain", "description": "pluie modérée", "icon": "10d" } ], "base": "stations", "main": { "temp": 295.48, "feels_like": 295.41, "temp_min": 295.15, "temp_max": 296.15, "pressure": 1018, "humidity": 60 }, "visibility": 10000, "wind": { "speed": 2, "deg": 260 }, "rain": { "1h": 1.23 }, "clouds": { "all": 100 }, "dt": 1599492273, "sys": { "type": 1, "id": 9029, "country": "RU", "sunrise": 1599446791, "sunset": 1599494929 }, "timezone": 10800, "id": 524901, "name": "Moscou", "cod": 200 } We support the following languages that you can use with the corresponded lang values: sq Albanian ·
🌐
Google
developers.google.com › google maps platform › environment › weather api › set up the weather api
Set up the Weather API | Google for Developers
reviews Get a Maps Demo Key: Try out the Weather API at no cost with a Maps Demo Key—no billing information required. ... This document describes the steps needed to start using the Weather API.
🌐
O'Reilly
oreilly.com › library › view › hands-on-robotics-with › 9781789342055 › 049cbf3c-c00d-4b63-9653-5d0eb0f2d31e.xhtml
Getting an OpenWeatherMap API key - Hands-On Robotics with JavaScript [Book]
First, you'll need to sign up for an account at https://openweathermap.org/, and generate an API key. Then, click your username in the upper-left corner and select API Keys from the tabs that appear near the top of the page: Generate an API ...
🌐
Bishopg
inspire.bishopg.ac.uk › secure-data › get-your-openweathermap-api-key-a-beginners-guide-1764810184
Get Your OpenWeatherMap API Key: A Beginner's Guide
December 4, 2025 - If you’re starting fresh, look for a button that says something like “Create key”, “Generate key”, or “Get API key”. Click that button. OpenWeatherMap will then generate a unique API key for you.
🌐
Homepage
gethomepage.dev › widgets › info › openweathermap
OpenWeatherMap - Homepage
The free tier "One Call API" is all that's required, you will need to subscribe and grab your API key. - openweathermap: label: Kyiv #optional latitude: 50.449684 longitude: 30.525026 units: metric # or imperial provider: openweathermap apiKey: youropenweathermapkey # required only if not using provider, this reveals api key in requests cache: 5 # Time in minutes to cache API responses, to stay within limits format: # optional, Intl.NumberFormat options maximumFractionDigits: 1