---
title: "Places and sites matching a name"
method: GET
path: "/v1/search"
---

# Places and sites matching a name

`GET /v1/search`

## Request

- Base URL: `https://api.chargealong.io`
- URL: `https://api.chargealong.io/v1/search`
- Auth: none required

## Query parameters

- `q` string, required
- `prefer` string

## Response `200`

Matching places and sites, best first

- SearchResponse: The answer, in the envelope every read shares.
  - `data` SearchResult, required: Places, postcodes and sites matching a search.
    - `localities` PlaceMatch[], required: Places whose name matched, the visitor's country first when prefer is given.
      - `country_iso2` string, required: ISO 3166-1 alpha-2 code.
      - `country_name` string, required: The country's name.
      - `region_code` string: The region's short code, where it has one.
      - `region_name` string, required: The region's name.
      - `slug` string, required: The locality's slug.
      - `name` string, required: The locality's name.
      - `postcode` string: Its postcode, where known.
      - `site_count` integer, required: Charging sites listed there. Zero is possible: a search finds places, not only places with chargers.
      - `path` string, required: The page on https://chargealong.io this record is shown on, as a path: prefix it with https://chargealong.io.
      - `exact` boolean, required: The whole name matched, so a search box can go straight to it.
      - `lat` number, required: The place's centre, latitude.
      - `lng` number, required: The place's centre, longitude.
    - `postcodes` PostcodeMatch[], required: Postcodes that matched.
      - `country_iso2` string, required: ISO 3166-1 alpha-2 code.
      - `country_name` string, required: The country's name.
      - `code` string, required: The postcode.
      - `lat` number, required: The postcode's centre, latitude.
      - `lng` number, required: The postcode's centre, longitude.
    - `sites` Site[], required: Sites whose name or network matched.
      - `public_id` string, required: The site's permanent id: eight characters, never reused.
      - `name` string, required: The site's name.
      - `network` string, required: The charging network's slug: chargefox, evie-networks, tesla. independent when there is none.
      - `network_name` string: The network's display name.
      - `address` string: The street address as the source gives it.
      - `status` 'active' | 'unavailable' | 'planned' | 'removed', required: active: in service. unavailable: listed but reported out of service. planned: announced, not yet open. removed: gone from every source; the record stays so an old link still answers, and the page on the site answers 410.
      - `speed` 'ac' | 'fast' | 'ultra-fast', required: The site's fastest connector as a tier. ac: under 50 kW, usually AC destination charging. fast: 50 kW to under 150 kW DC. ultra-fast: 150 kW and over.
      - `max_kw` number, nullable, required: The fastest connector's power in kW. Null when no source states a power.
      - `plugs` integer, required: How many connectors the site has, across every standard.
      - `standards` string[], required: Connector standards at the site, as slugs: ccs2, chademo, type-2, nacs, ccs1, type-1, gbt.
      - `cost_kind` 'free' | 'paid' | 'unknown', required: free: no charge. paid: a price applies; see the site's cost. unknown: the sources do not say.
      - `lat` number, required: Latitude, WGS 84.
      - `lng` number, required: Longitude, WGS 84.
      - `path` string, required: The page on https://chargealong.io this record is shown on, as a path: prefix it with https://chargealong.io.
      - `distance_km` number: Kilometres from the point the list is measured from, on lists measured from a point.
  - `next_cursor` string: Present only on a paged list: pass it back to read the next page. No public read is paged today.
  - `generated_at` string, date-time, required: When this answer was generated, UTC. Answers are cached, so it can be up to an hour old.

## Other responses

- `400`: The term is too short
- `503`: The database is unavailable

---

[API](https://skmtc.dev/chargealong/apis/chargealong-api.md) · [All operations](https://skmtc.dev/chargealong/apis/chargealong-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chargealong/apis/chargealong-api/revisions/f7968808e434?raw)
