Skip to main content
Glama
Apify Public Data & Leads

Apify Public Data & Leads

YouTube Video Search

youtube_video_search
Read-only

Search public YouTube videos by keyword for content research, competitor monitoring, trend discovery; returns titles, channels, URLs, views, duration, and publish dates without YouTube API quota.

Instructions

Search public YouTube videos by keyword, returning title, channel, canonical video URL, view count, duration, and publish date - no YouTube Data API quota required.

Behavioral Transparency:

  • Execution: Network call executed synchronously in the cloud via Apify Actor 'captainhandsome/youtube-search-scraper'.

  • Side Effects: Reads public sources and creates a billed Actor run and dataset on your Apify account.

  • Authentication: Requires APIFY_TOKEN environment variable.

  • Latency & Limits: Typical run duration is 10-30 seconds; timeout capped at 120 seconds.

Usage Guidelines:

  • When to use: Use for content research, competitor video monitoring, trend discovery, or building a list of videos on a topic.

  • When NOT to use: Do not use for retrieving a video's transcript/captions, channel analytics dashboards, or non-YouTube platforms.

  • Named alternatives: Use 'google_play_reviews_search' for app-store sentiment or 'linkedin_jobs_search' for job-market data; neither covers video content.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "search_query": "<search_query>"
    },
    "name": "youtube_video_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_resultsNoMaximum number of unique video records to return. Defaults to 25. At most 100 per call.
search_queryYesKeyword or phrase to search for on YouTube (e.g. 'small business marketing').

Output Schema

NameRequiredDescriptionDefault
runNo
errorNo
statusYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.6.2
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum number of unique video records to return. Defaults to 25."New value: +"Maximum number of unique video records to return. Defaults to 25. At most 100 per call."
    • changedInput schema / properties / max_results / maximum
      Previous value: -500New value: +100
  2. Changed18 schema fields changedv1.1.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedOutput schema / properties / error
      Added value: +{
      +  "type": "object"
      +}
    • removedOutput schema / properties / results / description
      Removed value: -"Collection of YouTube video search result records."
    • addedOutput schema / properties / results / items / properties / channel_name / title
      Added value: +"Channel name"
    • addedOutput schema / properties / results / items / properties / channel_url / title
      Added value: +"Channel URL"
    • addedOutput schema / properties / results / items / properties / duration / title
      Added value: +"Video duration"
    • changedOutput schema / properties / results / items / properties / published / description
      Previous value: -"Relative publication age displayed in search results (e.g. '2 years ago')."New value: +"Relative publication time displayed in search results."
    • addedOutput schema / properties / results / items / properties / published / title
      Added value: +"Displayed publication age"
    • changedOutput schema / properties / results / items / properties / title / description
      Previous value: -"Public title of the video."New value: +"Public title of the YouTube video."
    • addedOutput schema / properties / results / items / properties / title / title
      Added value: +"Video title"
    • addedOutput schema / properties / results / items / properties / video_url / title
      Added value: +"Video URL"
    • changedOutput schema / properties / results / items / properties / view_count / description
      Previous value: -"'views' parsed into a number, handling K/M/B suffixes and comma grouping."New value: +"'views' parsed into a number, handling K/M/B suffixes and comma grouping. Null if unparseable."
    • addedOutput schema / properties / results / items / properties / view_count / title
      Added value: +"View count"
    • addedOutput schema / properties / results / items / properties / views / title
      Added value: +"Displayed view count"
    • removedOutput schema / properties / results / items / required
      Removed value: -[
      -  "title",
      -  "video_url"
      -]
    • addedOutput schema / properties / run
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "success",
      +    "empty_unverified",
      +    "partial",
      +    "error"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results"
      -]New value: +[
      +  "results",
      +  "status"
      +]
  3. Addedv1.0.11

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations by disclosing the backing Actor name, synchronous cloud execution, the billed-run and dataset side effect, the APIFY_TOKEN requirement, and a 10-30s typical duration with a 120s cap. The billing disclosure is the material addition, since destructiveHint=false and readOnlyHint=true do not convey cost. Slightly short of 5 because it does not say how failures/timeouts surface or whether partial results are returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is front-loaded and the labeled sections are easy to scan, with no filler prose. It is somewhat longer than necessary and the inline section headings ('Behavioral Transparency:', 'Usage Guidelines:') read like internal documentation scaffolding rather than natural description text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still sketches the returned fields, and every other burden an agent needs — auth, cost, latency, scope limits, alternatives — is covered. Nothing required to invoke it correctly is missing for a two-parameter read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so search_query's keyword semantics and max_results' bounds/default are already documented in structured data. The description only echoes 'by keyword' and adds no format hints, operators, or result-cap behavior beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Search public YouTube videos by keyword') and enumerates the exact return fields (title, channel, canonical URL, view count, duration, publish date). The 'no YouTube Data API quota required' clause distinguishes it from any credentialed alternative an agent might otherwise reach for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use scenarios (content research, competitor monitoring, trend discovery, list building) plus an explicit when-NOT-to-use list (transcripts/captions, channel analytics, non-YouTube). It also names concrete alternatives (google_play_reviews_search, linkedin_jobs_search) and states why they don't substitute, so routing is fully determined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.