user10177193
user10177193

Reputation: 35

Vimeo API - get all videos from a channel

I'd like to get all Vimeo's videos from a channel.

I looked to the Vimeo API, created a key for my app but I found no simple method to get all videos with for example the id of the channel...

How to do that ?

Thx.

Upvotes: 1

Views: 9718

Answers (2)

Zee
Zee

Reputation: 151

The answer above is correct, but I found myself looking for a solution on how to get the channel id.

There two options(that I found) to get the channel id

  1. If you have access to run js in the browser(like in Puppeteer) - run the following js
vimeo.config.channel.id

and it will return the id of the channel.

  1. Another option is to get it via regex \"channel\"\:\{\"id\"\:\"(\d*)\"

It's taking the following part from the tag

vimeo.config = _extend((vimeo.config || {}), {"channel":{"id":"164226","url":"\/channels\/fenwn"},"sticky_topnav":{"excluded_pages":["Vimeo\\Controller\\AboutController:main","Vimeo\\Controller\\AboutController:profe

Upvotes: 1

Tommy Penner
Tommy Penner

Reputation: 3018

To get the list of videos in a channel, make an authenticated GET request to https://api.vimeo.com/channels/[channel_id]/videos. The endpoint documentation can be found here: https://developer.vimeo.com/api/reference/channels#GET/channels/{channel_id}/videos

If you don't know the channel_id of a channel, you can substitute the id with the custom url of the channel. For instance, with the Staff Picks channel at https://vimeo.com/channels/staffpicks, make an authenticated GET request to https://api.vimeo.com/channels/staffpicks

That said, it's best practice to use the channel_id instead of the shortcut url name wherever possible. The Staff Picks channel, for example, returns "uri":"/channels/927"

Upvotes: 4

Related Questions