# GMSPlaceSearchByTextRequest

    @interface GMSPlaceSearchByTextRequest : NSObject

Represents a text search request definition to be sent via `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlacesClient.html`.
- `


  ### [-initWithTextQuery:placeProperties:](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(im)initWithTextQuery:placeProperties:)


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

  #### Declaration

  Swift

      init(textQuery: String, placeProperties: [String])

  Objective-C

      - (nonnull instancetype)initWithTextQuery:(nonnull NSString *)textQuery
                                placeProperties:
                                    (nonnull NSArray<NSString *> *)placeProperties;

  #### Parameters

  |---|---|
  | ` textQuery ` | The string query for the search request. |
  | ` placeProperties ` | The array of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Type-Definitions/GMSPlaceProperty.html` 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. |

- `


  ### [-init](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(im)init)


  ` Unavailable
  Default init is not available. Please use the designated initializer.

  #### Declaration

  Objective-C

      - (nonnull instancetype)init;

- `


  ### [includedType](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)includedType)


  ` The requested place type.

  <br />

  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: String? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSString *includedType;

- `


  ### [maxResultCount](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)maxResultCount)


  ` The maximum number of results to return. Allows values between 1 and 20.

  <br />

  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: Int32 { get set }

  Objective-C

      @property (nonatomic) int maxResultCount;

- `


  ### [minRating](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)minRating)


  ` 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.

  <br />

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

  Defaults to 0.0.

  #### Declaration

  Swift

      var minRating: Float { get set }

  Objective-C

      @property (nonatomic) float minRating;

- `


  ### [isOpenNow](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)isOpenNow)


  ` Filter results to places that are currently open.

  Defaults to true.

  #### Declaration

  Swift

      var isOpenNow: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL isOpenNow;

- `


  ### [placeProperties](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)placeProperties)


  ` The array of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Type-Definitions/GMSPlaceProperty.html` that should be included in place results.

  #### Declaration

  Swift

      var placeProperties: [String] { get }

  Objective-C

      @property (nonatomic, readonly) NSArray<NSString *> *_Nonnull placeProperties;

- `


  ### [priceLevels](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)priceLevels)


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

  <br />

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

  #### Declaration

  Swift

      var priceLevels: [NSNumber]? { get set }

  Objective-C

      @property (nonatomic, nullable) NSArray<NSNumber *> *priceLevels;

- `


  ### [rankPreference](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)rankPreference)


  ` The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlaceSearchByTextRankPreference.html` used to sort the results returned from the request.

  #### Declaration

  Swift

      var rankPreference: https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlaceSearchByTextRankPreference.html { get set }

  Objective-C

      @property (nonatomic) https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlaceSearchByTextRankPreference.html rankPreference;

- `


  ### [regionCode](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)regionCode)


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

  <br />

  The region may affect the format and type of data returned. If no code is provided, there is
  no bias towards any country/region.

  <br />

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

  #### Declaration

  Swift

      var regionCode: String? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSString *regionCode;

- `


  ### [isStrictTypeFiltering](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)isStrictTypeFiltering)


  ` Defines whether only results of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest.html#/c:objc(cs)GMSPlaceSearchByTextRequest(py)includedType`
  should be returned.

  <br />

  Default value is false.

  #### Declaration

  Swift

      var isStrictTypeFiltering: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL isStrictTypeFiltering;

- `


  ### [textQuery](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)textQuery)


  ` The text query for the search.

  #### Declaration

  Swift

      var textQuery: String { get }

  Objective-C

      @property (nonatomic, copy, readonly) NSString *_Nonnull textQuery;

- `


  ### [locationBias](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)locationBias)


  ` The biased region to search.

  <br />

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

  <br />

  A locationRestriction or a locationBias must be set when performing a search request.

  If set along with locationRestriction, this will be ignored.

  #### Declaration

  Swift

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

  Objective-C

      @property (nonatomic, nullable) id<https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Protocols/GMSPlaceLocationBias.html> locationBias;

- `


  ### [locationRestriction](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)locationRestriction)


  ` The restricted region to search.

  <br />

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

  <br />

  A locationRestriction or a locationBias must be set when performing a search request.

  Cannot be used with locationBias.

  The locationRestriction for text search only supports `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Functions/GMSPlaceRectangularLocationOption.html`.

  #### Declaration

  Swift

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

  Objective-C

      @property (nonatomic, nullable) id<https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Protocols/GMSPlaceLocationRestriction.html> locationRestriction;

- `


  ### [shouldIncludePureServiceAreaBusinesses](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)shouldIncludePureServiceAreaBusinesses)


  ` Whether pure service area businesses should be included in the results.

  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. Places will not
  return fields including `location`, `plusCode`, and other location related
  fields for these businesses.

  Default value is false.

  #### Declaration

  Swift

      var shouldIncludePureServiceAreaBusinesses: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL shouldIncludePureServiceAreaBusinesses;

- `


  ### [evSearchOptions](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)evSearchOptions)


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

  #### Declaration

  Swift

      var evSearchOptions: https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceEVSearchOptions.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceEVSearchOptions.html *evSearchOptions;

- `


  ### [routingParameters](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)routingParameters)


  ` Additional parameters for routing to results.

  #### Declaration

  Swift

      var routingParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceRoutingParameters.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceRoutingParameters.html *routingParameters;

- `


  ### [searchAlongRouteParameters](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)searchAlongRouteParameters)


  ` Additional parameters for search along a route.

  #### Declaration

  Swift

      var searchAlongRouteParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchAlongRouteParameters.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchAlongRouteParameters.html *searchAlongRouteParameters;

- `


  ### [shouldIncludeRoutingSummaries](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)shouldIncludeRoutingSummaries)


  ` Whether results should contain routing summaries, default is false. To have routing summaries
  included in the result, `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceRoutingParameters.html#/c:objc(cs)GMSPlaceRoutingParameters(py)origin` must be set.

  #### Declaration

  Swift

      var shouldIncludeRoutingSummaries: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL shouldIncludeRoutingSummaries;

- `


  ### [shouldIncludeSearchURL](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchByTextRequest#/c:objc(cs)GMSPlaceSearchByTextRequest(py)shouldIncludeSearchURL)


  ` Whether results should contain Search URL, default is false.

  #### Declaration

  Swift

      var shouldIncludeSearchURL: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL shouldIncludeSearchURL;