# Generate TikTok web ID

Generate TikTok web_id (device_id in Web API request parameters). Takes user agent, url, referer and more, all optional. Served by TikHub.

Purpose:
- Generate TikTok web_id (device_id in Web API request parameters)
Parameters:
- cookie: Custom cookie (must contain odin_tt), uses default if not provided
- user_agent: User agent string
- url: Request source URL
- referer: Referrer page
- user_unique_id: User unique ID (optional)
- app_id: Application ID, default 1988, represents TikTok Web app
Return:
- web_id: Generated web_id
- e: Error code (0 means success)
- ssid: Session ID

- Tool ID: `tikhub/tiktok-web-generate-webid`
- Name in the catalog: Tiktok, Generate web_id
- Provider: [TikHub](/providers/tikhub.md)
- Capability: [TikTok videos](/tools/tiktok/videos.md)
- Price: $0.001 per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

The provider’s price, with no markup. Billed for measured usage.


```json
{
  "model": "per_call",
  "amountUsd": 0.001
}
```

Pricing source: [https://api.tikhub.io/api/v1/tikhub/user/get_all_endpoints_info](https://api.tikhub.io/api/v1/tikhub/user/get_all_endpoints_info). Official per-success route price USD 0.001; daily upstream discounts may reduce provider cost. No discount invented for the customer. 10/second.

Price verification date: 2026-10-05.

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "user_agent": {
      "type": "string",
      "default": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0",
      "title": "User Agent"
    },
    "url": {
      "type": "string",
      "default": "https://www.tiktok.com/explore",
      "title": "Url"
    },
    "referer": {
      "type": "string",
      "default": "",
      "title": "Referer"
    },
    "user_unique_id": {
      "type": "string",
      "default": "",
      "title": "User Unique Id"
    },
    "app_id": {
      "default": 1988,
      "title": "App Id",
      "anyOf": [
        {
          "type": "integer",
          "maximum": 9007199254740991
        },
        {
          "type": "string",
          "pattern": "^[0-9]+$",
          "minLength": 1,
          "maxLength": 30
        }
      ],
      "description": " Use an exact decimal string for IDs beyond JavaScript's safe integer range."
    }
  },
  "additionalProperties": false,
  "required": []
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "tikhub/tiktok-web-generate-webid",
  "input": {
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0",
    "url": "https://www.tiktok.com/explore",
    "referer": "",
    "user_unique_id": "",
    "app_id": 1988
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://api.tikhub.io/#/TikTok-Web-API/generate_webid_api_v1_tiktok_web_generate_webid_get)

[REST inspection](https://api.agentik.cc/v1/tools/tikhub/tiktok-web-generate-webid) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/tikhub/tiktok-web-generate-webid) · [Agent index](/llms.txt)
