Spiral gives your agent every tool with one account. Browse the tools →

opencode · Social Media

How to Use TikTok guest session in opencode

Returns a TikTok web guest cookie. Use it to keep a consistent visitor identity during data collection, which can reduce duplicate results on some interfaces but does not expose all data.

Prompts to try with TikTok guest session in opencode

Copy an example into opencode, or ask in your own words.

Use TikTok guest session to retrieve a visitor cookie for this project's public BookTok collection workflow, keeping its value out of logs.

TikTok guest sessionopencode
Try asking
  • Use TikTok guest session to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from TikTok guest session and tell me what changed since last week.

  • Check TikTok guest session and summarize what you find in three bullet points.

  • Pull the newest data from TikTok guest session and give me the result as a table.

How to set up TikTok guest session in opencode

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

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode 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.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run TikTok guest session

    One request; the result comes back by polling or a webhook.

    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-fetch-tiktok-web-guest-cookie",
        "input": {
          "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
        }
      }'

Then paste one of the prompts above: opencode finds TikTok guest session on Spiral, shows the price and runs it.

TikTok guest session providers and prices

Spiral runs TikTok guest session through TikHub. Open a card for today's price, with every fee included.

TikHubSocial Media
TikTok Web · Get the guest Cookie
tikhub/tiktok-web-fetch-tiktok-web-guest-cookie

What can you do with TikTok guest session in opencode?

Build a TikTok research view for videos, hashtags, public brand connections, and LIVE information. A coding agent can adapt retrieved responses to your project's data model and handle TikTok pagination and guest-session limits.

Research a content topic

Explore BookTok through daily search terms, hashtag details, and associated videos. Use keyword search to broaden the examples and a consistent guest identity to support collection with fewer duplicates where supported.

Build an editorial shortlist

Find TikTok videos and hashtags relevant to a publisher's next reading campaign. Compare the collected examples with daily trending searches, using a consistent guest identity during supported collection.

Prepare a brand campaign brief

Combine campaign-related videos, hashtags, search trends, and brand LIVE information. Add public likes and business or creator accounts found in follower and following lists; use guest sessions to support consistent collection where applicable.

Compare public brand activity

Prepare an internal comparison of Duolingo and Ryanair using relevant videos, hashtags, daily search topics, public content selections, business account connections, and LIVE details. Keep guest identity consistent during supported collection and distinguish observed results from conclusions about brand strategy.

Find public collaboration candidates

Review business and creator accounts appearing in a brand's follower and following lists, plus its publicly liked content. Use guest sessions where supported during collection, then prepare a shortlist for manual editorial review.

Questions about TikTok guest session in opencode

Can opencode use TikTok guest session?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run TikTok guest session like any built-in tool.

How much does TikTok guest session cost in opencode?

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

Do I need a TikHub account to use TikTok guest session in opencode?

No. Spiral runs TikTok guest session 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 guest session in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while TikTok guest session runs?

TikTok guest session runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

How fresh is the TikTok data?

TikHub describes repeat API requests as fresh, real-time retrieval rather than cached results. That describes retrieval freshness, not a guarantee that every TikTok value updates immediately.

Does a page of results contain every matching TikTok record?

No. TikHub says paginated endpoints frequently return fewer items than requested, so a short page alone does not establish that collection is complete.

Does this cover private TikTok content?

TikHub states that its data access covers only publicly available information. Private content falls outside that stated coverage.

Is TikTok data guaranteed to be accurate and complete?

No. TikHub's terms do not warrant that retrieved data is accurate, complete, or current.

Can I freely republish retrieved TikTok content?

Retrieval does not establish unrestricted reuse rights. TikHub's terms state that accessed content may carry third-party intellectual property rights.

Get started

Start using TikTok guest session in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options