Guides

TikTok data for AI agents: videos, comments and trends

How an AI agent pulls public TikTok profiles, videos, comments, hashtags and sounds over MCP, when TikTok's own API fits, and the cost of each run.

Bogdan Carbune

Bogdan Carbune

8 min read

A cream paper phone frame with sage green paper film strips fanning out behind it, small paper music notes and speech bubbles tied to it with green thread

To give an AI agent TikTok data, connect it to a tool that reads public TikTok profiles, videos, comments, hashtags and sounds, then ask in plain words. The agent turns your question into a small request (a handle, a keyword, a post id, a count) and gets structured rows back: views, likes, shares, captions, the sound used, comment text. TikTok's own APIs do not cover this for most people, because the Research API is for qualifying non-commercial researchers and the Display API reads the account that logs in. This guide shows the hosted route over MCP, the exact inputs for videos, comments and trends, three prompts you can copy, and what each run costs.

Can't I just use TikTok's official API?

Only in two narrow cases, so check them first, because when they fit they are the sanctioned route.

The Research API(checked November 2026) gives public data on accounts and content, including "user profiles, follower and following lists, liked videos, pinned videos, and reposted videos." It is for academic institutions in the U.S., EEA, UK, Canada or Switzerland, and not-for-profit or independent research bodies in the EU. Applicants must "be independent of commercial interests", show an ethical review and a research proposal, and TikTok says to expect an answer "within 4 weeks of submission." If you are a university researcher, apply. If you are a brand, agency or startup, it is not for you.

The Display API(checked November 2026) is described as a way to "display a TikTok creator's videos and their profile information". Its getting started guide has the user sign in through Login Kit and grant the user.info.basic and video.listscopes, then uses that user's access token to fetch their profile and videos. That fits a creator showing their own feed on a site or a dashboard for accounts you manage. It does not fit "what are other creators posting about this topic", which is the question most agent work starts with.

Everything else (competitor accounts, keyword search, hashtag posts, comments on someone else's video, trending sounds) means a hosted tool that reads public pages and TikTok's public endpoints for you.

Which TikTok data can an AI agent get?

The Goro catalog has two TikTok tools. One is a wide tool for almost any question, the other is a cheap bulk reader for post history. The agent sees the price before it runs either one.

TikTok tools

ToolBest forYou get backPrice
tiktok.apiProfiles, a user's posts, keyword search, hashtag posts, sounds, comments and replies, followersTikTok's raw response for each section you fill infrom $0.0060 per request
tiktok.profilePost history for up to 50 creators in one callEvery post with views, likes, comments, shares, bookmarks, hashtags, the song, and the author's statsfrom $0.0009 per result
tiktok.api bills one flat request per section you fill in, whatever the count. tiktok.profile bills per post returned, minimum $0.0020 per call.

Two details save most of the confusion. First, tiktok.api is split into sections (profile_, userPosts_, searchPosts_, listComments_ and so on). You fill in only the ones you want, and each one is a separate request. Second, the posts, followers and likes sections take a numeric user id, not a handle, so the agent resolves the handle with usernameToId_username first.

RoutingOne question, one section
Five questions on the left, each connected by a line to the TikTok tool section that answers it on the right. The comments question is highlighted and maps to tiktok.api listComments.YOU ASKTHE AGENT FILLS INhow big is this creator?tiktok.api profile_followers, likes, video countwhat have they posted lately?tiktok.api userPosts_needs the numeric user idwhat works for this topic?tiktok.api searchPosts_sort by likes, last 7 daystrack 20 creators every weektiktok.profilebulk post history, per postwhat do viewers say under it?tiktok.api listComments_one post id per call
The agent chains these on its own: resolve the handle, list the posts, then read comments on the busiest ones.

How do you connect the agent?

Add one remote MCP server. There is no scraper, browser or proxy to run on your side.

  1. Pick a plan. Signing up and browsing the catalog is free, but running a tool needs a plan. Build is $19 a month and includes $25 of tool credit. The pricing page has both plans.
  2. In Claude Code, run the command below, then type /mcp in a session and finish the sign-in in your browser, as the Claude Code MCP docs describe for remote servers.
  3. In Claude on the web or Desktop, go to Customize > Connectors, click "+ Add", then "Add custom connector", and paste https://mcp.usegoro.ai/mcp. Anthropic's custom connectors article(checked November 2026) says custom connectors are available to users on Free, Pro, Max, Ultra, Team and Enterprise plans, and that "Free users are limited to one custom connector." On Team and Enterprise, an Owner adds the connector for the organization first. The Claude Desktop setup guide walks through every screen.
  4. Turn it on in the chat.Click the "+" button at the lower left, choose Connectors, and toggle it on for the conversation.
terminal
claude mcp add --transport http goro https://mcp.usegoro.ai/mcp

Sign-in is OAuth, so there is no key to paste. For ChatGPT, Cursor and other clients, see the ChatGPT guide and the client's own docs. The tool calls below are the same in every client.

What do the tool calls look like?

The agent writes these from your prompt, so you rarely type them. Read them once anyway, because the inputs decide what comes back and what it costs.

Resolve a handle and get the profile

Two sections, so two requests. The id from usernameToId_username feeds the posts, followers and likes sections later.

run_tool: tiktok.api
{
  "slug": "tiktok.api",
  "input": {
    "usernameToId_username": "duolingo",
    "profile_username": "duolingo"
  }
}

A creator's recent videos

One request. Region defaults to GB on the posts, search and profile sections, so set it when you care about a market. Use the userPosts_maxCursor from the response to page further back.

run_tool: tiktok.api
{
  "slug": "tiktok.api",
  "input": {
    "userPosts_userId": "<numeric id from the first call>",
    "userPosts_count": 30,
    "userPosts_region": "US"
  }
}

Comments on a video

One post per request, using the post's id (the schema calls it awemeId) from the posts or search results. Replies to a single comment come from the commentReplies_ section.

run_tool: tiktok.api
{
  "slug": "tiktok.api",
  "input": {
    "listComments_awemeId": "<post id from the posts call>",
    "listComments_count": 50
  }
}

What is trending for a topic

Three sections in one call: posts sorted by most liked from the last seven days, matching hashtags, and sounds sorted by most used. searchPosts_sortType takes 0 for relevance, 1 for most liked and 3 for date. searchPosts_publishTime takes 1, 7, 30, 90 or 180 days, or 0 for all time.

run_tool: tiktok.api
{
  "slug": "tiktok.api",
  "input": {
    "searchPosts_keyword": "protein coffee",
    "searchPosts_sortType": 1,
    "searchPosts_publishTime": 7,
    "searchPosts_count": 50,
    "searchPosts_region": "US",
    "searchHashtags_keyword": "protein coffee",
    "searchSounds_keyword": "protein coffee",
    "searchSounds_useFilters": true,
    "searchSounds_sortType": 1
  }
}

Bulk post history for a roster

tiktok.profile takes up to 50 handles. Watch one thing: maxItemsis the total across all handles, not per handle, so 60 across three creators is about 20 each. The date fields are named from the scraper's side: until keeps posts newer than that date and since keeps posts older than it.

run_tool: tiktok.profile
{
  "slug": "tiktok.profile",
  "input": {
    "usernames": ["creator_one", "creator_two", "creator_three"],
    "maxItems": 60,
    "until": "2026-10-18"
  }
}

Three prompts that do real work

1. Audit a creator or competitor

Numbered steps make the agent size each call to the job instead of guessing.

prompt
Audit the TikTok account @<handle>.
1. Resolve the handle to its user id and get the profile stats.
2. Pull the last 30 posts (region US).
3. Pick the 3 posts with the most comments and pull 50 comments from each.
Give me a table of the 30 posts (date, views, likes, comments, shares,
first line of caption, sound), the median views, and the 5 questions
or complaints that come up most in the comments.
Tell me which tools ran and what they cost.

That is 6 requests: two to resolve the handle and read the profile, one for the posts, three for the comments. At catalog prices it comes to about $0.036.

2. Find what works for a topic this week

prompt
What is working on TikTok for "protein coffee" this week?
Search posts from the last 7 days sorted by most liked, the matching
hashtags, and the most used sounds, all in one tiktok.api call, region US.
Group the top posts by hook and format, and list the sounds that show up
more than once.

One call with 3 sections, about $0.018. Run it every Monday and you have the TikTok part of the weekly brief in the social listening playbook.

3. Track a roster of creators

"Pull the last month of posts for these 20 creators, up to 400 posts in total, and rank them by median views and shares per post." That is one tiktok.profile call, about $0.36 for 400 posts. It is the shape for creator campaign reporting, and the Instagram guide covers the same jobs on Instagram.

How much does TikTok data cost per run?

Cents. The two tools are priced differently, and that changes how you should ask.

Example runs

JobCallsAbout
Creator audit6 tiktok.api requests$0.036
Topic trend check3 sections in one call$0.018
Comments on 10 videos10 tiktok.api requests$0.060
Roster of 20 creators400 posts via tiktok.profile$0.36
Computed from catalog prices. tiktok.profile bills on posts actually returned, so a run that finds fewer costs less. The Build plan's $25 of monthly credit covers a lot of runs like these.

With tiktok.api, the count you ask for does not change the price of a section, so ask for a large count in one request rather than many small pages. TikTok's endpoint still decides how many rows come back, so check the response and use the cursor when you need more. With tiktok.profile, every post is billed, so ask for the posts the task needs and no more.

What can't an agent get from TikTok?

  • Private accounts and DMs. These tools read public data only.
  • Private analytics. Public tools see the numbers any viewer can see on a profile or video, not what only the account owner sees.
  • A time series out of one call. A profile call is a snapshot. To see growth, run the same call on a schedule and keep the results. For how much people search for a topic over time, trends.search reads Google search interest, which is a different signal from what is popular on TikTok.

Is it legal to scrape TikTok with an AI agent?

This is not legal advice, and the answer depends on where you are and what you collect. TikTok's US Terms of Service(last updated July 15, 2026, checked November 2026) say users may not "scrape, crawl, export or otherwise extract any data or content in any form, for any purpose, from the Platform", including "using any automated system or software", "except as approved in writing" by TikTok. A commercial project should get legal advice before relying on scraped data. Comments and profiles are personal data in many places, so keep only the fields the task needs and do not store commenter details without a reason.

Common questions

Is there a TikTok MCP server?

Yes. Goro is one remote MCP server that includes two TikTok tools (tiktok.api and tiktok.profile) next to Instagram, YouTube, Reddit and search tools. TikTok's own developer products (the Research API and Display API) are APIs, not MCP servers.

Can an AI agent read TikTok comments?

Yes, on public videos. The agent needs the post id, which comes from a posts or search result, then calls the listComments section with it. Replies to a single comment come from the commentReplies section. Each video is one request.

Can I use the TikTok Research API for marketing?

No. TikTok's Research API page lists academic institutions and EU not-for-profit or independent research bodies as eligible, and applicants must be independent of commercial interests. Brands and agencies need a different route.

How much does it cost to pull TikTok data with an agent?

Usually cents per job. At current catalog prices a tiktok.api request is $0.0060 whatever the count, and a post from tiktok.profile is $0.0009 with a $0.0020 minimum per call. A full creator audit with profile, 30 posts and comments on 3 videos is about $0.036. Running tools needs a plan; Build is $19 a month with $25 of tool credit.

Why does the agent ask for a user id instead of the username?

TikTok's posts, followers, following and liked-posts endpoints take a numeric user id. The agent resolves the handle with the usernameToId section first, then uses the id. The profile section and tiktok.profile accept a plain username.