[Integrations](https://spiral.ai/integrations) › [Grok](https://spiral.ai/integrations/grok) › [TikTok web device ID](https://spiral.ai/integrations/grok/tiktok-web-device-id)

# How to Use TikTok web device ID in Grok

Generates the web ID used as a device identifier in TikTok Web requests. Use it for request development and inspect the returned session ID and error code.

|  |  |
| --- | --- |
| Model | TikTok web device ID |
| Available through | TikHub |
| Category | Social Media |
| Price | $0.0013 per request. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with TikTok web device ID in Grok

- Use TikTok web device ID to look this up and give me the result as a table.
- Pull the latest numbers from TikTok web device ID and tell me what changed since last week.
- Check TikTok web device ID and summarize what you find in three bullet points.
- Pull the newest data from TikTok web device ID and give me the result as a table.
- Check TikTok web device ID every morning and tell me only when something changed.

## How to set up TikTok web device ID in Grok

Pick the way that suits you. Each takes about two minutes.

### Use the Grok connector

1. **Add a custom connector**: In Grok open Settings › Connect Apps, then Add a custom connector. Name it Spiral, paste this URL, leave Headers empty and click Add MCP.

```text
https://api.spiral.ai/mcp
```

2. **Sign in to Spiral and approve**: Grok opens Spiral: sign in, pick the organization and click Authorize. Spiral gives the connection its own API key; Grok never sees it, and you can remove the connection under Settings › Connected apps.

3. **Check that it is connected**: Connect Apps › Custom shows Spiral as Connected. It works in every Grok chat and Grok bot.

### Use the Spiral skill

1. **Send Grok this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run TikTok web device ID**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "tikhub",
    "model": "tikhub/tiktok-web-generate-webid",
    "input": {
      "url": "https://www.tiktok.com/explore"
    }
  }'
```

Then paste one of the prompts above: Grok finds TikTok web device ID on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/grok

## TikTok web device ID tools and prices

- [TikTok Web · Generate web_id](https://spiral.ai/tools/tikhub/tikhub/tiktok-web-generate-webid) (TikHub): $0.0013 per request.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| url |  | https://www.tiktok.com/explore |  |
| app_id |  | 1988 |  |
| cookie |  | — |  |
| referer |  |  |  |
| user_agent |  | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0 |  |
| user_unique_id |  |  |  |

## What can you do with TikTok web device ID in Grok?

Prepare a TikTok brand brief from returned profile information and content lists. A chat app can compare an account's published posts, playlist organization, and reposts, or extract identifiers from links supplied in the brief.

### Create TikTok response fixtures

Collect actual responses for an internal parser test suite: account profiles, content lists, extracted identifiers, generated email hashes, and web device ID responses.

### Debug a TikTok data importer

Inspect the actual response at each failing stage: link resolution, hash generation, web device ID generation, profile retrieval, or content-list retrieval. Use those responses to locate the parser or identifier mismatch.

### Prepare identifiers for request development

Generate email hashes and web device IDs for internal TikTok request experiments. Resolve public profile, video, and LIVE links into the corresponding account, video, and room identifiers.

### Build an internal TikTok identifier inspector

Give developers a place to inspect generated email hashes, web device ID responses, and identifiers extracted from public account, video, or LIVE links.

## Overview

- [TikHub](https://spiral.ai/providers/tikhub)
- [All Grok guides](https://spiral.ai/integrations/grok)

## TikTok web device ID in other agents

- [Amp](https://spiral.ai/integrations/amp/tiktok-web-device-id)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/tiktok-web-device-id)
- [Claude](https://spiral.ai/integrations/claude-desktop/tiktok-web-device-id)
- [Claude Code](https://spiral.ai/integrations/claude-code/tiktok-web-device-id)
- [Cline](https://spiral.ai/integrations/cline/tiktok-web-device-id)
- [Codex](https://spiral.ai/integrations/codex/tiktok-web-device-id)
- [Cursor](https://spiral.ai/integrations/cursor/tiktok-web-device-id)
- [Devin](https://spiral.ai/integrations/devin/tiktok-web-device-id)
- [dots](https://spiral.ai/integrations/dots/tiktok-web-device-id)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/tiktok-web-device-id)
- [Gemini](https://spiral.ai/integrations/gemini/tiktok-web-device-id)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/tiktok-web-device-id)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/tiktok-web-device-id)
- [goose](https://spiral.ai/integrations/goose/tiktok-web-device-id)
- [Grok Build](https://spiral.ai/integrations/grok-build/tiktok-web-device-id)
- [Hermes](https://spiral.ai/integrations/hermes/tiktok-web-device-id)
- [Instinct](https://spiral.ai/integrations/instinct/tiktok-web-device-id)
- [Manus](https://spiral.ai/integrations/manus/tiktok-web-device-id)
- [Muse](https://spiral.ai/integrations/muse/tiktok-web-device-id)
- [Muse Code](https://spiral.ai/integrations/muse-code/tiktok-web-device-id)
- [n8n](https://spiral.ai/integrations/n8n/tiktok-web-device-id)
- [Notion](https://spiral.ai/integrations/notion/tiktok-web-device-id)
- [OpenClaw](https://spiral.ai/integrations/openclaw/tiktok-web-device-id)
- [opencode](https://spiral.ai/integrations/opencode/tiktok-web-device-id)
- [Perplexity](https://spiral.ai/integrations/perplexity/tiktok-web-device-id)
- [Raycast](https://spiral.ai/integrations/raycast/tiktok-web-device-id)
- [VS Code](https://spiral.ai/integrations/vscode/tiktok-web-device-id)
- [Windsurf](https://spiral.ai/integrations/windsurf/tiktok-web-device-id)
- [Zapier](https://spiral.ai/integrations/zapier/tiktok-web-device-id)

## More Grok guides

- [TikTok videos using a sound](https://spiral.ai/integrations/grok/tiktok-videos-using-a-sound)
- [Truth Social account posts](https://spiral.ai/integrations/grok/truth-social-account-posts)
- [TikTok video transcript](https://spiral.ai/integrations/grok/tiktok-video-transcript)
- [Truth Social post details](https://spiral.ai/integrations/grok/truth-social-post-details)
- [TikTok video share link](https://spiral.ai/integrations/grok/tiktok-video-share-link)
- [Truth Social profile](https://spiral.ai/integrations/grok/truth-social-profile)

## Questions about TikTok web device ID in Grok

**Can Grok use TikTok web device ID?**

Yes. Add Spiral to Grok as an MCP server, and Grok can find and run TikTok web device ID like any built-in tool.

**How much does TikTok web device ID cost in Grok?**

$0.0013 per request. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Grok plan is separate.

**Do I need a TikHub account to use TikTok web device ID in Grok?**

No. Spiral runs TikTok web device ID on its own TikHub account. You sign in to Spiral once and never paste a key.

**How long does it take to set up TikTok web device ID in Grok?**

About two minutes: add a custom connector, then sign in to Spiral and approve, then check that it is connected.

**Does Grok wait while TikTok web device ID runs?**

TikTok web device ID runs in the background. Grok starts the run, checks on it and gives you the json when it's ready.

**Can TikHub retrieve private TikTok content?**

TikHub states that it accesses only publicly available data. Its documented scope excludes private, restricted, and password-protected content.

**Does TikHub guarantee that TikTok data is complete and current?**

TikHub disclaims guarantees of data accuracy, completeness, reliability, and timeliness. A returned content list therefore carries no guarantee of complete historical coverage or immediate updates.

**How many TikTok posts can one page contain?**

TikTok creator posts returns up to 15 posts per page, ordered newest first. The deprecated sorting setting does not change that order.

**Can I request larger pages of TikTok reposts?**

TikTok creator reposts uses a fixed page size of 20. TikHub explicitly says that this size cannot be changed.

**What use does TikHub's license permit?**

TikHub's service license specifies lawful internal business purposes. TikTok's U.S. terms separately prohibit automated scripts that collect information from or interact with its services.

