# Search ## Query `client.search.query(SearchQueryParamsquery, RequestOptionsoptions?): SearchQueryResponse` **get** `/search` Returns a list of search index hits from query ### Parameters - **query:** `SearchQueryParams` - **query:** `string` Search query used to retrieve relevant results from index. You may also include search operators to refine your search. - **country:** `"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:** `"day" | "week" | "month" | "year"` Specifies the freshness of the results to return. - `"day"` - `"week"` - `"month"` - `"year"` - **num\_web\_results:** `number` Specifies the maximum number of web results to return. Range `1 ≤ num_web_results ≤ 20`. - **offset:** `number` 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:** `"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 - `SearchQueryResponse` - **hits:** `Array` - **description:** `string` A brief description of the content of the search result - **title:** `string` The title or name of the search result - **url:** `string` The URL of the specific search result - **favicon\_url:** `string` The URL of the favicon of the search result's domain - **snippets:** `Array` An array of text snippets from the search result, providing a preview of the content - **thumbnail\_url:** `string` URL of the thumbnail - **latency:** `number` Indicates the time (in seconds) taken by the API to generate the response ### Example ```typescript import YouAPI from 'you-api'; const client = new YouAPI({ apiKey: 'My API Key', }); const response = await client.search.query({ query: 'query' }); console.log(response.hits); ```