# SearchByTextRequest

    struct SearchByTextRequest

    extension SearchByTextRequest : Equatable, Sendable, SendableMetatype

- `


  ### [==(_:_:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV2eeoiySbAC_ACtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (a: SearchByTextRequest, b: SearchByTextRequest) -> Bool

- `


  ### [RankPreference](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html)


  ` How results will be ranked in the response.

  #### Declaration

  Swift

      enum RankPreference

      extension https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html.RankPreference : CaseIterable, Equatable, Hashable, Identifiable, Sendable, SendableMetatype

- `


  ### [evSearchOptions](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV02evD7OptionsAA08EVSearchI0VSgvp)


  ` Set the searchable EV options of a place search request.

  #### Declaration

  Swift

      var evSearchOptions: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/EVSearchOptions.html? { get }

- `


  ### [includedType](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV12includedTypeAA05PlaceI0VSgvp)


  ` The requested place type.

  See
  <https://developers.google.com/maps/documentation/places/web-service/search-textual#supported-types>
  for the most up-to-date list of supported types available

  #### Declaration

  Swift

      var includedType: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceType.html? { get }

- `


  ### [init(textQuery:placeProperties:locationBias:includedType:maxResultCount:minRating:isOpenNow:priceLevels:rankPreference:regionCode:isStrictTypeFiltering:shouldIncludePureServiceAreaBusinesses:evSearchOptions:routingParameters:searchAlongRouteParameters:shouldIncludeRoutingSummaries:shouldIncludeSearchURL:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV9textQuery15placeProperties12locationBias12includedType14maxResultCount9minRating9isOpenNow11priceLevels14rankPreference10regionCode0u6StrictO9Filtering38shouldIncludePureServiceAreaBusinesses02evD7Options17routingParameters26searchAlongRouteParameters29shouldIncludeRoutingSummaries013shouldIncludeD3URLACSS_SayAA13PlacePropertyOGAA016CoordinateRegionM0_pAA05PlaceO0VSgSiSfSbShyAA10PriceLevelOGSgAC14RankPreferenceOSSSgS2bAA15EVSearchOptionsVSgAA17RoutingParametersVSgAA0D20AlongRouteParametersVSgS2btcfc)


  ` Instantiates a `SearchByTextRequest` with a text query and place properties to return.

  #### Declaration

  Swift

      init(textQuery: String, placeProperties: [https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceProperty.html], locationBias: any https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Protocols/CoordinateRegionBias.html, includedType: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceType.html? = nil, maxResultCount: Int = 20, minRating: Float = 0.0, isOpenNow: Bool = true, priceLevels: Set<https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PriceLevel.html>? = nil, rankPreference: SearchByTextRequest.https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html = .distance, regionCode: String? = nil, isStrictTypeFiltering: Bool = false, shouldIncludePureServiceAreaBusinesses: Bool = false, evSearchOptions: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/EVSearchOptions.html? = nil, routingParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/RoutingParameters.html? = nil, searchAlongRouteParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchAlongRouteParameters.html? = nil, shouldIncludeRoutingSummaries: Bool = false, shouldIncludeSearchURL: Bool = false)

  #### Parameters

  |---|---|
  | ` textQuery ` | The string query for the search request. |
  | ` placeProperties ` | The `placeProperty`s that should be included in place results. Must not be empty. An empty list will result in an error when trying to send the request. When used in a `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceSearchView.html` context, this parameter will be ignored, as the place properties will be automatically determined. |
  | ` locationBias ` | The biased region to search. |
  | ` includedType ` | The requested place type. |
  | ` maxResultCount ` | The maximum number of results to return. Must be between 1 and 20 (default), inclusive. |
  | ` minRating ` | The minimum average user rating for places to be included in the results, between 0.0 (default) and 5.0, inclusive. |
  | ` isOpenNow ` | Filter results to places that are currently open. Defaults to `true`. |
  | ` priceLevels ` | A set of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PriceLevel.html` values to filter places included in the results. |
  | ` rankPreference ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html` to sort the results. Defaults to `.distance`. |
  | ` regionCode ` | The unicode country/region code (CLDR) of the request location. |
  | ` isStrictTypeFiltering ` | Defines if only results of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV12includedTypeAA05PlaceI0VSgvp` should be returned. Defaults to `false`. |
  | ` shouldIncludePureServiceAreaBusinesses ` | Defines whether to include pure service area businesses in the results. Defaults to `false`. |
  | ` evSearchOptions ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/EVSearchOptions.html` to filter places included in the results. |
  | ` routingParameters ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/RoutingParameters.html` to filter places included in the results. |
  | ` searchAlongRouteParameters ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchAlongRouteParameters.html` to filter places included in the results. |
  | ` shouldIncludeRoutingSummaries ` | Defines whether to include routing summaries in the results. Defaults to `false`. Setting `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV29shouldIncludeRoutingSummariesSbvp` to `true` without also including either the `routingParameters.origin` parameter or the `searchAlongRouteParameters.polyline.encodedPolyline` parameter in the request causes an error. |
  | ` shouldIncludeSearchURL ` | Defines whether to include a URL to search in Google Maps. Defaults to `false`. |

- `


  ### [init(textQuery:placeProperties:locationRestriction:includedType:maxResultCount:minRating:isOpenNow:priceLevels:rankPreference:regionCode:isStrictTypeFiltering:shouldIncludePureServiceAreaBusinesses:evSearchOptions:routingParameters:searchAlongRouteParameters:shouldIncludeRoutingSummaries:shouldIncludeSearchURL:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV9textQuery15placeProperties19locationRestriction12includedType14maxResultCount9minRating9isOpenNow11priceLevels14rankPreference10regionCode0u6StrictO9Filtering38shouldIncludePureServiceAreaBusinesses02evD7Options17routingParameters26searchAlongRouteParameters29shouldIncludeRoutingSummaries013shouldIncludeD3URLACSS_SayAA13PlacePropertyOGAA016CoordinateRegionM0_pAA05PlaceO0VSgSiSfSbShyAA10PriceLevelOGSgAC14RankPreferenceOSSSgS2bAA15EVSearchOptionsVSgAA17RoutingParametersVSgAA0D20AlongRouteParametersVSgS2btcfc)


  ` Instantiates a `SearchByTextRequest` with a text query and place properties to return.

  #### Declaration

  Swift

      init(textQuery: String, placeProperties: [https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceProperty.html], locationRestriction: any https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Protocols/CoordinateRegionRestriction.html, includedType: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceType.html? = nil, maxResultCount: Int = 20, minRating: Float = 0.0, isOpenNow: Bool = true, priceLevels: Set<https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PriceLevel.html>? = nil, rankPreference: SearchByTextRequest.https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html = .distance, regionCode: String? = nil, isStrictTypeFiltering: Bool = false, shouldIncludePureServiceAreaBusinesses: Bool = false, evSearchOptions: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/EVSearchOptions.html? = nil, routingParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/RoutingParameters.html? = nil, searchAlongRouteParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchAlongRouteParameters.html? = nil, shouldIncludeRoutingSummaries: Bool = false, shouldIncludeSearchURL: Bool = false)

  #### Parameters

  |---|---|
  | ` textQuery ` | The string query for the search request. |
  | ` placeProperties ` | The `placeProperty`s that should be included in place results. Must not be empty. An empty list will result in an error when trying to send the request. When used in a `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceSearchView.html` context, this parameter will be ignored, as the place properties will be automatically determined. |
  | ` locationRestriction ` | The restricted region to search. |
  | ` includedType ` | The requested place type. |
  | ` maxResultCount ` | The maximum number of results to return. Must be between 1 and 20 (default), inclusive. |
  | ` minRating ` | The minimum average user rating for places to be included in the results, between 0.0 (default) and 5.0, inclusive. |
  | ` isOpenNow ` | Filter results to places that are currently open. Defaults to `true`. |
  | ` priceLevels ` | A set of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PriceLevel.html` values to filter places included in the results. |
  | ` rankPreference ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html` to sort the results. Defaults to `.distance`. |
  | ` regionCode ` | The unicode country/region code (CLDR) of the request location. |
  | ` isStrictTypeFiltering ` | Defines if only results of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV12includedTypeAA05PlaceI0VSgvp` should be returned. Defaults to `false`. |
  | ` shouldIncludePureServiceAreaBusinesses ` | Defines whether to include pure service area businesses in the results. Defaults to `false`. |
  | ` evSearchOptions ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/EVSearchOptions.html` to filter places included in the results. |
  | ` routingParameters ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/RoutingParameters.html` to filter places included in the results. |
  | ` searchAlongRouteParameters ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchAlongRouteParameters.html` to filter places included in the results. |
  | ` shouldIncludeRoutingSummaries ` | Defines whether to include routing summaries in the results. Defaults to `false`. Setting `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV29shouldIncludeRoutingSummariesSbvp` to `true` without also including either the `routingParameters.origin` parameter or the `searchAlongRouteParameters.polyline.encodedPolyline` parameter in the request causes an error. |
  | ` shouldIncludeSearchURL ` | Defines whether to include a URL to search in Google Maps. Defaults to `false`. |

- `


  ### [isOpenNow](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV9isOpenNowSbvp)


  ` Filter results to places that are currently open. \*/

  #### Declaration

  Swift

      var isOpenNow: Bool { get }

- `


  ### [isStrictTypeFiltering](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV21isStrictTypeFilteringSbvp)


  ` Defines whether only results of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV12includedTypeAA05PlaceI0VSgvp` should be returned.

  Default value is `false`\`.

  #### Declaration

  Swift

      var isStrictTypeFiltering: Bool { get }

- `


  ### [locationBias](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV12locationBiasAA016CoordinateRegionI0_pSgvp)


  ` The biased region to search.

  This location serves as a bias, which means there is a preference for results in the given
  location.

  If set along with `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV19locationRestrictionAA016CoordinateRegionI0_pSgvp`\`, this will be ignored.

  #### Declaration

  Swift

      var locationBias: (any https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Protocols/CoordinateRegionBias.html)? { get }

- `


  ### [locationRestriction](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV19locationRestrictionAA016CoordinateRegionI0_pSgvp)


  ` The restricted region to search.

  This location serves as a restriction which means results outside the given location will
  not be returned.

  Cannot be used with `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest.html#/s:17GooglePlacesSwift19SearchByTextRequestV12locationBiasAA016CoordinateRegionI0_pSgvp`\`.

  #### Declaration

  Swift

      var locationRestriction: (any https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Protocols/CoordinateRegionRestriction.html)? { get }

- `


  ### [maxResultCount](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV14maxResultCountSivp)


  ` Returns the maximum number of results to return between `PlaceResultCountMinResultCount` and
  `PlaceResultCountMaxResultCount`.

  The allowed range of this field can be found at
  <https://developers.google.com/maps/documentation/places/web-service/search-textual#maxresultcount>.
  Defaults to the upper limit.

  #### Declaration

  Swift

      var maxResultCount: Int { get }

- `


  ### [minRating](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV9minRatingSfvp)


  ` The minimum average user rating for places to be included in the results. Rating will be
  within a range between 0.0 and 5.0.

  The specified rating will be rounded up to the nearest 0.5. See `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/Place.html` rating property.

  #### Declaration

  Swift

      var minRating: Float { get }

- `


  ### [placeProperties](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV15placePropertiesSayAA13PlacePropertyOGvp)


  ` The array of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceProperty.html` that should be included in place results.

  #### Declaration

  Swift

      var placeProperties: [https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceProperty.html] { get }

- `


  ### [priceLevels](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV11priceLevelsShyAA10PriceLevelOGSgvp)


  ` An array of the `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PriceLevel.html` values that should filter the places included in the results.

  Any combination of price levels can be selected; default is all price levels.

  #### Declaration

  Swift

      var priceLevels: Set<https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PriceLevel.html>? { get }

- `


  ### [rankPreference](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV14rankPreferenceAC04RankI0Ovp)


  ` The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html` used to sort the results returned from the request.

  #### Declaration

  Swift

      var rankPreference: SearchByTextRequest.https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest/RankPreference.html { get }

- `


  ### [regionCode](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV10regionCodeSSSgvp)


  ` The unicode country/region code (CLDR) of the location where the request is coming from.

  It is used to display the place details, like region-specific place name, if available.

  See <https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html>
  for region codes.

  #### Declaration

  Swift

      var regionCode: String? { get }

- `


  ### [routingParameters](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV17routingParametersAA07RoutingI0VSgvp)


  ` Additional parameters for routing to results.

  #### Declaration

  Swift

      var routingParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/RoutingParameters.html? { get }

- `


  ### [searchAlongRouteParameters](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV26searchAlongRouteParametersAA0dijK0VSgvp)


  ` Additional parameters for search along a route.

  #### Declaration

  Swift

      var searchAlongRouteParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchAlongRouteParameters.html? { get }

- `


  ### [shouldIncludePureServiceAreaBusinesses](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV38shouldIncludePureServiceAreaBusinessesSbvp)


  ` A pure service area business is a business that visits or delivers to customers directly,
  but does not serve customers at their business address. For example, businesses like
  cleaning services or plumbers. Those businesses do not have a physical address or location
  on Google Maps.

  Default value is `false`.

  #### Declaration

  Swift

      var shouldIncludePureServiceAreaBusinesses: Bool { get }

- `


  ### [shouldIncludeRoutingSummaries](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV29shouldIncludeRoutingSummariesSbvp)


  ` Defines whether to include routing summaries in the results.

  Default value is `false`.

  #### Declaration

  Swift

      var shouldIncludeRoutingSummaries: Bool { get }

- `


  ### [textQuery](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/SearchByTextRequest#/s:17GooglePlacesSwift19SearchByTextRequestV9textQuerySSvp)


  ` The text query for the search.

  #### Declaration

  Swift

      var textQuery: String { get }