**Version: 202701**

# Get data analysis by search keyword

**POST** `/openapi/2027-01/data-analysis/search-keyword`

Retrieve on-site search analytics grouped by search keyword, including the number of searches, the number of searching users, whether the search returned results, and the click-through rate.

## Request

**application/json**

**Body | Example**

**Body (required)**

- `begin_time` string (required)

  Start time, a Unix timestamp in seconds passed as a string, e.g. "1748736000"
- `end_time` string (required)

  End time, a Unix timestamp in seconds passed as a string, e.g. "1781481600". Should be greater than begin\_time
- `time_zone` int32

  Notice: Values outside the range -12 to 14 might lead to unexpected results in time-based calculations. Time zone offset (in hours) used for analysis. Recommended range: -12 to 14
- `cursor` string

  Cursor for pagination
- `page_size` int32

  Page size for pagination

  **Default value:** `10`
- `keyword` string

  Fuzzy match on the search keyword
- `sort_by` string

  Field to sort by. Supported values:

  *   `count`: Number of searches
  *   `percent`: Share of all searches
  *   `uv`: Number of searching users
  *   `has_result`: Whether the search returned results
  *   `click_rate`: Search click-through rate
- `sort_direction` string

  Sorting direction: asc (ascending) or desc (descending). Defaults to desc
- `has_result` string

  Filter by whether the search returned results: `1` with results, `0` without results. Defaults to no filtering
- `country_code` string

  Filter by the visitor's country/region code, e.g. "US"
- `filter_crawler_type` string

  Crawler-filtering policy that controls whether bot/crawler traffic is excluded from the statistics. Values:

  *   `no_filter_crawler`: do not filter; count all traffic (default)
  *   `official_crawler`: exclude known crawlers/bots

```json
{
  "begin_time": "string",
  "end_time": "string",
  "time_zone": 0,
  "cursor": "string",
  "page_size": 10,
  "keyword": "string",
  "sort_by": "string",
  "sort_direction": "string",
  "has_result": "string",
  "country_code": "string",
  "filter_crawler_type": "string"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `count` int32

    Total number of matching search keywords
  - `cursor` string

    Cursor for pagination
  - `has_more` boolean

    Whether there are more records
  - `data` object[]

    List of search keyword report rows

    *   Array \[

    - `item` string

      The search keyword, e.g. "shoes"
    - `count` int64

      Number of searches for this keyword
    - `percent` double

      Share of this keyword in all searches, in percent, e.g. 12.34 (represents 12.34%)
    - `uv` int64

      Number of users who searched for this keyword, deduplicated by IP
    - `has_result` int32

      Whether the search returned results: 1 yes, 0 no. A keyword with no results but with click-through is counted as 1
    - `click_rate` double

      Search click-through rate, in percent (0 ~ 100), e.g. 35.71 (represents 35.71%)
    *   \]

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "count": 0,
    "cursor": "string",
    "has_more": true,
    "data": [
      {
        "item": "string",
        "count": 0,
        "percent": 0,
        "uv": 0,
        "has_result": 0,
        "click_rate": 0
      }
    ]
  }
}
```
