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

# Search places

> Returns a list of places based on a text query. This endpoint helps find locations such as cities, points of interest, etc.



## OpenAPI

````yaml https://api.staging.rovemiles.com/functions/v1/openapi get /data/places
openapi: 3.0.3
info:
  title: Rove Miles API
  version: 0.1.0
  description: Data Utils, Flights, Hotels & Miles endpoints.
servers:
  - url: https://api.staging.rovemiles.com/functions/v1
security:
  - bearerAuth: []
tags:
  - name: Data
    description: Operations related to reference data like airports and places
  - name: Flights
    description: Operations related to flight search and booking
  - name: Hotels
    description: Operations related to hotel search and booking
  - name: Miles
    description: Operations related to miles and points management
  - name: Deals
    description: Operations related to special offers and promotions for flights and hotels
paths:
  /data/places:
    get:
      tags:
        - Data
      summary: Search places
      description: >-
        Returns a list of places based on a text query. This endpoint helps find
        locations such as cities, points of interest, etc.
      operationId: searchPlaces
      parameters:
        - name: textQuery
          in: query
          required: true
          description: Search query for places (e.g., 'Manhattan', 'Eiffel Tower')
          schema:
            type: string
            minLength: 2
          example: Manhattan
        - name: type
          in: query
          required: false
          description: Restricts results to places matching the specified type
          schema:
            type: string
            enum:
              - hotel
              - resort
              - hostel
              - apartment
              - vacation_rental
              - bed_and_breakfast
              - inn
              - motel
              - city
              - airport
              - restaurant
              - attraction
              - shopping_mall
              - beach
              - park
              - landmark
          example: hotel
        - name: language
          in: query
          required: false
          description: The language code in which to return results.
          schema:
            type: string
            pattern: ^[a-z]{2}(-[A-Z]{2})?$
            default: en
          example: en
        - name: limit
          in: query
          required: false
          description: Maximum number of results to return.
          schema:
            type: integer
            minimum: 1
            maximum: 20
            default: 10
          example: 5
      responses:
        '200':
          description: Successfully retrieved list of places
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaceList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    PlaceList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Place'
      example:
        data:
          - placeId: ChIJu1K2erNv5kcR6HyzBQieKJ0
            displayName: Rome
            formattedAddress: 75017 París, Francia
            types:
              - subway_station
              - transit_station
              - point_of_interest
              - establishment
            language: en
          - placeId: ChIJNcQlLHTIzhIRSLrqN9rgv5Q
            displayName: Paris Rome
            formattedAddress: 4 Rue de Provence, 75009 Paris, Francia
            types:
              - hotel
              - lodging
              - point_of_interest
              - establishment
            language: en
    Place:
      type: object
      required:
        - placeId
        - displayName
        - types
      properties:
        placeId:
          type: string
          description: Unique identifier for the place
        displayName:
          type: string
          description: Human-readable name of the place
        formattedAddress:
          type: string
          description: Human-readable address of the place
        types:
          type: array
          description: Categories the place belongs to
          items:
            type: string
        language:
          type: string
          description: Language code for the returned result
          pattern: ^[a-z]{2}(-[A-Z]{2})?$
        geometry:
          type: object
          description: Geographical coordinates of the place
          properties:
            location:
              type: object
              properties:
                lat:
                  type: number
                  format: double
                  description: Latitude coordinate
                lng:
                  type: number
                  format: double
                  description: Longitude coordinate
      example:
        placeId: ChIJu1K2erNv5kcR6HyzBQieKJ0
        displayName: Rome
        formattedAddress: 75017 París, Francia
        types:
          - subway_station
          - transit_station
          - point_of_interest
          - establishment
        language: en
        geometry:
          location:
            lat: 48.8847
            lng: 2.3231
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 400
            message: Bad Request
    Unauthorized:
      description: Unauthorized - Invalid or missing token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 401
            message: Unauthorized - Invalid or missing token
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 500
            message: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key for authentication. Add your API key to the Authorization header
        with this format: 'Bearer your_api_key_here'

````