# Kwai Topic

Videos published under a Kwai topic or hashtag. Spaces in the topic name are normalised to hyphens.

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

## 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 |
| --- | --- | --- | --- |
| `name` | string | Yes | Topic slug, for example travel. |
| `pcursor` | string | No | Cursor from the previous response (next_cursor). |
| `count` | integer | No | Requested number of videos, 1 to 50. Default: 25. |

## Example response

```json
{
    "meta": {
        "attempts": 1,
        "billable": true,
        "duration_ms": 1610
    },
    "topic": "travel",
    "videos": [
        {
            "caption": "Travel diary",
            "video_id": "3xk9qz2abcde"
        }
    ],
    "success": true,
    "has_more": true,
    "next_cursor": "travel:25",
    "video_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)
