YouTube General Search

Search YouTube by keyword with optional type, upload-date, duration, feature, and sort filters, or continue with a token. Use it to discover videos, channels, playlists, or movies.

GET /v1/youtube/search_v1 $0.02
Price
$0.02 per successful call, Failed calls are free
Endpoint ID
youtube.search_v1

Parameters

  • keyword string Optional

    Search keyword. Required on the first request; leave empty when using a continuation token.

    Example咖啡

  • continuation_token string Optional

    Pagination token returned by the previous response.

  • upload_date string Optional

    Filter results by upload date.

    Available Values:

    • last_hour: Uploaded within the last hour
    • today: Uploaded today
    • this_week: Uploaded this week
    • this_month: Uploaded this month
    • this_year: Uploaded this year

    Examplelast_hour

  • type string Optional

    Filter results by result type.

    Available Values:

    • video: Video results
    • channel: Channel results
    • playlist: Playlist results
    • movie: Movie results

    Examplevideo

  • duration string Optional

    Filter video results by duration. Supported request values: short, medium, long.

    Available Values:

    • SHORT: Short videos under 4 minutes
    • MEDIUM: Medium videos from 4 to 20 minutes
    • LONG: Long videos over 20 minutes

    ExampleSHORT

  • features string Optional

    Feature filters separated by commas. Supported values: live, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr.

    Examplelive

    Allowed valuesliveFOUR_Khdsubtitlescreative_commonsTHREE_SIXTYvr180THREE_Dhdr

  • sort_by string Optional

    Sort order for search results.

    Available Values:

    • relevance: Sort by relevance
    • upload_date: Sort by upload date
    • view_count: Sort by view count
    • rating: Sort by rating

    Examplerelevance

Code samples

curl -G "https://api.mofa-ai.com/v1/youtube/search_v1" \
  -H "Authorization: Bearer $MOFA_API_KEY" \
  --data-urlencode 'keyword=咖啡' \
  --data-urlencode 'upload_date=last_hour' \
  --data-urlencode 'type=video' \
  --data-urlencode 'duration=SHORT' \
  --data-urlencode 'features=live' \
  --data-urlencode 'sort_by=relevance'

Example response

Request parameters {"type": "video", "keyword": "咖啡", "sort_by": "relevance", "duration": "SHORT", "features": "live", "upload_date": "last_hour"}

JSON Captured 2026-11-08, took 2745 ms
{
  "success": true,
  "code": 0,
  "message": "success",
  "request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
  "endpoint": "youtube.search_v1",
  "cost_usd": 0.02,
  "data": {
    "code": 0,
    "data": {
      "items": [
        {
          "id": "lMTsVxJX6RU",
          "type": "video",
          "title": "Matcha & Espresso Fusion (Starbucks Copycat)",
          "channel": {
            "id": "UCf5pRWIp3HYKFMcBIBhLXow",
            "name": "Ice or Rice",
            "type": "channel",
            "avatar": [
              {
                "url": "https://yt3.ggpht.com/ytc/AIdro_mmB_0HV3kHBFjAVZxpTW0G9mo5rMPPvwpaJ7dCuXBveZU=s68-c-k-c0x00ffffff-no-rj",
                "width": 68,
                "height": 68
              }
            ],
            "isVerified": false,
            "isVerifiedArtist": false
          },
          "isLiveNow": false,
          "lengthText": "1:12",
          "thumbnails": [
            {
              "url": "https://i.ytimg.com/vi/lMTsVxJX6RU/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLA4uh1kX5BsIeyfrVC1pAdWacB_cw",
              "width": 360,
              "height": 202,
              "moving": false
            },
            {
              "url": "https://i.ytimg.com/vi/lMTsVxJX6RU/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLB2WY_vN0Dz47AyjapwjcOzckjg_A",
              "width": 720,
              "height": 404,
              "moving": false
            },
            "… +1"
          ],
          "description": "Matcha Espresso Fusion: http://www.iceorrice.com/matcha-espresso-fusion/ Starbucks unveiled this matcha espresso fusion, ...",
          "viewCountText": "214,299 views",
          "publishedTimeText": "9 years ago"
        },
        {
          "id": "4gPltH46H_k",
          "type": "video",
          "title": "鹿晗 Luhan(Lộc Hàm ) X 吴亦凡WuYifan/Kris Wu(Ngô Diệc Phàm)  - 咖啡 (Coffee) 官方The  Official MV 【中英双语】",
          "channel": {
            "id": "UCk86qnXDmBwX4sKI5dHAdcw",
            "name": "风华秋实 RF ENTERTAINMENT",
            "type": "channel",
            "avatar": [
              {
                "url": "https://yt3.ggpht.com/ytc/AIdro_mLaZIVyOWA3GjQgJf3d2UPbinPzMhfFoTxqlyxhOCWSw=s68-c-k-c0x00ffffff-no-rj",
                "width": 68,
                "height": 68
              }
            ],
            "isVerified": true,
            "isVerifiedArtist": false
          },
          "isLiveNow": false,
          "lengthText": "3:25",
          "thumbnails": [
            {
              "url": "https://i.ytimg.com/vi/4gPltH46H_k/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAJaNpE5_ieLDh1NE7dFfx9Gdo6CQ",
              "width": 480,
              "height": 270,
              "moving": false
            },
            {
              "url": "https://i.ytimg.com/an_webp/4gPltH46H_k/mqdefault_6s.webp?du=3000&sqp=CNDdvtcG&rs=AOn4CLA4tx5n9VAA2lrpKR_gmuskI9gVfA",
              "width": 320,
              "height": 180,
              "moving": true
            }
          ],
          "description": "欢迎订阅频道哦:https://is.gd/csfgDI 开启小铃铛  第一时间观看专属你的精彩内容哦~ Welcome to subscribe my channel Open this ...",
          "viewCountText": "2,428,095 views",
          "publishedTimeText": "6 years ago"
        },
        "… +18"
      ],
      "errorId": "Success",
      "nextToken": "search-videos.EpcDEgblkpbllaEajANFZ1FRQVJnQlNCU0NBUXRzVFZSelZuaEtXRFpTVllJQkN6Um5VR3gwU0RRMlNGOXJnZ0VMWW5aWGJXRXphM0ZVWWxtQ0FRczVjV2hJWldKSVZsOUtaNElCQ3pVM1YxQndiMVZIVkRKUmdnRUxPV1EzZUZZMlRGSk9RMk9DQV…"
    },
    "message": null,
    "requestId": "71102665796b4fba8f141bf6eead6ffa",
    "recordTime": "2026-11-08T08:00:07.553484794",
    "requestParams": {
      "body": null,
      "query": {
        "type": "video",
        "sortBy": "relevance",
        "keyword": "咖啡",
        "duration": "SHORT",
        "features": "live",
        "upload_date": "last_hour"
      }
    }
  }
}

Try it

Sign in to call this endpoint from this page. Successful calls are billed to your balance, failed calls are free, and new accounts get $0.50 of trial credit.

Sign in to try

More YouTube endpoints

  • Video Details

    $0.02

    Retrieve public details for a YouTube video identified by video ID. Use it to inspect a known video before further content or comment analysis.

    /v1/youtube/get_video_detail_v1

  • Channel Videos

    $0.02

    Retrieve public videos from a YouTube channel, with optional cursor-based pagination. Use it to browse a channel's uploads and continue through additional re…

    /v1/youtube/get_channel_videos_v1

  • Video Captions

    $0.02

    Retrieve available caption tracks for a YouTube video or request captions in SRT, XML, JSON3, or plain-text format. Use it to support transcription, accessib…

    /v1/youtube/get_video_captions_v1

  • Channel Shorts

    $0.02

    Retrieve public Shorts from a YouTube channel ID with optional continuation-token pagination. Use it to browse a channel's short-form videos and continue thr…

    /v1/youtube/get_channel_shorts_v1

  • Video Comment List

    $0.02

    Retrieve first-level comments for a YouTube video with sorting, locale options, and cursor pagination. Use it to review audience discussion or continue throu…

    /v1/youtube/get_video_comment_v1

  • Video Sub Comment List

    $0.02

    Retrieve replies associated with a YouTube comment continuation cursor, with optional locale settings. Use it to follow threaded discussion beyond first-leve…

    /v1/youtube/get_video_sub_comment_v1

↑↓ to move, Enter to open, Esc to close