YouTube Videos List

1 credits/call
ae_youtube_videos_list

Get detailed information and statistics for specific YouTube videos or browse popular video charts.

VideoEntertainmentSocial
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
hlstringNoStands for "host language". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).—
idstringNoComma-separated YouTube video IDs. Use supplied valid IDs, search.list(type=video) items[].id.videoId, or playlistItems.list(part=contentDetails) items[].contentDetails.videoId (also available as items[].snippet.resourceId.videoId with part=snippet). playlistItems items[].id identifies the playlist item, not the video; do not pass it as a video ID.—
partstringYesThe *part* parameter specifies a comma-separated list of one or more video resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set *part=snippet*, the API response will contain all of those properties.—
chartenum (chartUnspecified | mostPopular)NoReturn the videos that are in the specified chart.—
localestringNoLocale setting for localized content formatting (e.g., 'en_US').—
maxWidthintegerNoMaximum width in pixels used to calculate the embedded player dimensions. Official documentation lists 72 through 8192; direct API tests honored positive values including 1, 71, 8193 and 16384. Zero and -1 returned the default player dimensions in the tested video. Actual runtime bounds have not been established.—
myRatingenum (none | like | dislike)NoReturn videos liked/disliked by the authenticated user. Does not support RateType.RATED_TYPE_NONE.—
maxHeightintegerNoMaximum height in pixels used to calculate the embedded player dimensions. Official documentation lists 72 through 8192; direct API tests honored positive values including 1, 71, 8193 and 16384. Zero and -1 returned the default player dimensions in the tested video. Actual runtime bounds have not been established.—
pageTokenstringNoOptional opaque pagination token. Omit on the first request. To fetch the next page, copy nextPageToken exactly from the previous response into pageToken and call this same endpoint again, keeping the playlist/channel/video identifiers, filters, part and other query settings unchanged. Use prevPageToken to go back when provided. Do not invent tokens or use a token from another query. Stop when nextPageToken is absent; no nextPageToken means no further page is advertised, even if a page contains fewer items than maxResults.—
maxResultsintegerNoMaximum number of items requested per page, not a limit on the total query results. Use nextPageToken as pageToken to retrieve subsequent pages when available. Direct API tests accepted values above 50 but capped the effective page size at 50; requesting more does not increase page size. Zero is accepted and can return an empty page. maxResults applies to chart or myRating queries; omit it when querying by id.—
regionCodestringNoUse a chart that is specific to the specified region—
videoCategoryIdstringNoUse chart that is specific to the specified video category—
onBehalfOfContentOwnerstringNo*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_youtube_videos_list' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "id": "n1_fgNm63zA,SNgYM-6WtTA,F7f2BnQGdJQ",
    "maxResults": 50,
    "part": "snippet,statistics"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "etag": "siUZ8V99phHSFYTYVGVrSMbZyQM",
  "items": [
    {
      "etag": "hW58Dq3C254wS4_JGoiV5wzXwsM",
      "id": "n1_fgNm63zA",
      "kind": "youtube#video",
      "snippet": {
        "categoryId": "22",
        "channelId": "UCoUXMPiRtDcPIkzlIiDPJKQ",
        "channelTitle": "Dibrah",
        "defaultAudioLanguage": "es",
        "defaultLanguage": "es",
        "title": "CRISTIANO RONALDO (El Documental Completo)🟡 SU FINAL"
      },
      "statistics": {
        "commentCount": "15",
        "favoriteCount": "0",
        "likeCount": "252",
        "viewCount": "10150"
      }
    }
  ],
  "kind": "youtube#videoListResponse",
  "pageInfo": {
    "resultsPerPage": 3,
    "totalResults": 3
  }
}

This example shows part of the response. Copied content is valid JSON.

Guides using this tool

See how this tool fits into real workflows