TollNode
Illustration: a grid of video thumbnails with a magnifying glass over one

YouTube video search

Search YouTube by keyword and get 10 videos with title, channel, views, likes, publish date, length and link as JSON. Find the best video on any topic.

POST /api/v1/nodes/youtube-search

Is this the right node?

Use it when
You need to find relevant or popular videos on a topic.
Not for
What is said inside a video (use YouTube transcript).
You get
10 videos: title, URL, channel and subscriber count, views, likes, comment count, publish date, duration, description and thumbnail.
Typical time
About 30 seconds per call

How it works

Your agent pays for itself

Explained in 5 minutes →
  1. Step 1: Needs something. Mid-task, your agent needs an image, a search or a voice.

    1Needs something

  2. Step 2: Finds it on TollNode. It picks the right tool. The price is shown up front.

    2Finds it on TollNode

  3. Step 3: Pays a few cents. Its wallet pays for that one use. No sign-up.

    3Pays a few cents

  4. Step 4: Gets the result. The result comes straight back. If it fails, it's free.

    4Gets the result

Two ways to use YouTube video search

Way 1 · Pay per call (x402)

For AI agents, no sign-up

Your agent sends the request, gets a 402 with the exact price ($0.042 per search (up to 10 videos)), signs a USDC payment on Base and retries. Nothing is collected unless the call succeeds.

add TollNode to Claude Code, Cursor or Codex (once)
npx agentcash add https://tollnode.com
or call it directly
npx agentcash@latest fetch https://tollnode.com/api/v1/nodes/youtube-search -m POST -b '{"query":"home espresso machine review"}'

Way 2 · Account + API key

For apps and teams

Create a free account, load a balance with USDC on Base, create an API key and call any node. Same prices; each successful call is deducted from your balance.

curl
curl -X POST https://tollnode.com/api/v1/nodes/youtube-search \
  -H "Authorization: Bearer $TOLLNODE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"query":"home espresso machine review"}'

Step-by-step, with code in JavaScript and Python: full guide for YouTube video search.

Input

FieldTypeNotes
query*stringWhat to search for, e.g. home espresso machine review
sortByenumOptional, default relevance (relevance, date, views, rating)

Example response

{
  "results": [
    {
      "id": "4MJnPVnY3_o",
      "url": "https://www.youtube.com/watch?v=4MJnPVnY3_o",
      "date": "2026-02-07T11:00:13.000Z",
      "text": "The $3,000 espresso category hasn’t changed in years — until now.\nThe Arkel Coast brings saturated group performance,…",
      "type": "video",
      "likes": 2000,
      "order": 3,
      "title": "The Best Espresso Machine You've Never Heard Of",
      "duration": "00:20:15",
      "hashtags": [],
      "location": null,
      "channelId": "UCu7x43fFlwbBykF1r04T_wQ",
      "viewCount": 180165,
      "channelUrl": "https://www.youtube.com/@DaddyGotCoffee",
      "channelName": "Daddy Got Coffee",
      "isMonetized": null,
      "thumbnailUrl": "https://i.ytimg.com/vi/4MJnPVnY3_o/maxresdefault.jpg",
      "collaborators": null,
      "commentsCount": 288,
      "isMembersOnly": false,
      "isPaidContent": false,
      "translatedText": null,
      "channelUsername": "DaddyGotCoffee",
      "translatedTitle": null,
      "descriptionLinks": [
        {
          "url": "https://geni.us/ArkelCoast",
          "text": "https://geni.us/ArkelCoast"
        }
      ],
      "commentsTurnedOff": false,
      "numberOfSubscribers": 80100
    }
  ]
}

FAQ

When should an agent use the YouTube video search node?
You need to find relevant or popular videos on a topic. It is not meant for what is said inside a video (use YouTube transcript). A call usually takes about 30 seconds.
What does the YouTube video search node return?
Search YouTube by keyword and get 10 videos with title, channel, views, likes, publish date, length and link as JSON. Find the best video on any topic. Each call returns 10 videos: title, URL, channel and subscriber count, views, likes, comment count, publish date, duration, description and thumbnail.
How much does one call cost?
$0.042 in USDC on Base per search (up to 10 videos) (one call = up to 10 videos), charged only when it succeeds. No sign-up, subscription or API key.
What happens if the call fails?
You are not charged. TollNode checks your signed payment first, runs the node, and only collects the payment if the result is usable. A failed, empty or timed-out call is never settled, so there is nothing to refund.
How does an AI agent pay?
With x402. The first request returns HTTP 402 and the exact price. Any x402 wallet signs the USDC payment and retries automatically. In Claude Code or Cursor, run npx agentcash add https://tollnode.com once.
Can I use an API key instead?
Yes. Create a free account, add funds in USDC on Base, create an API key and send it as Authorization: Bearer. Each successful call is deducted from your balance at the same price; failed calls cost nothing.