Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9245727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:19:48+00:00 2026-06-18T09:19:48+00:00

I’m trying to get the user’s subscriptions list. You can only get 50 at

  • 0

I’m trying to get the user’s subscriptions list. You can only get 50 at a time so i would like to create a batch processing to do all at once.

I’m using Jquery and ajax to send a POST request like this :

var query = "<feed xmlns='http://www.w3.org/2005/Atom'";
query += "xmlns:media='http://search.yahoo.com/mrss/'";
query += "xmlns:batch='http://schemas.google.com/gdata/batch'"
query += "xmlns:yt='http://gdata.youtube.com/schemas/2007'>";

for(var i = 0; i < loop; ++i)
{
    query += '<entry>';
    query += '<id>http://gdata.youtube.com/feeds/api/users/' + youtube_username + '/subscriptions?max-results=50&start-index=' + ((i * 50) + 1) + '&alt=json</id>';
    query += "<batch:operation type='query'/>";
    query += '</entry>';
}

query += '</feed>';

$.ajax({
    type: 'POST',
    url: 'http://gdata.youtube.com/feeds/api/users/batch?v=2',
    data: query,
    contentType:"application/atom+xml",
    dataType:"xml",
    success: function(data){
        alert(data);
    }
});

When I do this request I get an error 400 (bad url request). Then I tried with this URL for entries :

query += '<id>http://gdata.youtube.com/feeds/api/users/' + youtube_username + '/subscriptions/</id>';

But I got this error :

Element type “feed” must be followed by either attribute specifications, “>” or “/>”.

Thank you and have a nice day,
Kevin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:19:49+00:00Added an answer on June 18, 2026 at 9:19 am

    “Batch processing requests support query (GET) operations for feed entries but not for entire feeds. For example, if you are sending a batch request for a playlist, you can include one or more entries that retrieve information about individual playlist entries. However, the batch request cannot retrieve the playlist feed that contains those entries.”, as documented in https://developers.google.com/youtube/2.0/developers_guide_protocol_batch_processing

    I prefer explain on this way:

    • Assume subscriptions is what you want process with batch. You open
      http://gdata.youtube.com/feeds/api/users/google/subscriptions?v=2&alt=json&prettyprint=True

      1. Navigate the entry, extract entry id. The id is not extract from id”: {“$t”: “tag:youtube.com,2008:user:google:subscriptions”} or tag:youtube.com,2008:user:google:subscription:X7RMFNKroIVT2j3zlJcZK2BI2_ZLB1PH1-0aiYV1oMo, you should find the link tag with self, that means you extract the id from link’s self tag. The id would be http://gdata.youtube.com/feeds/api/users/google/subscriptions/X7RMFNKroIVT2j3zlJcZK7VKfC7MoH_jycANXotcvEI?v=2. One more thing, the link tag is inside entry tag, not inside feed. If you extract it from feed, you would get http://gdata.youtube.com/feeds/api/users/google/subscriptions?alt=json&start-index=1&max-results=25&v=2 which is wrong.
      1. And finally, request API. Example of using curl is:
        curl -vLk -d "<feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:yt='http://gdata.youtube.com/schemas/2007'><batch:operation type='query'/><entry><id>http://gdata.youtube.com/feeds/api/users/google/subscriptions/X7RMFNKroIVT2j3zlJcZK7VKfC7MoH_jycANXotcvEI?v=2</id></entry></feed>" -X POST "http://gdata.youtube.com/feeds/api/users/google/subscriptions/batch?v=2"

    Another example is video, such as:

    curl -vLk -d “http://www.w3.org/2005/Atom’ xmlns:media=’http://search.yahoo.com/mrss/‘ xmlns:batch=’http://schemas.google.com/gdata/batch‘ xmlns:yt=’http://gdata.youtube.com/schemas/2007‘>https://gdata.youtube.com/feeds/api/videos/EWKcFuluXpo” -X POST “https://gdata.youtube.com/feeds/api/videos/batch?v=2“

    And user/channel’s info example, such as:

    curl -vLk -d “http://www.w3.org/2005/Atom’ xmlns:media=’http://search.yahoo.com/mrss/‘ xmlns:batch=’http://schemas.google.com/gdata/batch‘ xmlns:yt=’http://gdata.youtube.com/schemas/2007‘>http://gdata.youtube.com/feeds/api/users/GoogleDevelopers” -X POST “http://gdata.youtube.com/feeds/api/users/batch?v=2“

    So, i don’t think it’s possible query list of subscriptions by batch processing, without knowing the entry id in the first place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Basically, what I'm trying to create is a page of div tags, each has
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm trying to create an if statement in PHP that prevents a single post
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I would like to count the length of a string with PHP. The string
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.