> ## Documentation Index
> Fetch the complete documentation index at: https://lava.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok

> TikTok data via Apify.

TikTok data via Apify. Search videos by keyword, scrape hashtag pages, or extract profile videos, with engagement stats, author info, and music metadata.

1 endpoint available through Lava's AI Gateway. See the [TikTok API docs](https://docs.apify.com/api/v2) for full documentation.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Endpoints

### Search TikTok videos by keyword, scrape hashtag pages, or extract profile data. Returns video metadata, engagement stats (plays, likes, shares, comments), author info, music metadata, and hashtags. Three input modes: `searchQueries: ["keyword"]` for keyword search, `hashtags: ["name"]` for hashtag pages, or `profiles: ["username"]` for a user's videos. Use `resultsPerPage` to cap results. Maintained by Apify. \$1.70 per 1,000 results.

**POST** `https://api.apify.com/v2/acts/clockworks~tiktok-scraper/run-sync-get-dataset-items` — \$0.0425 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.apify.com/v2/acts/clockworks~tiktok-scraper/run-sync-get-dataset-items', { body: {"searchQueries":["cooking"],"resultsPerPage":10} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.apify.com%2Fv2%2Facts%2Fclockworks~tiktok-scraper%2Frun-sync-get-dataset-items" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"searchQueries":["cooking"],"resultsPerPage":10}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
