KonbiniAPI

Search videos — YouTube API

Searches public YouTube videos. YouTube has no public trending chart; sorting by view count within an upload window (order, published) is the closest equivalent, for a query rather than platform-wide.

GET/v1/youtube/search1 credit per request
Example response200OK
{
  "data": {
    "@context": [
      "https://www.w3.org/ns/activitystreams#",
      "https://konbiniapi.com/ns/social#"
    ],
    "type": "OrderedCollectionPage",
    "partOf": "https://api.konbiniapi.com/v1/youtube/search?query=mrbeast",
    "totalItems": null,
    "cursor": null,
    "nextCursor": "<token>",
    "next": "https://api.konbiniapi.com/v1/youtube/search?query=mrbeast&cursor=<token>",
    "itemCount": 30,
    "orderedItems": [
      {
        "type": "Video",
        "id": "https://www.youtube.com/watch?v=plN7JMbadRg",
        "url": "https://www.youtube.com/watch?v=plN7JMbadRg",
        "entityId": "plN7JMbadRg",
        "name": "Eat Everything In A Grocery Store, Win $1,000,000",
        "content": "I trapped 4 strangers in an entire supermarket and the only way out is eating everything inside\n\nThe guys wore Fitbit Air to track their health and fitness throughout their entire time in the store. See what they achieved during the Google Health Awards. GooglePartner\nGoogle…",
        "summary": "I trapped 4 strangers in an entire supermarket and the only way out is eating everything inside",
        "duration": 3479,
        "viewCount": 275722212,
        "tag": [
          {
            "type": "Tag",
            "name": "New"
          }
        ],
        "attributedTo": {
          "type": "Person",
          "id": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
          "url": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
          "entityId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
          "name": "MrBeast",
          "isVerified": true
        },
        "image": [
          {
            "type": "Image",
            "url": "https://i.ytimg.com/vi/plN7JMbadRg/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLCiT6Vj47A7NogeJusgz-_sjWhu7A",
            "width": 168,
            "height": 94
          }
        ]
      }
    ]
  }
}

Make the request.

One authenticated GET to /v1/youtube/search. Authentication and error conventions stay consistent across endpoints. This page shows the path, parameters, response shape, limits, and credit rule for this operation.

Built for

  • Data Analytics
  • Market Research
  • Platform Integration
const response = await fetch("https://api.konbiniapi.com/v1/youtube/search?query=mrbeast", {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});

const data = await response.json();
Parameters4
  • queryrequiredIn · QueryType · stringSearch query
  • orderIn · QueryType · stringSort order: relevance (default), rating, newest, or viewsrelevance | rating | newest | views
  • publishedIn · QueryType · stringRestrict results to videos uploaded within this windowhour | today | week | month | year
  • cursorIn · QueryType · stringPagination cursor

What you will probably call next.

The YouTube endpoints around this one — the same object at a different depth, or the same kind of read.

Try it on your own data.

Get a free API key and make this request in minutes. Failed and timed-out requests are automatically refunded.