---
title: "Nearest Service"
method: GET
path: "/nearest/{profile}/{coordinates}"
tags: ["Routing"]
---

# Nearest Service

`GET /nearest/{profile}/{coordinates}`

Snaps a coordinate to the street network and returns the nearest n matches. Where coordinates only supports a single {longitude},{latitude} entry.

## Query parameters

- `bearings` string
- `radiuses` string
- `hints` string
- `number` integer

## Response `200`

OK

- DirectionsNearest
  - `code` string — If the request was successful `Ok` otherwise see the service dependent and general status codes.
  - `waypoints` object[] — Array of `Waypoint` objects sorted by distance to the input coordinate.
    - `nodes` number[] — Array of OpenStreetMap node ids.
    - `distance` number
    - `location` number[]
    - `name` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — The request has been made from an unauthorized domain.
- `404` — No location or places were found for the given input
- `429` — Request exceeded the rate-limits set on your account
- `500` — Internal Server Error

---

[API](https://skmtc.dev/locationiq/apis/locationiq-api-reference.md) · [All operations](https://skmtc.dev/locationiq/apis/locationiq-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/locationiq/locationiq-api-reference/revisions/62f2eab3d1ff/schema)
