This is the documentation of version 1.0.0-rc.1. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias CommonSearchParams<ApiRequest, ApiResponse>

    CommonSearchParams: CommonPlacesParams<ApiRequest, ApiResponse> & {
        filters?: PlaceFilters;
        openingHours?: OpeningHoursMode;
        query?: string;
        relatedPois?: RelatedPoisRequest;
        timeZone?: TimeZoneRequest;
    }

    The parameters of the search services that filter POIs.

    They extend the basic places parameters with the POI attribute filters, such as categories, brands and EV charging specifics, grouped under filters.

    Type Parameters

    • ApiRequest

      The API request type

    • ApiResponse

      The API response type

    Type Declaration

    • Optionalfilters?: PlaceFilters

      The kinds of places that may come back, as PlaceFilters.

    • OptionalopeningHours?: OpeningHoursMode

      The format and detail level of the POI opening hours data that the response includes.

      Each mode gives a different level of detail about when a POI is open for business.

      Use it to:

      • Display "Open Now" status
      • Show full weekly schedule
      • Plan visits during open hours
      • Filter to currently open locations
      // Request opening hours
      openingHours: 'nextSevenDays'
    • Optionalquery?: string

      The text to search for.

      It can be a place name, POI, address, or any free-form location query. If you leave it out, filters alone drive the results (a category, a brand, a fuel type), or geometries do on geometry search.

      For example:

      • Place/POI names: "Eiffel Tower", "Starbucks"
      • General queries: "pizza near me", "gas station"
      • Partial inputs: "Amst" (for autocomplete / typeahead)

      The query is processed with fuzzy matching to handle typos and variations.

      // Text-driven search
      query: 'coffee shop'

      // Omit query to search purely by category
      filters: { poiCategories: ['CHARGING_LOCATION'] }
    • OptionalrelatedPois?: RelatedPoisRequest

      Which related POIs the response includes.

      Some POIs have hierarchical relationships (e.g., terminal inside airport).

      The relationship types are:

      • off: No related POIs (default)
      • child: Include child POIs (e.g., terminals of an airport)
      • parent: Include parent POIs (e.g., airport of a terminal)
      • all: Include both parent and child relationships

      Use it to:

      • Show all terminals when user searches for airport
      • Navigate from specific location to broader facility
      • Display hierarchical location structure
      • Provide alternative entry points
      'off'
      
      // Include child POIs
      relatedPois: 'child' // Airport → show terminals

      // Include parent POIs
      relatedPois: 'parent' // Terminal → show airport

      // Include all related POIs
      relatedPois: 'all'
    • OptionaltimeZone?: TimeZoneRequest

      The timezone information to include for POI locations, for scheduling and time-aware applications.

      With iana, the response carries the IANA timezone identifier (e.g., "Europe/Amsterdam").

      Use it to:

      • Display local time for POI
      • Schedule appointments across timezones
      • Calculate opening hours in local time
      • International business coordination
      // Request IANA timezone ID
      timeZone: 'iana'

    discoverPlaces uses them. They provide:

    • POI category, brand, EV charging and fuel type filters (filters)
    • Opening hours and timezone data
    • Related POI relationships