# Places

Businesses and points of interest, by what they are and where they are, as data an agent can use.

```text
POST https://api.millionshort.com/v1/places
```

Places finds businesses and points of interest by what they are and where they are: "coffee near Leslieville, Toronto", "pharmacy within a kilometre of this point", "museums inside this box", "branches of this chain near this IP address's city". Each place comes back as data: its name, category, address, coordinates, distance, phone number and website. The call is synchronous, and nothing is fetched from any site to answer it.

It is the places search behind the Maps tab of the MillionShort [search site](https://millionshort.com/), as an endpoint. There is no map and there are no tiles: only the data.

## What it is for

- **"Find somewhere nearby."** An agent that has to find, compare or recommend somewhere to go.
- **Looking a business up.** A name or a brand, with or without a location, to get its address, phone number and website.
- **Places as a starting point.** Take a place's `website` to [Search](https://millionshort.com/docs/search) with `include_domains`, or to [Extract](https://millionshort.com/docs/extract), to read what the business says about itself.

## What a place carries

| Field | Notes |
|---|---|
| `name` | |
| `category`, `categories` | From one tree of categories, so `dental_clinic` means the same everywhere |
| `address` | In parts: street, unit, city, region, postcode, country, and one formatted line |
| `lat`, `lng`, `distance_m` | The distance is from the point searched around |
| `phone`, `website` | Where known |
| `brand` | For branches of a chain |
| `hours`, `open_now` | Where known, which is a small share of places |
| `last_seen` | The day the place was last confirmed |

What is not known is `null`. It is never left out and never made up.

## Coverage

Read this before you build on it.

- **Worldwide, and uneven.** Coverage is worldwide, more thorough in some countries than in others.
- **Place names are read best in Canada and the United States.** Neighbourhood names and everyday trade words ("plumber", "dentist") work best there. Those two countries are also the only area the Local directory on the search site is curated for. Elsewhere, send `lat` and `lng`, or a plain city name.
- **Opening hours are known for few places.** `open_now` leaves out every place whose hours we do not know, which is most of them.
- **Listings can be stale.** A business that has closed may still be listed. `last_seen` says when a place was last confirmed.
- **No ratings, reviews, photos or price levels.** We do not hold them.
- **No map and no tiles.**

[Which filters work where](https://millionshort.com/docs/places/parameters#which-filters-work-where) sets this out filter by filter. The curated Local directory of the search site is not part of this endpoint.

## Attribution

The places come from open data, and some of its licences ask for a credit. Every answer carries `data.attribution`: one line of text, and the address of the page that lists each source and its licence. If you show these places to people, show that line, or a link to the page it names, with them. [Parameters](https://millionshort.com/docs/places/parameters#attribution) has the field.

## In this section

| Part | Page |
|---|---|
| Quickstart | [Places near a name, then near a point, then reading the answer](https://millionshort.com/docs/places/quickstart) |
| Parameters | [Every request field with an example, which filters work where, the category list, and everything that comes back](https://millionshort.com/docs/places/parameters) |
| Guides | [Near a point, near an IP address, how `near` is read, finding a category, and opening hours](https://millionshort.com/docs/places/guides) |
| Pricing and limits | [What a call costs, and the limits](https://millionshort.com/docs/places/pricing) |
| Errors | [A location that is missing or not found, and the rest](https://millionshort.com/docs/places/errors) |

## On the search site

A person can search the same places on the Maps tab of the [search site](https://millionshort.com/), and browse its Local tab, a curated directory of local businesses in cities of Canada and the United States.

## With the other endpoints

[Search](https://millionshort.com/docs/search) finds pages; Places finds the businesses themselves. A place's `website` is a site you can search inside, and [Extract](https://millionshort.com/docs/extract) can read its pages. [The endpoints](https://millionshort.com/docs/endpoints) says where each one stands.
