Thread: Youtube API

  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Rep Power

    Youtube API

    Php Folks,

    I want to build a php script that gets results from Youtube.
    Meaning, you will make keyword searches on Youtube and my php script will query Youtube and grab the results and display them to you with a few changes. The changes, we will get into that later.
    First things first. If I build a cURL script then Youtube is likely to detect tonnes of queries coming from my server IP and ban my IP. Right ?
    And so, do you think Youtube API is the best solution ? I mean, that is why they built the API for. Right ?
    I don't have experiences with API and so this is my first ever project with php and so bear with me not a little but tonnes. It will be a bumpy ride.

    Anyway, I'm looking into Youtube API right now. Googled. But, I don't want to be wading through irrelevant docs and am a little loss here.
    And so, do you know of any good links where I can get all the info on how to make use of the Youtube API for my php script ?

    I searched for "youtube api":

    Checking out these links but it would help if you guys can be kind enough to have a peek and tell me which links to go with and which ones to ignore:

    You are welcome to provide a small code sample, if you wish.
    Requinix is not allowing me to open more than one thread based on one code and so I can't mention the code here which I would use to grab results from Youtube via my cURL. I would make use of this script by making amends:
    Unless ofcourse you guys advise that I should not build my Youtube Searching/Querying script over that code's skeleton.

    Let me see if I understand what an API's function is.
    The youtube script is programmed to understand certain queries. These queries must be in the url. if I get these query parameters correct then my web app would be able to query Youtube and fetch the results. So, the API is the handshake language or barrier removal tool. Correct ?
    From the looks of this page, it seems Youtube allows 3rd party tools (web apps, mobile apps, etc.) to query the Youtube searchengine index. And so, my cURL should be able to query Youtube without any foil mechanisms getting triggered. Correct ? I mean, if they wern't allowing 3rd party tools to query Youtube then they won't be releasing the API. Now would they ?
    I just have to read their API doc to see what mechanisms or measures they have in place that if triggered they would take into account as the querying client app is going against their rules and so is a query spammer. Am I right here in my understandings ?
    Anyway,s I'd appreciate all the advice and code samples or links to code samples I could get from your ends.
    Last edited by UniqueIdeaMan; May 2nd, 2018 at 12:41 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Rep Power
    I suggest you start with the youtube API TOS.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo