Video use cases

How do I search TikTok and YouTube by what happens in a video?

Search an index of moments instead of each app. UpRock's video_search takes a plain description, like "snorkeling with sea turtles", and returns up to ten short moments from public YouTube, TikTok and Instagram video, each with its start and end time and a link back to the original, so you land on the part that matches instead of the start of an hour-long video. It costs $1 per 1,000 searches.

Updated · Read as markdown

What a moment search returns

The thing you're looking for is often 30 seconds in the middle of a long video, and nobody says it out loud. A moment index cuts each video into short windows and keeps notes on each one: what's said, a model-written description of what happens, and the timestamps. A search compares your words with those notes by meaning and returns the windows, not just the video. The index holds notes on public videos, not copies of them, and every result points back to the original post.

UpRock's video_search tool, on the MCP server at https://mcp.uprock.ai/mcp, with your API key in an Authorization: Bearer header (clients that can't send headers can use https://mcp.uprock.ai/<API_KEY>/mcp instead), returns up to 10 results, best first. Each result has:

FieldWhat it is
urlThe original post on YouTube, TikTok or Instagram
t0, t1Start and end of the moment, in seconds from the start of the video
scoreHow well the moment matches, for ranking within one search
titleThe post's title as indexed (Instagram posts show "Video by" and the account name)
transcriptAn excerpt of what's said in the moment; empty when nobody speaks
sourceThe platform: youtube, tiktok or instagram
published_atWhen the video was published, in unix seconds

Moments are windows of up to 30 seconds on a 25-second grid: every t0 we saw was a multiple of 25. Three options shape the results. unique_videos (on by default) keeps only the best moment from each video, published_after and published_before (unix seconds) limit the publish dates, and order_by_recency sorts newest first, with relevance as the tiebreak.

Five searches we ran on 25 Oct 2026

We ran each query once with the default settings and copied the top three results. Titles are trimmed, and each links to the moment; YouTube links start at the second.

"walking through a night market with street food"

PlatformMomentScoreTitle
YouTube10:00 to 10:300.708First Time Trying Turkey's Famous Wet Burger in Taksim Square
Instagram0:00 to 0:300.704Video by lonelyplanet
YouTube50:00 to 50:300.687Istanbul Street Food!! ULTIMATE TURKISH FOOD You Must-Try in Istanbul

The top ten held five YouTube moments, four Instagram and one TikTok. Two of these three sit 10 and 50 minutes into long food tours, and the first is narrated in Urdu.

"snorkeling with sea turtles"

PlatformMomentScoreTitle
YouTube7:05 to 7:350.749$1 vs $1,000,000 Vacation!
YouTube48:20 to 48:500.631Morning News NOW Full Episode, June 17
Instagram0:00 to 0:240.609Video by visitjapanau

Five YouTube and five Instagram moments. The second hit is a 30-second window 48 minutes into a full news episode, and neither of the two YouTube transcripts mentions turtles.

"a cable car going up a mountain"

PlatformMomentScoreTitle
YouTube8:45 to 9:150.712Salzburg Vacation Travel Guide
Instagram0:00 to 0:270.702Video by switzerland
Instagram0:25 to 0:550.693Video by karaandnate

Eight Instagram moments and two YouTube. In the travel guide, the matching moment comes almost nine minutes in.

"slicing a watermelon"

PlatformMomentScoreTitle
YouTube1:15 to 1:450.712Skin a Watermelon Party Trick
YouTube0:50 to 1:200.672Simple Watermelon Smoothie Hack
YouTube3:45 to 4:150.665Nastya and new friendly family stories for children and their parents

Eight YouTube moments and two TikTok, the first at number five. The third result is a near miss: a children's story in which a character has been turned into a watermelon. The words matched; the action didn't.

"changing a bike tire"

PlatformMomentScoreTitle
YouTube0:50 to 1:200.625Man bikes from Pittsburgh to Dallas to watch his home team's World Cup match
TikTok0:25 to 0:550.618the gremlins wanted a bike
YouTube2:55 to 3:250.570I Built 4 SECRET Rooms In ONE COLOR!

Judging by titles and transcripts, none of the top ten shows a tire being changed. A search only finds what has been indexed, and so far the index leans toward travel and food. How-to queries are worth a try, but check what comes back.

Linking to the exact second

t0 is the second to send people to. How you link to it depends on the platform:

PlatformLink starts at a second?How
YouTubeYesAdd t= with the second, for example https://www.youtube.com/watch?v=Q6vVuj3iggE&t=75s. YouTube's Share dialog does the same when you tick "Start at", and embedded players take start and end in seconds
TikTokNo documented parameterLink to the post and print the time next to it
InstagramNo documented parameterLink to the post and print the time next to it

We couldn't find a start-time parameter in TikTok's or Instagram's documentation when we checked on 25 Oct 2026. It matters less than it sounds: of the 194 TikTok and Instagram moments in our 28 searches, 115 started at 0:00 and 180 in the first minute.

Searching from code

Both versions call video_search over MCP, pass the filters, and print each moment with a link to it. Give them a query, and optionally a date to get only videos published since then, newest first.

// npm i @modelcontextprotocol/sdk   (Node 24+ runs .ts files directly)   env: UPROCK_API_KEY// node moments.ts "snorkeling with sea turtles"              best moment per video// node moments.ts "snorkeling with sea turtles" 2026-01-01   published since then, newest firstimport { Client } from "@modelcontextprotocol/sdk/client/index.js";import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";​// One video_search result: a moment from t0 to t1 (seconds) in one public video.type Moment = {  url: string;  t0: number;  t1: number;  score: number;  title: string;  transcript: string;  source: string; // "youtube", "tiktok" or "instagram"  published_at: number; // unix seconds};​type SearchOptions = {  since?: Date; // published_after  newestFirst?: boolean; // order_by_recency  everyMoment?: boolean; // unique_videos: false returns several moments per video};​const uprock = new Client({ name: "video-moments", version: "1.0.0" });await uprock.connect(  new StreamableHTTPClientTransport(    new URL("https://mcp.uprock.ai/mcp"),    { requestInit: { headers: { Authorization: `Bearer ${process.env.UPROCK_API_KEY}` } } },  ),);​export async function searchMoments(query: string, opts: SearchOptions = {}) {  const args: Record<string, unknown> = {    query,    unique_videos: !opts.everyMoment,    order_by_recency: opts.newestFirst ?? false,  };  if (opts.since) args.published_after = Math.floor(opts.since.getTime() / 1000);  const res = await uprock.callTool({ name: "video_search", arguments: args });  const text =    (res.content as { type: string; text?: string }[]).find((c) => c.type === "text")      ?.text ?? "";  if (res.isError) throw new Error(`UpRock: ${text}`);  return (JSON.parse(text).results ?? []) as Moment[];}​// YouTube links can start at a second. TikTok and Instagram document no such// parameter, so their links open the post and the time is printed next to them.export function linkToMoment(m: Moment) {  const url = new URL(m.url);  if (/(^|\.)youtube\.com$|^youtu\.be$/.test(url.hostname)) {    url.searchParams.set("t", `${Math.floor(m.t0)}s`);  }  return url.toString();}​function clock(seconds: number) {  const s = Math.floor(seconds);  const [h, m, sec] = [Math.floor(s / 3600), Math.floor((s % 3600) / 60), s % 60];  const mmss = `${h ? String(m).padStart(2, "0") : m}:${String(sec).padStart(2, "0")}`;  return h ? `${h}:${mmss}` : mmss;}​const [query = "snorkeling with sea turtles", since] = process.argv.slice(2);try {  const moments = await searchMoments(    query,    since ? { since: new Date(since), newestFirst: true } : {},  );  for (const m of moments) {    const when = `${clock(m.t0)}-${clock(m.t1)}`;    console.log(      `${m.score.toFixed(3)}  ${m.source.padEnd(9)} ${when.padEnd(13)} ${m.title.slice(0, 50)}`,    );    console.log(`       ${linkToMoment(m)}`);  }} finally {  await uprock.close();}

Speed, filters and cost

  • Speed. Searches with the default settings took 4.2 to 5.4 seconds (median 4.6) across 29 runs on 25 Oct 2026. With unique_videos off they took about 2.1 seconds and returned several moments from the same video, and a slightly different set: the night-market search lost its YouTube top hit.
  • Newest first. order_by_recency sorts by publish date before relevance, so pair it with published_after. For "a cable car going up a mountain" since 1 Jan 2026, newest first, the top result was a news clip scoring 0.416; sorted by relevance, the same search led with a 0.694 match.
  • Cost. $1 per 1,000 searches by card or USDC, $0.80 with UPT, prepaid. There's nothing to store and no plan.

Tested 25 Oct 2026 against the live UpRock MCP server: we extracted both code blocks from this page and ran them with "snorkeling with sea turtles", with and without a date (Node 25 with @modelcontextprotocol/sdk 1.32.2, Python 3.11 with mcp 2.3.0). Both printed ten moments, with YouTube links that start at the moment. We didn't open the links in a browser, so the start-time behavior follows YouTube's documentation. On 6 Nov 2026 we ran both code blocks again with an UpRock API key in an Authorization header, with and without a date.

FAQ

Does this search every video on YouTube, TikTok and Instagram?

No. It searches the public videos that have been indexed so far. In our 28 test searches on 25 Oct 2026, results came from YouTube, TikTok and Instagram; travel and food queries matched best, and a how-to query like "changing a bike tire" returned nothing on topic.

Does UpRock keep copies of the videos?

No. The index holds notes on each video, such as transcripts, model-written descriptions of what happens and timestamps. Every result links to the original post, so people watch it where it was published.

Can I link to the exact second on TikTok or Instagram?

We couldn't find a documented start-time parameter for either (checked 25 Oct 2026), so link to the post and show the time next to it. Most of their moments in our searches started in the first minute anyway. YouTube documents one; add t= with the second.

What do t0, t1 and score mean?

t0 and t1 are the start and end of the moment in seconds from the start of the video. Moments are windows of up to 30 seconds on a 25-second grid. The score ranks results within one search and isn't a probability. On-topic top results scored about 0.6 to 0.75 in our runs, but an off-topic one scored 0.625.

What does a search cost?

$1 per 1,000 searches by card or USDC, $0.80 with UPT, prepaid. Each search returns up to ten moments, and the filters don't change the price.

Other use cases to explore

References

Get started

Add UpRock in one paste.

Paste this into Claude Code, Codex, Cursor or any agent with a terminal. It reads our docs, sets up the MCP server or CLI, and tells you the cost before it spends anything.

Set up UpRock for me: read https://uprock.ai/agents.md, connect the UpRock MCP server, and run one test crawl. Tell me what it costs before you spend anything.

How do I search TikTok and YouTube by what happens in a video? | UpRock AI