# Kwai Search

Keyword video search on Kwai. Search returns twelve videos per page; page through results with the page parameter.

- **Documentation:** [https://scrappa.co/docs/kwai-api/kwai_search](https://scrappa.co/docs/kwai-api/kwai_search)
- **API group:** Kwai API
- **Endpoint:** `GET https://scrappa.co/api/kwai/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | Search query. |
| `page` | integer | No | Page number, 1-based. Default: 1. |

## Example response

```json
{
    "meta": {
        "attempts": 1,
        "billable": true,
        "duration_ms": 2100
    },
    "page": 1,
    "query": "beach",
    "results": [
        {
            "caption": "Beach day",
            "video_id": "3xk9qz2abcde",
            "viewCount": 44210
        }
    ],
    "success": true,
    "page_size": 12,
    "results_count": 1
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 502 | Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |
| 404 | Not Found | Kwai has no public data for this identifier. A not-found is a completed lookup that was not billed. |
| 404 | Profile Not Found | Kwai has no public profile for this handle. A not-found is a completed lookup that was not billed. |
| 422 | Upstream Rejected The Request | Kwai rejected the request body as malformed. Retrying will not change the outcome, so the request is sent once and is not billed. |
| 422 | Validation Error | A required parameter is missing or malformed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
