v1

latestSwagger 2.02026-07-132137180.4 KB
Geocoding

Returns a Weatherbit geocoding result for supported city, postal code, station, or city_id inputs.

Returns latitude, longitude, timezone, and related location metadata for Weatherbit geocoding utility lookups.

get/geocode

Query parameters

citystring string

City lookup value (optionally with state/country). Example: Raleigh,NC

statestring string

Optional state or province code used with city lookups.

countrystring string

Optional 2-letter country code.

postal_codestring string

Postal code lookup value. Example: 98104

city_idstring string

Weatherbit city ID. Example: 4487042

stationstring string

ICAO or station ID lookup value.

keystring string required

Your registered API key.

Response

A geocoding result object.

country_codestring

2-letter country code

geo_idstring

Internal geographic identifier

latnumber

Latitude

lonnumber

Longitude

namestring

Resolved city, county, or postal area name

state_codestring

State or province abbreviation when available

timezonestring

Local IANA time zone

Example response

{
  "country_code": "US",
  "geo_id": "98104-US",
  "lat": 47.6036,
  "lon": -122.3256,
  "name": "King",
  "state_code": "WA",
  "timezone": "America/Los_Angeles"
}