mirror of https://github.com/pelias/api.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.8 KiB
104 lines
3.8 KiB
10 years ago
|
## /search
|
||
|
|
||
10 years ago
|
The full text search endpoint that matches the name of a place to points on the planet.
|
||
10 years ago
|
|
||
10 years ago
|
#### Required Parameters
|
||
10 years ago
|
* `input`: the string to search for (eg `new york city` or `london`)
|
||
10 years ago
|
|
||
|
#### Optional Parameters
|
||
10 years ago
|
* `lat`, `lon`: the latitude/longitude coordinates to bias search results towards (may increase relevancy)
|
||
|
* `zoom`: zoom level from which you wish to view the world
|
||
|
* `size` (default: `10`): the number of results to return
|
||
|
* `layers` (default: `poi,admin,address`): the comma-separated names of datasets you wish to query. Valid values are:
|
||
10 years ago
|
* aliases for multiple datasets like `poi`, `admin` or `address`
|
||
10 years ago
|
* `poi` expands internally to `geoname`, `osmnode`, `osmway`
|
||
|
* `admin` expands to `admin0`, `admin1`, `admin2`, `neighborhood`, `locality`, `local_admin`
|
||
|
* `address` expands to `osmaddress`, `openaddresses`
|
||
10 years ago
|
* the name of one particular dataset, like `geoname` or `osmaddress`
|
||
10 years ago
|
* `bbox`: the bounding box from which you want all your results to come
|
||
10 years ago
|
* can be one of the following comma separated string values
|
||
10 years ago
|
* "southwest_lng,southwest_lat,northeast_lng,northeast_lat" `L.latLngBounds(southwestLatLng, northeastLatLng).toBBoxString()`
|
||
10 years ago
|
* bottom left lon, bottom left lat, top right lon, top right lat
|
||
10 years ago
|
* left, bottom, right, top
|
||
10 years ago
|
* min longitude, min latitude, max longitude, max latitude
|
||
10 years ago
|
* `details` (default: `true`): indicates if results should contain detailed. Valid values:
|
||
|
* `false`: results will only contain `id`, `layer`, and `text` properties
|
||
|
* `true`: all available properties will be included in results
|
||
10 years ago
|
|
||
10 years ago
|
|
||
|
## /search/coarse
|
||
10 years ago
|
|
||
10 years ago
|
Like the `/search` endpoint, but performs a "coarse" search, meaning that it only searches administrative regions
|
||
|
(countries, states, counties, neighborhoods, etc.).
|
||
10 years ago
|
|
||
|
#### Required Parameters
|
||
10 years ago
|
Same as `/search`.
|
||
10 years ago
|
|
||
|
#### Optional Parameters
|
||
10 years ago
|
Same as `/search`.
|
||
10 years ago
|
|
||
10 years ago
|
## /suggest
|
||
10 years ago
|
|
||
10 years ago
|
The autocompletion endpoint that offers very fast response times; ideal for completing partial user input. Mixes
|
||
|
results from around the provided lat/lon coordinates and also from precision level 1 and 3.
|
||
10 years ago
|
|
||
|
#### Required Parameters
|
||
10 years ago
|
* `input`: query string
|
||
|
* `lat`, `lon`: The latitude/longitude coordinates to bias results towards.
|
||
|
* `lat`/`lon` are currently **required** because of this [open issue](https://github.com/elasticsearch/elasticsearch/issues/6444)
|
||
10 years ago
|
|
||
|
#### Optional Parameters
|
||
10 years ago
|
* `zoom`: zoom level from which you wish to view the world
|
||
|
* `size` (default: `10`): number of results requested
|
||
|
* `layers` (default: `poi,admin,address`): datasets you wish to query
|
||
|
* `details` (default: `true`)
|
||
10 years ago
|
|
||
10 years ago
|
## /suggest/coarse
|
||
|
|
||
10 years ago
|
Only queries the admin layers.
|
||
|
|
||
|
#### Required Parameters
|
||
10 years ago
|
Same as `/suggest`.
|
||
10 years ago
|
|
||
|
#### Optional Parameters
|
||
10 years ago
|
Same as `/suggest`.
|
||
10 years ago
|
|
||
10 years ago
|
|
||
10 years ago
|
## /suggest/nearby
|
||
10 years ago
|
|
||
10 years ago
|
Works as autocomplete for only the places located near a latitude/longitude; this endpoint is the same as `/suggest`
|
||
|
but the results are all from within 50 kilometers of the specified point. Unlike `/suggest`, `/suggest/nearby` does
|
||
|
not mix results from different precision levels (500km, 1000km etc from lat/lon).
|
||
10 years ago
|
|
||
10 years ago
|
#### Required Parameters
|
||
10 years ago
|
Same as `/suggest`.
|
||
10 years ago
|
|
||
|
#### Optional Parameters
|
||
10 years ago
|
Same as `/suggest`.
|
||
10 years ago
|
|
||
10 years ago
|
## /reverse
|
||
10 years ago
|
|
||
10 years ago
|
The reverse geocoding endpoint; matches a point on the planet to the name of that place.
|
||
10 years ago
|
|
||
|
#### Required Parameters
|
||
10 years ago
|
* `lat`, `lon`: The coordinates of the point.
|
||
10 years ago
|
|
||
|
#### Optional Parameters
|
||
10 years ago
|
* `zoom`: zoom level from which you wish to view the world
|
||
|
* `layers` (default: `poi,admin,address`)
|
||
|
* `details` (default: `true`)
|
||
10 years ago
|
|
||
10 years ago
|
|
||
10 years ago
|
## /place
|
||
10 years ago
|
|
||
10 years ago
|
The endpoint for retrieving one or more places with specific ids. These correspond
|
||
|
directly with Elasticsearch documents.
|
||
10 years ago
|
|
||
10 years ago
|
#### Required Parameters
|
||
10 years ago
|
* one of `id` or `ids`
|
||
|
* `id`:
|
||
10 years ago
|
* unique id of the places to be retrieved
|
||
10 years ago
|
* should be in the form of type:id, for example: `geoname:4163334`
|
||
10 years ago
|
* `ids`:
|
||
10 years ago
|
* if multiple places are to be fetched in bulk, an array of ids
|