Search code examples
pythonapivimeo

How to integrate Vimeo API to Search Public Videos by keywords in python


i am creatin a project which includes integrating some major Video Network in Python.. My Main Objective is to make people search public videos by input keywords. I have done foe Youtube and now i want something similar with Vimeo but i don't get any idea on how there URI Request works.. As for Youtube i used the below codes to make a video search through the API..

import requests
     def browse_video_by_keyword(search , pageToken):
          
          _KEY = 'AIzaSyAlpM2iiTfLFUvEs3dR5IsHKX-wOJzh_uo'

          url = 'https://www.googleapis.com/youtube/v3/search?key={api_key}&part=snippet,id&pageToken={page}&maxResults=24&q={keyword}'
          request = requests.get(url.format(api_key=_KEY , keyword=search , page=pageToken))
          res = request.json()
          return res["items"];

I Need someone to give me idea on how i can do something similar to this for Vimeo API.. I have search through very where i can but no get any idea.. Any Help would be appreciated. Thanks In advance..


Solution

  • Looking at Vimeo API documentation, I think you need to hit their "Search for videos" end point. You can read more on it here