Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Country Codes in API

Jonny Sep 14, 2018 01:18PM BST

What are the country codes for Germany in the API Link?
http://api.openweathermap.org/data/2.5/weather?zip="+Postal Code+",us&appid="+key+"&units=imperial

At the moment ?zip="+Postal Code+",us is a ,us after the postal code for city from the United States. But I need a german city. Is there any Overview for all country codes?
What is the coutnry code for germany?

Kindly regards

Up 1 rated Down
avladimirova@owm.io Sep 17, 2018 10:43AM BST OpenWeatherMap Agent

Hello,
thank you for using our services.

The country code for Germany is “de”
Here is an API example:
https://api.openweathermap.org/data/2.5/weather?zip=01067,de&appid=YOUR_API_KEY

Please note if a country is not specified then the search works for the USA as a default.
Please use ISO 3166 country codes to find all names.

Up 0 rated Down
Jonny Oct 01, 2018 07:34AM BST
Hello again,

thanks for your answer. Works fine!

I know want to forecast the weather to the next 5 days. Which api-link i have to call to get the weather for the next 5 days? Are these values in the standard link? If so, which properties i have to ask?
At the moment i only get the data for today.

Thanks again.

Up 0 rated Down
Pavel Zuykov Oct 01, 2018 08:05AM BST OpenWeatherMap Agent

Hello,

Please use: https://api.openweathermap.org/data/2.5/forecast?zip=01067,de&appid=

More details about 5-day forecast you can find here:
https://openweathermap.org/forecast5

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
9eda11838f597e7a95b6a1c991dcae0a@openweathermap.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete