# Search places

`GET /places`

Finds places (POIs) by name, such as a museum, a station or a shop, and
the words of where they are, in `q`. Results are sorted by `score`,
highest first. Addresses, streets and areas are `/geocode`'s.

Or finds places and areas by their stable ids in `ids`, such as
`osm:node:1383955044` from a shared link, a saved place or a map tile.
Results come in the order asked; an id no record has is left out.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `q` | query | no | string | Name of the place, with where it is when known. Give `q` or `ids`, not both; one sent empty counts as given. |
| `ids` | query | no | string | Comma-separated stable ids of places, areas or streets, at most the server's batch item limit (1000 by default), such as `osm:node:1383955044,osm:way:4`. A street answers to the id of any of its ways; when a place and a street share an id, the place answers. |
| `limit` | query | no | integer | Maximum number of results. `0`, the default, lets the server choose. |
| `country` | query | no | string | Return only results in these countries, as comma-separated ISO 3166-1 alpha-2 codes. A code that is not two letters returns `400`. A code the Pack does not cover returns no results. |
| `focus` | query | no | string | Point to prefer results near, as `lon,lat`. Breaks ties between equally good matches only. |
| `bbox` | query | no | string | Return only results inside this box, as `min_lon,min_lat,max_lon,max_lat`. The box cannot cross the antimeridian. |
| `lang` | query | no | string | Languages to name results and their areas in, as comma-separated language codes. The first names each result and area, falling back to its local name; each other one goes into `translations` where a name in it exists. Repeats count once. A malformed code, or more than 20 distinct codes, returns `400`. |

## Responses

- `200`: Matching places, highest `score` first.
- `400`: Neither `q` nor `ids` is given, or both are, `q` is empty or too long, `limit` is too large, `focus` or `bbox` is out of range, `ids` names no id, an id is malformed or there are more than the server's batch item limit, or a parameter is malformed.
- `405`: Method not allowed. The route accepts `GET`, and `QUERY` or `POST` for a batch.
- `500`: Internal server error.
- `501`: `ids` was given to a Pack built before it had an id catalogue. Rebuild the Pack.
- `503`: The server runs as many lookups as it allows (`busy`; retry after the `Retry-After` header's seconds), or the lookup ran past the server's lookup timeout (`timeout`).
