> For the complete documentation index, see [llms.txt](https://developers.accesstrade.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.accesstrade.vn/api-publisher-vietnamese/tich-hop-api-publisher-at-cho-chien-dich-tiktok-shop/version-1/tiktok-product-search-v1.md).

# Tiktok product search-v1

#### GET - Tiktok product search

<https://api.accesstrade.vn/v1/tiktokshop\\_product\\_feeds?sort\\_field=units\\_sold\\&limit=20\\&title\\_keywords=Khăn> giấy \&title\_keywords=Khăn ướt

#### Tiktok product search

This endpoint retrieves TikTok shop product feeds with the option to sort by units sold, limit the number of results, and filter by title keywords.

**Parameters**

* `sort_field` (query parameter, required): Specifies the field to sort the results by.
  * `commission` : hoa hồng
  * `units_sold`: số lượng bán
  * `product_sales_price`: giá bán
  * `commission_rate`: Tỉ lệ hoa hồng
* `limit` (query parameter, required): Limits the number of results to be returned. In this example, the value is `20`.
* `title_keywords` (query parameter, required): Filters the results by title keywords. In this example, the values are `Khăn giấy` and `Khăn ướt`.

**Response**

Upon a successful request, the server returns a JSON object with the following structure:

```json
{
    "data": {
        "next_page_token": "",
        "products": [
            {
                "category_chains": [
                    {
                        "id": "",
                        "is_leaf": true,
                        "local_name": "",
                        "parent_id": ""
                    }
                ],
                "commission": {
                    "amount": "",
                    "currency": "",
                    "rate": 0
                },
                "detail_link": "",
                "has_inventory": true,
                "id": "",
                "main_image_url": "",
                "original_price": {
                    "currency": "",
                    "maximum_amount": "",
                    "minimum_amount": ""
                },
                "sale_region": "",
                "sales_price": {
                    "currency": "",
                    "maximum_amount": "",
                    "minimum_amount": ""
                },
                "shop": {
                    "name": ""
                },
                "title": "",
                "units_sold": 0
            }
        ],
        "total_count": 0
    },
    "status": true
}
```

The `data` object contains the retrieved product feeds, including the `products` array, which holds the details of each product. The `total_count` indicates the total number of products available.

```
data
├── products: []
│   └── object (A list of products.)
├── shop: object
│   ├── name: string (The TikTok Shop name.)
│   └── id: string (The product identifier.)
├── has_inventory: bool (Set to true if there are more than zero units of the product in inventory. Set to false if there are zero units in inventory.)
├── units_sold: int (Total number of units sold. Units are indexed to SKU. Note that if the creator has not given permission for precise data sharing, this property will not be present.)
├── title: string (The product name.)
├── sale_region: string (The region where the product is offered for sale.)
├── main_image_url: string (The product image URL.)
├── detail_link: string (The URL for the product's detail page.)
├── original_price: object
│   ├── currency: string (The currency code.)
│   ├── minimum_amount: string (The lowest original price of all SKUs of the product.)
│   └── maximum_amount: string (The highest original price of all SKUs of the product.)
├── category_chains: []
│   └── object (A list of categories associated with the product. Maximum length of the list is 3 categories.)
│       ├── id: string (The category identifier.)
│       ├── local_name: string (The name of the product in the category.)
│       ├── is_leaf: bool (Set to true if this category is a leaf node. Set to false if not.)
│       └── parent_id: string (The category identifier of the parent category.)
├── commission: object
│   ├── rate: int (The commission rate in hundredths of a percent. For example, 3587 is a commission rate of 35.87%. This value must a minimum of 1000. The range of this value is [100, 8000].)
│   ├── currency: string (The currency code.)
│   └── amount: string (The commission amount.)
├── sales_price: object
│   ├── currency: string (The currency code.)
│   ├── minimum_amount: string (The lowest promotion price of all SKUs of this product.)
│   └── maximum_amount: string (The highest promotion price of all SKUs of this product.)
├── next_page_token: string (An opaque token used to retrieve the next page of a paginated result set.)
└── total_count: int (Total count of products meeting the search criteria expressed in the request body.)
```

**Example**

```http
GET https://api-v1.dev.accesstrade.me/v1/tiktokshop_product_feeds?sort_field=units_sold&limit=20&title_keywords=Khăn giấy &title_keywords=Khăn ướt
```

| **Tên Header**     | **Giá trị**                                                                                                             |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| accept             | application/json, text/plain, */*                                                                                       |
| accept-language    | en-US,en;q=0.6                                                                                                          |
| authorization      | Token xxxx (Token của user lấy tại <https://pub2.accesstrade.vn/profile/api_key>)                                       |
| content-type       | application/json                                                                                                        |
| origin             | [https://pub2.accesstrade.vn](https://pub2.accesstrade.vn/)                                                             |
| priority           | u=1, i                                                                                                                  |
| referer            | <https://pub2.accesstrade.vn/>                                                                                          |
| sec-ch-ua          | "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"                                                               |
| sec-ch-ua-mobile   | ?0                                                                                                                      |
| sec-ch-ua-platform | "macOS"                                                                                                                 |
| sec-fetch-dest     | empty                                                                                                                   |
| sec-fetch-mode     | cors                                                                                                                    |
| sec-fetch-site     | same-site                                                                                                               |
| sec-gpc            | 1                                                                                                                       |
| user-agent         | Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 |

| **Tên Tham Số (Param)** | **Giá Trị** | **Ghi Chú**                                                                                                             |
| ----------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| sort\_field             | units\_sold | - `commission`: hoa hồng- `units_sold`: số lượng bán- `product_sales_price`: giá bán- `commission_rate`: Tỉ lệ hoa hồng |
| limit                   | 20          | Số lượng kết quả trả về                                                                                                 |
| title\_keywords         | Khăn giấy   | Từ khóa tìm kiếm sản phẩm                                                                                               |
| title\_keywords         | Khăn ướt    | Có thể gửi nhiều `title_keywords`                                                                                       |
| page\_token             |             | Token của trang tiếp theo, lấy từ trường `"next_page_token"` trong response                                             |
