# TikTok Made Me Buy It List API

## API Information

- **API Name**: Get TikTok Made Me Buy It List
- **Request Method**: POST
- **API URL**: `/open-api/v1/data`
- **Interface URI path**: `/v4/api/open/video/list`
- **Description**: Get video natural traffic list information based on filter conditions with pagination support
- **Pricing**: Retrieving one data result consumes 1 credit

**Request Headers:**

- Content-Type: application/json
- Accept: application/json

## Request Parameters

### Request Structure

| Parameter Name | Type   | Description                     | Example                   | Required | Default |
| -------------- | ------ | ------------------------------- | ------------------------- | -------- | ------- |
| key            | string | User's external API request key | "your_api_key_here"       | Yes      |         |
| uri            | string | Interface URI path              | "/v4/api/open/video/list" | Yes      |         |
| params         | object | Interface parameter object      | See parameter list below  | Yes      |         |

### Request Body Parameters (params object)

| Parameter Name     | Type    | Required | Description                                                                                                                                                                              |
| ------------------ | ------- | -------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| search_type        | Integer | No       | Search type: 1-General (default), 2-Video caption, 3-Video host name, 4-Video link                                                                                                       |
| keyword            | String  | No       | Search keyword, fuzzy match in different fields according to search_type                                                                                                                 |
| type               | Integer | No       | Video type: 1-TikTok Made Me Buy It, 2-TikTok Shop                                                                                                                                       |
| region             | Array   | No       | Country/Region, Region list, supports multiple regions, e.g. ["US", "CN", "JP"]                                                                                                          |
| create_time_start  | Long    | No       | Time, Video creation start timestamp (seconds), filter videos created after this time                                                                                                    |
| create_time_end    | Long    | No       | Time, Video creation end timestamp (seconds), filter videos created before this time                                                                                                     |
| follower_count_min | Long    | No       | Followers, Minimum video host followers, filter videos by hosts with followers >= this value                                                                                             |
| follower_count_max | Long    | No       | Followers, Maximum video host followers, filter videos by hosts with followers <= this value                                                                                             |
| play_count_min     | Long    | No       | Views, Minimum play count, filter videos with play count >= this value                                                                                                                   |
| play_count_max     | Long    | No       | Views, Maximum play count, filter videos with play count <= this value                                                                                                                   |
| digg_count_min     | Long    | No       | Likes, Minimum like count, filter videos with like count >= this value                                                                                                                   |
| digg_count_max     | Long    | No       | Likes, Maximum like count, filter videos with like count <= this value                                                                                                                   |
| digg_play_rate_min | Double  | No       | Like Rate, Minimum like/play rate, filter videos with like/play rate >= this value (likes/plays)                                                                                         |
| digg_play_rate_max | Double  | No       | Like Rate, Maximum like/play rate, filter videos with like/play rate <= this value (likes/plays)                                                                                         |
| comment_count_min  | Long    | No       | Comments, Minimum comment count, filter videos with comment count >= this value                                                                                                          |
| comment_count_max  | Long    | No       | Comments, Maximum comment count, filter videos with comment count <= this value                                                                                                          |
| share_count_min    | Long    | No       | Shares, Minimum share count, filter videos with share count >= this value                                                                                                                |
| share_count_max    | Long    | No       | Shares, Maximum share count, filter videos with share count <= this value                                                                                                                |
| current_page       | Integer | Yes      | Current page number, starting from 1, for pagination                                                                                                                                     |
| page_size          | Integer | Yes      | Page size, number of videos per page                                                                                                                                                     |
| sort_key           | String  | No       | Sort field: create_time (creation time), play_count (plays), digg_count (likes), comment_count (comments), share_count (shares), digg_play_rate (like/play rate), default is create_time |
| sort_type          | String  | No       | Sort type: asc-ascending, desc-descending (default)                                                                                                                                      |
| platform           | String  | No       | Platform type, filter by specific platform landing page, e.g. shopify、woocommerce、shoplazza、magento、wix、shopline、squarespace、shopyy                                                            |

### Request Example

```bash
curl -X POST "https://www.pipispy.com/open-api/v1/data" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "key": "your_api_key_here",
    "uri": "/v4/api/open/video/list",
    "params": {
      "search_type": 1,
      "keyword": "fashion",
      "type": 1,
      "region": ["US", "CA"],
      "create_time_start": 1640995200,
      "create_time_end": 1643673600,
      "follower_count_min": 10000,
      "follower_count_max": 1000000,
      "play_count_min": 1000,
      "play_count_max": 1000000,
      "digg_count_min": 100,
      "digg_count_max": 50000,
      "digg_play_rate_min": 0.01,
      "digg_play_rate_max": 0.1,
      "comment_count_min": 10,
      "comment_count_max": 1000,
      "share_count_min": 5,
      "share_count_max": 500,
      "current_page": 1,
      "page_size": 20,
      "sort_key": "play_count",
      "sort_type": "desc",
      "platform": "tiktok_shop"
    }
  }'
```

## Response Parameters

### Response Body Structure

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "data": [],
    "page": {}
  }
}
```

### Response Field Description

| Field Name | Type    | Description                             |
| ---------- | ------- | --------------------------------------- |
| code       | Integer | Response status code, 200 means success |
| message    | String  | Response message                        |
| data       | Object  | Response data                           |
| data.data  | Array   | Video list                              |
| data.page  | Object  | Pagination info                         |

### Video Information Fields

| Field Name     | Type    | Description                                     |
| -------------- | ------- | ----------------------------------------------- |
| id             | String  | Video unique ID                                 |
| video_url      | String  | Video play URL, full video play link            |
| cover          | String  | Video cover image URL                           |
| duration       | Integer | Video duration (seconds)                        |
| play_count     | Long    | Play count                                      |
| digg_count     | Long    | Like count                                      |
| comment_count  | Long    | Comment count                                   |
| share_count    | Long    | Share count                                     |
| create_time    | Long    | Video creation timestamp (seconds)              |
| desc           | String  | Video caption/description                       |
| app_image      | String  | Video host avatar URL                           |
| nickname       | String  | Video host nickname                             |
| follower_count | Long    | Video host follower count                       |
| fetch_region   | String  | Data fetch region                               |
| author_url     | String  | Video host TikTok homepage URL                  |
| landing_page   | Array   | Landing page info list                          |
| products       | Array   | Product info list                               |
| review_count   | Long    | Total review count (including replies)          |
| tiktok_url     | String  | TikTok video link                               |
| is_collection  | Boolean | Whether collected by current user               |
| type           | Integer | Video type, 1-normal, others-special            |
| carousel       | Array   | Carousel image list                             |
| shop_flag      | Integer | Shop flag, 1-normal, 2-e-commerce (tiktok_shop) |

### Product Information Fields (products array)

| Field Name | Type   | Description                  |
| ---------- | ------ | ---------------------------- |
| image      | String | Product image URL            |
| name       | String | Product name                 |
| currency   | String | Currency type, e.g. USD, CNY |
| price      | Double | Product price                |
| url        | String | Product purchase link        |

### Landing Page Information Fields (landing_page array)

| Field Name | Type   | Description                         |
| ---------- | ------ | ----------------------------------- |
| type       | String | Landing page type, e.g. tiktok_shop |
| url        | String | Landing page URL                    |

### Carousel Information Fields (carousel array)

| Field Name | Type    | Description            |
| ---------- | ------- | ---------------------- |
| type       | Integer | Carousel type, 2-image |
| image      | String  | Carousel image URL     |

### Pagination Information Fields

| Field Name   | Type    | Description           |
| ------------ | ------- | --------------------- |
| total_count  | Long    | Total record count    |
| page_count   | Long    | Total page count      |
| current_page | Long    | Current page number   |
| page_size    | Long    | Records per page      |
| is_next      | Boolean | Whether has next page |

## Response Example

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "data": [
      {
        "id": "507f1f77bcf86cd799439011",
        "video_url": "https://example.com/video.mp4",
        "cover": "https://example.com/cover.jpg",
        "duration": 30,
        "play_count": 500000,
        "digg_count": 25000,
        "comment_count": 1200,
        "share_count": 800,
        "create_time": 1640995200,
        "desc": "Fashion outfit sharing, great style recommendations",
        "app_image": "https://example.com/avatar.jpg",
        "nickname": "Fashion Expert",
        "follower_count": 500000,
        "fetch_region": "US",
        "author_url": "https://www.tiktok.com/@fashion_expert",
        "landing_page": [
          {
            "type": "tiktok_shop",
            "url": "https://shop.tiktok.com/product/123"
          }
        ],
        "products": [
          {
            "image": "https://example.com/product.jpg",
            "name": "Fashion Sneakers",
            "currency": "USD",
            "price": 99.99,
            "url": "https://shop.tiktok.com/product/123"
          }
        ],
        "review_count": 1500,
        "tiktok_url": "https://www.tiktok.com/@fashion_expert/video/507f1f77bcf86cd799439011",
        "is_collection": false,
        "type": 1,
        "carousel": [
          {
            "type": 2,
            "image": "https://example.com/carousel1.jpg"
          }
        ],
        "shop_flag": 2
      }
    ],
    "page": {
      "total_count": 1250,
      "page_count": 63,
      "current_page": 1,
      "page_size": 20,
      "is_next": true
    }
  }
}
```

## Error Code Description

| Error Code | Description             |
| ---------- | ----------------------- |
| 200        | Success                 |
| 400        | Request parameter error |
| 500        | Server internal error   |

## Notes

1. Page number starts from 1
2. Sort fields support: create_time, play_count, digg_count, comment_count, share_count, digg_play_rate
3. Search type supports 4 modes, default is general search
4. Timestamps are in seconds
5. Region parameter supports multiple regions as array
6. Like/play rate is likes divided by plays
7. Video type 1 is natural traffic, 2 is e-commerce
8. Shop flag 1 is normal video, 2 is e-commerce video
