Point Forecasts

Location search

Locations and associated identifiers matching a search query. Can be used as alternatives to coordinates.

get/api/v1/location/search/{query}

Request

  • Base URL: https://weatherapi.foreca.net
  • URL: https://weatherapi.foreca.net/api/v1/location/search/{query}
  • Auth: HTTP bearer

Path parameters

querystring required

Search query

Query parameters

langstring

Language (ISO 639-1 codes). Options: de, en, es, fr, it, pl, ru, fi, sv, nl, ko, pt, th, tr, zh, zh_TW (Chinese in Taiwan), zh_CN (Chinese in China). (default en)

countrystring

Limit search to a given country (ISO 3166-1 alpha-2 codes)

scriptstring

Writing script for the location name, e.g. "latin"

Response

Success

Example response

{
  "locations": [
    {
      "id": 102643743,
      "name": "London",
      "country": "United Kingdom",
      "timezone": "Europe/London",
      "language": "en",
      "adminArea": "England",
      "adminArea2": "Greater London",
      "lon": -0.1257,
      "lat": 51.5085
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.