Geocoding Requests

This endpoint returns a conversion from an address-like string into a GPS coordinate.
This service is focused on the fusion of directions and weather forecasting. As such, geocoding results are expected to be coarse representations, as are the address-like representations.
For best results, provide a city name in English or a zip/postal code. A precise street address may succeed, but has a greater chance of failure. Similarly, a city name input in a foreign language may not be well supported at this time. Further, for best results when using a city name, input the city in a fully-specified format like: Chicago, Illinois, United States.
The motivation behind this choice is that weather forecasts don't change meter-by-meter! With a somewhat coarse location, accurate weather forecasting can still be reliably made.
With this coarseness in mind, you may experience better results from using this endpoint by providing a city name or a zip/postal code, rather than a fine-grained address. Geolocation can be a difficult problem to get right. Our goal with providing geolocation services at this time is to be "good enough" to provide accurate weather results. However, the granularity of these geolocation services will be insufficient for more fine-grained uses, such as turn-by-turn directions.
This geocoding resource is designed to provide a GPS coordinate accurate within 3 decimal places of precision (or roughly 100 meters). This may still be overly-specific for the purposes of weather forecasting, but tends to provide better results when reverse geocoding a GPS coordinate back into an address-like representation.
It should also be noted that this service is designed to be flexible. Should you wish, you can easily use your own geolocational software to generate more fine-grained GPS coordinates, which can in turn be used to generate weather forecasts from this service.

Query Parameters

query

An address-like representation. For best results, URL-encode this parameter.
(required)

Cost

50 points per request

Sample Query

GET https://api.weatherroute.io/v1/routing/geocode-forward?query=89501

Output

This request returns a Geocode response object.
The JSON response returned from this endpoint will contain geolocation information relevant to the provided query. Administrative area descriptions will be provided, where possible.
Where a query might refer to multiple different locations, a single "best guess" will be returned as the result.

Sample output

{
  "gps": "39.526,-119.813",
  "latitude": 39.5261206,
  "longitude": -119.8126581,
  "postalCode": null,
  "city": "Reno",
  "county": "Washoe County",
  "state": "Nevada",
  "country": "United States",
  "osmId": 170120,
  "longName": "Reno, Nevada, United States",
  "shortName": "Reno, NV, US"
}