Support Center

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

query for codes

Matthew Pollicove Mar 21, 2019 09:44PM GMT

Hi there,

I'm wondering if there's a way to query for a code via the API. Say I want to find New York, NY, can I send a query and have it return the code back so I can use it in my application?


Up 0 rated Down
Pavel Zuykov Mar 22, 2019 08:28AM GMT OpenWeatherMap Agent

Hello Matt,

You can make request by city name And in the response you will get city ID (field “id”)

Also you can make your own search engine using our city ID list file:

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found