> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Browse Nearby Locations

> A `GET` to the `/locations/{locationId}/nearby` endpoint returns every other location in the tenant ordered by
great-circle distance from this location's address, nearest first, with `distance_km` on each item.

Locations are included whatever their `is_published`, `is_permanently_closed` or `type`; narrow them with
`filter[type]` (one type or a comma-separated list) and `filter[is_published]` (1 or 0), and cap the list with
`limit`. A location whose address has no latitude and longitude (or 0,0) cannot be placed, so it is listed in
`meta.skipped` instead. When this location has no coordinates itself, `data` is empty,
`meta.origin.has_coordinates` is false and every other location is in `meta.skipped`.



## OpenAPI

````yaml get /v3/locations/{location}/nearby
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/locations/{location}/nearby:
    get:
      tags:
        - Location
      summary: Browse Nearby Locations
      description: >-
        A `GET` to the `/locations/{locationId}/nearby` endpoint returns every
        other location in the tenant ordered by

        great-circle distance from this location's address, nearest first, with
        `distance_km` on each item.


        Locations are included whatever their `is_published`,
        `is_permanently_closed` or `type`; narrow them with

        `filter[type]` (one type or a comma-separated list) and
        `filter[is_published]` (1 or 0), and cap the list with

        `limit`. A location whose address has no latitude and longitude (or 0,0)
        cannot be placed, so it is listed in

        `meta.skipped` instead. When this location has no coordinates itself,
        `data` is empty,

        `meta.origin.has_coordinates` is false and every other location is in
        `meta.skipped`.
      operationId: location.nearby
      parameters:
        - name: location
          in: path
          required: true
          description: The location ID
          schema:
            type: integer
        - name: filter[type]
          in: query
          schema:
            type: string
            maxLength: 500
        - name: filter[is_published]
          in: query
          schema:
            type: boolean
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
      responses:
        '200':
          description: Array of `NearbyLocation`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/NearbyLocation'
                  meta:
                    type: object
                    properties:
                      origin:
                        type: object
                        properties:
                          id:
                            type: integer
                          has_coordinates:
                            type: boolean
                        required:
                          - id
                          - has_coordinates
                      skipped:
                        type: array
                        items:
                          $ref: '#/components/schemas/SkippedLocation'
                    required:
                      - origin
                      - skipped
                required:
                  - data
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    NearbyLocation:
      type: object
      properties:
        id:
          type: integer
        handle:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        is_published:
          type: boolean
        is_permanently_closed:
          type: boolean
        distance_km:
          type: number
      required:
        - id
        - handle
        - type
        - name
        - is_published
        - is_permanently_closed
        - distance_km
      title: NearbyLocation
    SkippedLocation:
      type: object
      properties:
        id:
          type: integer
        handle:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
      required:
        - id
        - handle
        - type
        - name
      title: SkippedLocation
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.