# SearchInAppsSDK Framework Reference

# ContextualSearchRuntime

    @objc
    final class ContextualSearchRuntime

Runtime for issuing contextual search requests.

The runtime can be reused across the app after it is initialized.
- `


  ### [getSearchContent(withOptions:)](https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/ContextualSearchRuntime#/c:@M@SearchInAppsSDK@objc(cs)ContextualSearchRuntime(im)getSearchContentWithOptions:completionHandler:)


  ` Gets search content.

  #### Declaration

  Swift

      @available(iOS, introduced: 14)
      @objc
      final func getSearchContent(withOptions options: https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/GetSearchContentOptions.html) async throws -> https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/SearchContents.html

  #### Parameters

  |---|---|
  | ` withOptions ` | The input options used to generate search content. |

- `


  ### [getSearchSuggestions(withOptions:)](https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/ContextualSearchRuntime#/c:@M@SearchInAppsSDK@objc(cs)ContextualSearchRuntime(im)getSearchSuggestionsWithOptions:completionHandler:)


  ` Gets search suggestions.

  #### Declaration

  Swift

      @available(iOS, introduced: 14)
      @objc
      final func getSearchSuggestions(withOptions getSearchSuggestionsOptions: https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/GetSearchSuggestionsOptions.html) async throws -> https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes.html#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestions

  #### Parameters

  |---|---|
  | ` withOptions ` | The input options used to generate search suggestions. |

- `


  ### [getTrendingSearches(withOptions:)](https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/ContextualSearchRuntime#/c:@M@SearchInAppsSDK@objc(cs)ContextualSearchRuntime(im)getTrendingSearchesWithOptions:completionHandler:)


  ` Gets trending searches.

  #### Declaration

  Swift

      @available(iOS, introduced: 14)
      @objc
      final func getTrendingSearches(withOptions getTrendingSearchesOptions: https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/GetTrendingSearchesOptions.html? = https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/GetTrendingSearchesOptions.html()) async throws -> https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes.html#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestions

  #### Parameters

  |---|---|
  | ` withOptions ` | The input options used to generate trending searches. |

- `


  ### [init()](https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/ContextualSearchRuntime#/c:@M@SearchInAppsSDK@objc(cs)ContextualSearchRuntime(im)init)


  ` Creates a new Search Runtime.

  The Search Runtime can be created at app startup and only needs to be
  created once. It can be reused throuhgout the app's lifecycle.

  #### Declaration

  Swift

      override dynamic convenience init()