{
  "openapi": "3.0.1",
  "info": {
    "title": "Kwai Scraper — Videos, Profiles & Keyword Discovery",
    "description": "Export public international Kwai videos from direct URLs and creator feeds with available pagination, plus first-response keyword discovery snapshots. Get captions, authors and engagement via efficient HTTP.",
    "version": "1.0",
    "x-build-id": "y9Uifl2IfvSdVL4HP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/funny_ground~kwai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-funny_ground-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/funny_ground~kwai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-funny_ground-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/funny_ground~kwai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-funny_ground-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": {
          "videoUrls": {
            "title": "Direct Kwai video URLs",
            "type": "array",
            "description": "HTTPS kwai.com/@handle/video/ID URLs. Only the exact requested ID is returned, never recommendations. Up to 100 entries.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "profiles": {
            "title": "Kwai creator profiles",
            "type": "array",
            "description": "Public Kwai handles or https://www.kwai.com/@handle URLs. Feed rows, not standalone profile reports. Public cursor pagination only; no complete-history guarantee. Up to 100 entries.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchKeywords": {
            "title": "Keyword discovery snapshots",
            "type": "array",
            "description": "Public keyword-related discovery results, not guaranteed live search. At most the first API response (up to 20 items), or small embedded HTML snapshot. No search pagination. Up to 100 keywords, 120 characters each.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "startUrls": {
            "title": "Mixed public Kwai URLs",
            "type": "array",
            "description": "Supported routes: /@handle, /@handle/video/ID, /search/keyword/video/ID and /discover/keyword. Only HTTPS kwai.com/www.kwai.com; short links and arbitrary routes are not supported. Up to 100 entries.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "resultsPerInput": {
            "title": "Results per profile / keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound, not a promised count. Direct URLs return one video. Keyword snapshots still stop at the first response (up to 20 items), irrespective of a higher requested count.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum total saved videos",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Global unique-video output cap across all inputs; remaining charge/platform budgets and confirmed Free-plan cap50 can lower it.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Concurrent inputs",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of independent targets fetched concurrently. Profile cursor pages stay sequential; dataset writes are serialized batches of up to20.",
            "default": 4
          },
          "failOnPartialFailure": {
            "title": "Fail on any empty / failed input",
            "type": "boolean",
            "description": "Default false: valid rows remain successful with warnings when another target is empty, blocked or missing. Zero saved rows always fail. Saved rows remain billable even if strict mode fails the run.",
            "default": false
          },
          "proxy": {
            "title": "Optional explicitly configured proxy",
            "type": "object",
            "description": "Omitted/disabled means direct HTTP: no proxy purchase. If enabled, your proxy choice is used; Apify proxy traffic may cost extra. No automatic residential upgrade. No Kwai login cookies/credentials accepted.",
            "default": {
              "useApifyProxy": false
            }
          },
          "requestTimeoutSecs": {
            "title": "HTTP request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for one logical HTTP attempt, including its bounded redirects and response streaming.",
            "default": 20
          },
          "maxRetries": {
            "title": "Retries for HTTP 429 / 5xx",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Bounded backoff only for HTTP 429 or server errors; never retry private/login blocks or transport errors.",
            "default": 1
          },
          "maxPagesPerInput": {
            "title": "Maximum public profile pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Includes initial HTML page and subsequent cursor API requests. Keyword discovery remains single-response; one HTML fallback may be attempted after a failed API call.",
            "default": 10
          },
          "maxRequests": {
            "title": "Maximum total HTTP requests",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Includes redirects, retries and fallback calls.",
            "default": 200
          },
          "maxRunTimeSecs": {
            "title": "Wall-time budget (seconds)",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Collection wall-time budget, additionally shortened to finish before the platform run deadline. Already fetched rows can still be saved within output/charge budgets.",
            "default": 180
          },
          "maxResponseBytes": {
            "title": "Maximum bytes per response",
            "minimum": 65536,
            "maximum": 2097152,
            "type": "integer",
            "description": "Limits streamed decoded HTML/JSON. Images and video files are not fetched.",
            "default": 1048576
          },
          "maxTotalResponseBytes": {
            "title": "Maximum response bytes per run",
            "minimum": 65536,
            "maximum": 134217728,
            "type": "integer",
            "description": "Global decoded HTML/JSON response-byte cap, including retries and all inputs. No image/video files are fetched.",
            "default": 33554432
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}