# TikTok Search Suggestions

Get the search suggestions TikTok shows while a user types a query. Each item has the suggestion text, group ID, language and recall reason. Matching creator accounts come as items of type user. Suggestions follow the region of the request, so results can differ between calls. An empty list is a valid answer. Costs 1 credit per request. Failed requests are free.

- **Documentation:** [https://scrappa.co/docs/tiktok/tiktok_search_suggestions](https://scrappa.co/docs/tiktok/tiktok_search_suggestions)
- **API group:** TikTok API
- **Endpoint:** `GET https://scrappa.co/api/tiktok/search/suggestions`

## 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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Search text to get suggestions for (up to 100 characters). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/tiktok/search/suggestions?query=cat"
```

## Example response

```json
{
    "code": 0,
    "query": "cat",
    "suggestions": [
        {
            "type": "query",
            "content": "cat videos",
            "group_id": "7000000000000000001",
            "lang": "en",
            "recall_reason": "hot_search",
            "highlight_pos": [
                {
                    "begin": 0,
                    "end": 3
                }
            ]
        },
        {
            "type": "user",
            "content": "catlover",
            "group_id": null,
            "lang": null,
            "recall_reason": null,
            "highlight_pos": [
                {
                    "begin": 0,
                    "end": 3
                }
            ],
            "unique_id": "catlover",
            "nickname": "Cat Lover",
            "sec_user_id": "MS4wLjABAAAAexample",
            "is_verified": false
        }
    ],
    "request_id": "202611040000000000000000000000000"
}
```

## 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)
