---
title: "Search / Autocomplete Locations"
method: GET
path: "/search.json"
tags: ["Geo"]
---

# Search / Autocomplete Locations

`GET /search.json`

Returns matching cities and towns as an array of Location objects. Useful for building autocomplete location pickers.

## Query parameters

- `key` string, required
- `q` string, required

## Response `200`

List of matching locations

- SearchLocation[]
  - `id` integer
  - `name` string
  - `region` string
  - `country` string
  - `lat` number
  - `lon` number
  - `url` string — URL-safe location slug

## Other responses

- `400` — Bad request — invalid parameter or location not found.
- `401` — Unauthorized — API key missing or invalid.

---

[API](https://skmtc.dev/weatherapi/apis/weatherapi-com.md) · [All operations](https://skmtc.dev/weatherapi/apis/weatherapi-com/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/weatherapi/weatherapi-com/revisions/bf3da15deb3e/schema)
