Skip to content
Browse all functions

List YouTube Videos

youtube/listyoutubevideos

listyoutubevideos (List YouTube Videos) is a 1001fx API function in the group YouTube: POST https://api.1001fx.com/youtube/listyoutubevideos, 5 credits per call. It works in Make, n8n, scripts and AI agents as a plain HTTP call.

This function is deprecated and will be removed in a future release.

Returns a list of videos that match the API request parameters.

  • This service is provided by an external service provider: YouTube. The data of the call is sent to the provider. More about service providers

Try it in the 1001fx app

Run listyoutubevideos in your browser with your API key – fill the form, click Run and get the answer or the file.

listyoutubevideos in the 1001fx app: the form with example values
List YouTube Videos in the 1001fx app

Endpoint

POSThttps://api.1001fx.com/youtube/listyoutubevideos
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json

Parameters

  • credentialKeystringrequired

    Your 1001fx credential key. See https://1001fx.com/app/credentials/list

    Example:
    yourCredentialKey
  • chartobjectoptional

    Filters videos based on the chart filter. One of chart, id or myRating needs to be provided.

    • chartenumoptional

      The chart parameter identifies the chart that you want to retrieve. - mostPopular: Return the most popular videos for the specified content region and video category.

      Values:
      mostPopular
      Example:
      mostPopular
    • regionCodestringoptional

      The regionCode parameter instructs the API to select a video chart available in the specified region. The parameter value is an ISO 3166-1 alpha-2 country code. See https://1001fx.com/functions/listyoutubei18nregions.

      Example:
      DE
    • videoCategoryIdstringoptional

      The videoCategoryId parameter identifies the video category for which the chart should be retrieved. By default, charts are not restricted to a particular category. The default value is 0.

      Default:
      0
      Example:
      DE
    • pageTokenstringoptional

      The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.

  • idobjectoptional

    Filters videos based on the id filter. One of chart, id or myRating needs to be provided.

    • videoIdsarray<string>optional

      The videoIds parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the videos ID.

      Min items:
      1
  • myRatingobjectoptional

    Filters videos based on the myRating filter. One of chart, id or myRating needs to be provided.

    • myRatingenumoptional

      Set this parameters value to like or dislike to instruct the API to only return videos liked or disliked by the authenticated user. - dislike: Returns only videos disliked by the authenticated user.. - like: Returns only video liked by the authenticated user.

      Values:
      dislike
      like
      Example:
      like
    • maxResultsnumberoptional

      Specifies the maximum number of items that should be returned in the result set. Defaults to 5.

      Default:
      5
      Min:
      1
      Max:
      50
      Example:
      2
    • pageTokenstringoptional

      The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.

  • hlstringoptional

    The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method. If localized resource details are available in that language, the resources snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resourcess default language. See https://1001fx.com/functions/listyoutubei18nlanguages.

    Example:
    de
  • maxWidthnumberoptional

    The maxWidth parameter specifies the maximum width of the embedded player returned in the player.embedHtml property. You can use this parameter to specify that instead of the default dimensions, the embed code should use a width appropriate for your application layout. If the maxHeight parameter is also provided, the player may be narrower than maxWidth in order to not violate the maximum height.

    Min:
    72
    Max:
    8192
    Example:
    1920
  • maxHeightnumberoptional

    The maxHeight parameter specifies the maximum height of the embedded player returned in the player.embedHtml property. You can use this parameter to specify that instead of the default dimensions, the embed code should use a height appropriate for your application layout. If the maxWidth parameter is also provided, the player may be shorter than the maxHeight in order to not violate the maximum width.

    Min:
    72
    Max:
    8192
    Example:
    1080

Examples

Most popular videos

chart filter: most popular music videos in Germany.

Input

Expects a json body
{
  "credentialKey": "yourCredentialKey",
  "chart": {
    "chart": "mostPopular",
    "regionCode": "DE",
    "videoCategoryId": "20"
  },
  "hl": "de",
  "maxWidth": 1920,
  "maxHeight": 1080
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/youtube/listyoutubevideos' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"credentialKey":"yourCredentialKey","chart":{"chart":"mostPopular","regionCode":"DE","videoCategoryId":"20"},"hl":"de","maxWidth":1920,"maxHeight":1080}'

Videos by ID

id filter: loads the given videoIds.

Input

Expects a json body
{
  "credentialKey": "yourCredentialKey",
  "id": {
    "videoIds": [
      "kJQP7kiw5Fk",
      "JGwWNGJdvx8"
    ]
  },
  "hl": "de",
  "maxWidth": 1920,
  "maxHeight": 1080
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/youtube/listyoutubevideos' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"credentialKey":"yourCredentialKey","id":{"videoIds":["kJQP7kiw5Fk","JGwWNGJdvx8"]},"hl":"de","maxWidth":1920,"maxHeight":1080}'

Videos I liked

myRating filter: liked videos of the connected account.

Input

Expects a json body
{
  "credentialKey": "yourCredentialKey",
  "myRating": {
    "myRating": "like",
    "maxResults": 2
  },
  "hl": "de",
  "maxWidth": 1920,
  "maxHeight": 1080
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/youtube/listyoutubevideos' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"credentialKey":"yourCredentialKey","myRating":{"myRating":"like","maxResults":2},"hl":"de","maxWidth":1920,"maxHeight":1080}'

Try listyoutubevideos now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.026.04.2023created
Ask 1001fx