# Search ## Query `search.query(SearchQueryParams**kwargs) -> SearchQueryResponse` **get** `/search` Returns a list of search index hits from query ### Parameters - **query:** `str` Search query used to retrieve relevant results from index. You may also include search operators to refine your search. - **country:** `Literal["AR", "AU", "AT", 33 more]` Country Code - `"AR"` - `"AU"` - `"AT"` - `"BE"` - `"BR"` - `"CA"` - `"CL"` - `"DK"` - `"FI"` - `"FR"` - `"DE"` - `"HK"` - `"IN"` - `"ID"` - `"IT"` - `"JP"` - `"KR"` - `"MY"` - `"MX"` - `"NL"` - `"NZ"` - `"NO"` - `"CN"` - `"PL"` - `"PT"` - `"PH"` - `"RU"` - `"SA"` - `"ZA"` - `"ES"` - `"SE"` - `"CH"` - `"TW"` - `"TR"` - `"GB"` - `"US"` - **freshness:** `Literal["day", "week", "month", "year"]` Specifies the freshness of the results to return. - `"day"` - `"week"` - `"month"` - `"year"` - **num\_web\_results:** `int` Specifies the maximum number of web results to return. Range `1 ≤ num_web_results ≤ 20`. - **offset:** `int` Indicates the `offset` for pagination. The `offset` is calculated in multiples of `num_web_results`. For example, if `num_web_results = 5` and `offset = 1`, results 5–10 will be returned. Range `0 ≤ offset ≤ 9`. - **safesearch:** `Literal["off", "moderate", "strict"]` Configures the safesearch filter for content moderation. `off` - no filtering applied. `moderate` - moderate content filtering (default). `strict` - strict content filtering. - `"off"` - `"moderate"` - `"strict"` ### Returns - `class SearchQueryResponse` - **hits:** `List[Hit]` - **description:** `str` A brief description of the content of the search result - **title:** `str` The title or name of the search result - **url:** `str` The URL of the specific search result - **favicon\_url:** `Optional[str]` The URL of the favicon of the search result's domain - **snippets:** `Optional[List[str]]` An array of text snippets from the search result, providing a preview of the content - **thumbnail\_url:** `Optional[str]` URL of the thumbnail - **latency:** `float` Indicates the time (in seconds) taken by the API to generate the response ### Example ```python from you_api import YouAPI client = YouAPI( api_key="My API Key", ) response = client.search.query( query="query", ) print(response.hits) ```