{
  "openapi": "3.0.1",
  "info": {
    "title": "Kwai Scraper - Videos, Creators, Hashtags & API",
    "description": "Scrape Kwai videos by keyword, hashtag or creator catalogue, plus full video detail and creator profiles. 40+ fields per video: views, likes, shares, MP4 links, music, creator stats. Date and view filters, only-new mode for schedules, and a REST API with instant JSON. No login. Pay per result.",
    "version": "1.0",
    "x-build-id": "02nZw7RjkIiqzNsiD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unfenced-group~kwai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unfenced-group-kwai-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/unfenced-group~kwai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unfenced-group-kwai-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/unfenced-group~kwai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unfenced-group-kwai-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Kwai. Each returns matching videos with full engagement metrics. Supports English, Portuguese, Spanish, Arabic, and other languages. Kwai's own search ends at roughly 20 videos per keyword; use hashtags for larger sets.",
            "items": {
              "type": "string"
            }
          },
          "expandSearchWithHashtag": {
            "title": "Fill search with the matching hashtag",
            "type": "boolean",
            "description": "Kwai's keyword search ends at about 20 videos. When on, each search term is topped up with the videos of the hashtag of the same word (spaces removed, e.g. 'comida árabe' becomes #comidaárabe) until 'Max videos' is reached. Videos already returned by the search are not repeated. Those rows carry both sourceKeyword and sourceHashtag.",
            "default": false
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags with or without #, e.g. futebol or #receita. Each returns the videos posted under that hashtag, in Kwai's relevance order, up to 'Max videos'. Hashtag feeds go far deeper than keyword search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Kwai URLs",
            "type": "array",
            "description": "Any Kwai link: video URLs (https://www.kwai.com/@handle/video/123...) return full video detail; profile URLs (https://www.kwai.com/@handle) return the creator's profile, plus their videos when 'Include creator videos' is on; hashtag URLs (https://www.kwai.com/topic/futebol) return that hashtag's videos; app share links (https://k.kwai.com/p/...) work too. Accepts plain URL strings or {\"url\": \"...\"} objects.",
            "default": []
          },
          "profileHandles": {
            "title": "Creator handles",
            "type": "array",
            "description": "Creator handles without the full URL, e.g. jadebelchior905 or @jadebelchior905. Each returns the creator's profile, plus their videos when 'Include creator videos' is on.",
            "items": {
              "type": "string"
            }
          },
          "includeProfileVideos": {
            "title": "Include creator videos",
            "type": "boolean",
            "description": "Also return each creator's videos, newest first, up to 'Max videos' per creator. Off: only the profile record is returned.",
            "default": false
          },
          "videoIds": {
            "title": "Video IDs",
            "type": "array",
            "description": "Raw numeric Kwai video IDs (photo_id). Each returns full video detail. An alternative to pasting full URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max videos per search term, hashtag or creator",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum videos returned for each search term, hashtag and creator. Also your spending cap per entry. Set to 0 for no limit. Video URLs and IDs are always returned in full and do not count against it.",
            "default": 20
          },
          "postedAfter": {
            "title": "Only videos posted after",
            "type": "string",
            "description": "Only return search, hashtag and creator videos posted on or after this date, e.g. 2026-09-01. Leave empty for any date. Videos left out are not charged."
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Only return search, hashtag and creator videos with at least this many views. Leave empty for no minimum. Videos left out are not charged."
          },
          "onlyNewVideos": {
            "title": "Only new videos (for scheduled runs)",
            "type": "boolean",
            "description": "Remember the videos already delivered for each search term, hashtag and creator, and return only videos not delivered before. The history is kept in the key-value store 'kwai-scraper-seen-videos' in your own account; delete it to start over. Video URLs and IDs are always returned.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}