## Get Trendings

To get trending searches, call the `getTrendingSearches` method on the
`ContextualSearchRuntime`. This method takes a single
[GetTrendingSearchesOptions](https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/GetTrendingSearchesOptions)
where you can specify the maximum number of trendings returned.

The returned `SearchSuggestions` object does not contain any accessible
properties. It contains all of the necessary information to render trending
searches, but otherwise is opaque.

Swift uses the Swift Concurrency style, Objective-C uses a callback function.

### Swift

[getTrendingSearches(withOptions:)](https://developers.google.com/search-in-apps/ios/reference/api/swift_reference/Classes/ContextualSearchRuntime#gettrendingsearcheswithoptions:)

    Task {
        let suggestions = try await searchRuntime.getTrendingSearches(
                withOptions: GetTrendingSearchesOptions())
    }

### Objective-C

[getTrendingSearchesWithOptions](https://developers.google.com/search-in-apps/ios/reference/api/objc_reference/Classes/ContextualSearchRuntime#-gettrendingsearcheswithoptions:completionhandler:)

      [searchRuntime
          getTrendingSearchesWithOptions:
                [[GetTrendingSearchesOptions alloc] init]
                                 completionHandler:^(SearchSuggestions *_Nullable suggestions,
                                                     NSError *_Nullable error) {
                                  // error will be not null if there is an error.
                                  // On success, suggestions will be non null.
                                }];

## Display

To display trending searches chips, use the same [way](https://developers.google.com/search-in-apps/ios/search_suggestions#display)
as the search suggestions.

[Next: Display search results](https://developers.google.com/search-in-apps/ios/display_search_results)