Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube API - limit without developer key

For a client of ours, we use the Youtube API v2 to fetch the newest video with a specific tag. We fetched the response of the URL without a developer key. Up until a few days ago, this worked perfectly. Suddenly, we got no results back. Instead of getting an error, we just got 0 results.

After a bit of puzzling, we found out that this is because we probably went over a limit of requests. This is a conclusion based on the fact that when we went to the same URL with a mobile device on 3G as a laptop connected with WiFi, we got results.

My question is this:

  1. Is it possible to get an error in our request if we went over a limit?
  2. What exactly is the limit when not using a developer key?
  3. Is there a premium account available to fetch a much bigger amount of requests?

Thanks in advance!

[EDIT] When we request the URL https://gdata.youtube.com/feeds/api/users/AEGON/uploads?category=2012Q4&alt=json, we get the following response in JSON:

(I removed some links because of reputation on Stack Overflow)

{
    "version": "1.0",  
    "encoding": "UTF-8",  
    "feed": {  
        "xmlns": "",  
        "xmlns$openSearch": "",  
        "id": {  
            "$t": ""  
        },  
        "updated": {  
            "$t": "2013-03-12T08:35:47.226Z"  
        },  
        "category": [{  
            "scheme": "",  
            "term": ""  
        }],  
        "title": {  
            "$t": "Uploads by AEGON",  
            "type": "text"  
        },  
        "logo": {  
            "$t": ""  
        },  
        "link": [{  
            "rel": "related",  
            "type": "application/atom+xml",  
            "href": ""  
        },  
        {  
            "rel": "alternate",  
            "type": "text/html",  
            "href": ""  
        },  
        {  
            "rel": "",  
            "type": "application/atom+xml",  
            "href": ""  
        },  
        {  
            "rel": "",  
            "type": "application/atom+xml",  
            "href": ""  
        },  
        {  
            "rel": "self",  
            "type": "application/atom+xml",  
            "href": "https://gdata.youtube.com/feeds/api/users/AEGON  /uploads?alt=json&start-index=1&max-results=25&category=%7Bhttp://gdata.youtube.com/schemas/2007/keywords.cat%7D2012Q4"  
        }],  
        "author": [{  
            "name": {  
                "$t": "AEGON"  
            },  
            "uri": {  
                "$t": ""  
            }  
        }],  
        "generator": {  
            "$t": "YouTube data API",  
            "version": "2.1",  
            "uri": ""  
        },  
        "openSearch$totalResults": {  
            "$t": 0  
        },  
        "openSearch$startIndex": {  
            "$t": 1  
        },  
        "openSearch$itemsPerPage": {  
            "$t": 25  
        }  
    }  
}  
like image 937
R Keppel Avatar asked Aug 06 '26 04:08

R Keppel


1 Answers

Answer for your questions,

  1. you'll receive an HTTP response with a code of 403 and a response body that includes

     [<errors><error><domain>yt:quota</domain><code>too_many_recent_calls</code></error></errors>]
    

    for excessive request.

  2. There is no such limit, you need to stop the request for 10 to 15 min. after receiving error.

  3. No idea for this.

Reference: http://apiblog.youtube.com/2010/02/best-practices-for-avoiding-quota.html

like image 158
Muthukris Bala Avatar answered Aug 08 '26 09:08

Muthukris Bala