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

# Find cities nearby

> PostGIS-backed proximity search. Returns cities within `radiusKm` of (`latitude`, `longitude`), ordered by distance.



## OpenAPI

````yaml GET /cities/nearby
openapi: 3.1.0
info:
  title: Ceibo API
  description: >-
    Travel platform data API: countries, cities, points of interest, walking
    tours, and entry requirements.
  version: 1.0.0
  contact:
    name: Ceibo Support
    email: support@ceibo.me
    url: https://developer.ceibo.me
servers:
  - url: https://api.ceibo.me/v1
    description: Production
security:
  - apiKey: []
paths:
  /cities/nearby:
    get:
      summary: Find cities near a coordinate
      description: >-
        PostGIS-backed proximity search. Returns cities within `radiusKm` of
        (`latitude`, `longitude`), ordered by distance.
      parameters:
        - name: latitude
          in: query
          required: true
          schema:
            type: number
            format: double
        - name: longitude
          in: query
          required: true
          schema:
            type: number
            format: double
        - name: radiusKm
          in: query
          required: false
          schema:
            type: number
            minimum: 0.1
            maximum: 500
            default: 50
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: Cities within range, ordered by distance.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/City'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    City:
      type: object
      required:
        - id
        - name
        - countryId
        - location
        - zoom
        - isCapital
        - createdAt
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Buenos Aires
        countryId:
          type: integer
          example: 10
        location:
          $ref: '#/components/schemas/Location'
        zoom:
          type: integer
          example: 12
        description:
          type:
            - string
            - 'null'
          example: Capital and largest city of Argentina
        imageUrl:
          type:
            - string
            - 'null'
          example: https://cdn.ceibo.me/cities/buenos-aires.jpg
        timezone:
          type:
            - string
            - 'null'
          example: America/Argentina/Buenos_Aires
        isCapital:
          type: boolean
          example: true
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00.000Z'
    Location:
      type: object
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          example: -34.603722
        longitude:
          type: number
          example: -58.381592
    Error:
      type: object
      required:
        - statusCode
        - code
        - message
        - timestamp
        - path
      properties:
        statusCode:
          type: integer
          example: 404
        code:
          type: string
          example: NOT_FOUND
        message:
          type: string
          example: Country with id 9999 not found
        timestamp:
          type: string
          format: date-time
          example: '2026-04-30T10:00:00.000Z'
        path:
          type: string
          example: /v1/countries/9999
  responses:
    BadRequest:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, revoked, or unknown API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key minted at developer.ceibo.me. Send on every request.

````