Youtube Video title with API v3 without API key?












12















Is it possible to get the video title using the video ID with API v3 without the API key? I could not find any information or example of getting the title in the API documentation.










share|improve this question





























    12















    Is it possible to get the video title using the video ID with API v3 without the API key? I could not find any information or example of getting the title in the API documentation.










    share|improve this question



























      12












      12








      12


      6






      Is it possible to get the video title using the video ID with API v3 without the API key? I could not find any information or example of getting the title in the API documentation.










      share|improve this question
















      Is it possible to get the video title using the video ID with API v3 without the API key? I could not find any information or example of getting the title in the API documentation.







      youtube youtube-api youtube-api-v3






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 6 '15 at 19:47









      Limon Monte

      26.7k26115155




      26.7k26115155










      asked May 6 '15 at 17:52









      samsam

      4062514




      4062514
























          4 Answers
          4






          active

          oldest

          votes


















          16














          To get the video title, you will need an API key, and you'll need to make a request to:



          https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY}


          In the returned packet, the title will be at items.snippet.title



          You can't retrieve any API data without an API key; all API requests are on a quota system, and the key is used to determine how much to charge your app's daily limit. A call like the above, however, is quite inexpensive; it's a total of 3 units (2 for the snippet and 1 for the request itself). Since you get 50,000,000 units a day and can retrieve up to 50 snippets for that same 3 units, it's not much of a burden to use the API key.






          share|improve this answer



















          • 1





            Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

            – andreszs
            May 6 '15 at 22:26






          • 1





            It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

            – jlmcdonald
            May 7 '15 at 4:08



















          21














          No need for API key



          To get the video title, you will NOT need an API key, and you'll need to make a request to:



          https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ



          Change the YouTube URL for the video that you need.



          It also works with Vimeo and many other supported sites with URLs like:



          https://noembed.com/embed?url=https://vimeo.com/45196609



          Details



          It is not possible to get the video title using the video ID with API v3 without the API key if you use the API directly. The YouTube Data API v2 is deprecated (see: YouTube Data API v2 Deprecation: Frequently Asked Questions) and currently the YouTube API doesn't support oEmbed with JSONP as it should (see Issue 4329: oEmbed callback for JSONP).



          But fortunately there is the Noembed service that lets you get the titles (and other data) of YouTube videos with JSONP and without the API key.



          Demo



          Here is a simple demo to get the title with jQuery:



          var id = 'dQw4w9WgXcQ';
          var url = 'https://www.youtube.com/watch?v=' + id;

          $.getJSON('https://noembed.com/embed',
          {format: 'json', url: url}, function (data) {
          alert(data.title);
          });


          See DEMO on JS Bin.



          See also these questions:




          • Get Youtube information via JSON for single video (not feed) in Javascript

          • Response for JSONp request to youtube oembed call giving "invalid label" error






          share|improve this answer


























          • that's cool,, thanks

            – Lafif Astahdziq
            Sep 10 '15 at 14:24



















          3














          It appear that it is precisely the meaning of the oEmbed protocol.




          oEmbed is a format for allowing an embedded representation of a URL on
          third party sites. The simple API allows a website to display embedded
          content (such as photos or videos) when a user posts a link to that
          resource, without having to parse the resource directly.



          This document is stored on GitHub.




          More informations on the format at: https://oembed.com



          https://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json


          Sample output:



          {
          "version": "1.0",
          "type": "video",
          "provider_name": "YouTube",
          "provider_url": "http://youtube.com/",
          "width": 425,
          "height": 344,
          "title": "Amazing Nintendo Facts",
          "author_name": "ZackScott",
          "author_url": "http://www.youtube.com/user/ZackScott",
          "html":
          "<object width="425" height="344">
          <param name="movie" value="http://www.youtube.com/v/M3r2XDceM6A&fs=1"></param>
          <param name="allowFullScreen" value="true"></param>
          <param name="allowscriptaccess" value="always"></param>
          <embed src="http://www.youtube.com/v/M3r2XDceM6A&fs=1"
          type="application/x-shockwave-flash" width="425" height="344"
          allowscriptaccess="always" allowfullscreen="true"></embed>
          </object>",
          }


          Here is a list of content providers that declared adhere to the format:



              "provider_name": "23HQ",
          "provider_name": "Adways",
          "provider_name": "Alpha App Net",
          "provider_name": "amCharts Live Editor",
          "provider_name": "Animatron",
          "provider_name": "Animoto",
          "provider_name": "Audiomack",
          "provider_name": "AudioSnaps",
          "provider_name": "Blackfire.io",
          "provider_name": "Box Office Buz",
          "provider_name": "Buttondown",
          "provider_name": "Cacoo",
          "provider_name": "Carbon Health",
          "provider_name": "CatBoat",
          "provider_name": "ChartBlocks",
          "provider_name": "chirbit.com",
          "provider_name": "CircuitLab",
          "provider_name": "Clipland",
          "provider_name": "Clyp",
          "provider_name": "Codepen",
          "provider_name": "Codepoints",
          "provider_name": "CodeSandbox",
          "provider_name": "CollegeHumor",
          "provider_name": "Commaful",
          "provider_name": "Coub",
          "provider_name": "Crowd Ranking",
          "provider_name": "Cyrano Systems",
          "provider_name": "Daily Mile",
          "provider_name": "Dailymotion",
          "provider_name": "Deviantart.com",
          "provider_name": "Didacte",
          "provider_name": "Dipity",
          "provider_name": "DocDroid",
          "provider_name": "Docs",
          "provider_name": "Dotsub",
          "provider_name": "edocr",
          "provider_name": "eduMedia",
          "provider_name": "EgliseInfo",
          "provider_name": "Embed Articles",
          "provider_name": "Embedly",
          "provider_name": "Ethfiddle",
          "provider_name": "Eyrie",
          "provider_name": "Facebook (Video)",
          "provider_name": "Flat",
          "provider_name": "Flickr",
          "provider_name": "FOX SPORTS Australia",
          "provider_name": "FrameBuzz",
          "provider_name": "FunnyOrDie",
          "provider_name": "Geograph Britain and Ireland",
          "provider_name": "Geograph Channel Islands",
          "provider_name": "Geograph Germany",
          "provider_name": "Getty Images",
          "provider_name": "Gfycat",
          "provider_name": "GIPHY",
          "provider_name": "Gyazo",
          "provider_name": "HuffDuffer",
          "provider_name": "Hulu",
          "provider_name": "iFixit",
          "provider_name": "IFTTT",
          "provider_name": "Indaco",
          "provider_name": "Infogram",
          "provider_name": "Inoreader",
          "provider_name": "inphood",
          "provider_name": "Instagram",
          "provider_name": "iSnare Articles",
          "provider_name": "ivlismusic",
          "provider_name": "Kickstarter",
          "provider_name": "Kidoju",
          "provider_name": "Kit",
          "provider_name": "Kitchenbowl",
          "provider_name": "Knacki",
          "provider_name": "LearningApps.org",
          "provider_name": "Ludus",
          "provider_name": "MathEmbed",
          "provider_name": "me.me",
          "provider_name": "Meetup",
          "provider_name": "MixCloud",
          "provider_name": "Moby Picture",
          "provider_name": "Modelo",
          "provider_name": "myBeweeg",
          "provider_name": "nanoo.tv",
          "provider_name": "nfb.ca",
          "provider_name": "Odds.com.au",
          "provider_name": "Office Mix",
          "provider_name": "Official FM",
          "provider_name": "On Aol",
          "provider_name": "Ora TV",
          "provider_name": "Orbitvu",
          "provider_name": "Oumy",
          "provider_name": "Pastery",
          "provider_name": "Pixdor",
          "provider_name": "Poll Daddy",
          "provider_name": "Port",
          "provider_name": "Portfolium",
          "provider_name": "Punters",
          "provider_name": "Quiz.biz",
          "provider_name": "Quizz.biz",
          "provider_name": "RapidEngage",
          "provider_name": "Reddit",
          "provider_name": "ReleaseWire",
          "provider_name": "RepubHub",
          "provider_name": "ReverbNation",
          "provider_name": "Roomshare",
          "provider_name": "Rumble",
          "provider_name": "Sapo Videos",
          "provider_name": "Screen9",
          "provider_name": "Screencast.com",
          "provider_name": "Screenr",
          "provider_name": "ScribbleMaps",
          "provider_name": "Scribd",
          "provider_name": "ShortNote",
          "provider_name": "Shoudio",
          "provider_name": "Show the Way, actionable location info",
          "provider_name": "Silk",
          "provider_name": "Simplecast",
          "provider_name": "Sizzle",
          "provider_name": "Sketchfab",
          "provider_name": "SlideShare",
          "provider_name": "SmugMug",
          "provider_name": "SocialExplorer",
          "provider_name": "Songlink",
          "provider_name": "SoundCloud",
          "provider_name": "Soundsgood",
          "provider_name": "SpeakerDeck",
          "provider_name": "Spotful",
          "provider_name": "Spreaker",
          "provider_name": "Streamable",
          "provider_name": "StreamOneCloud",
          "provider_name": "Sutori",
          "provider_name": "Sway",
          "provider_name": "Ted",
          "provider_name": "The New York Times",
          "provider_name": "They Said So",
          "provider_name": "TickCounter",
          "provider_name": "Toornament",
          "provider_name": "Topy",
          "provider_name": "Twitch",
          "provider_name": "Twitter",
          "provider_name": "Ubideo",
          "provider_name": "UOL",
          "provider_name": "Ustream",
          "provider_name": "Utposts",
          "provider_name": "Uttles",
          "provider_name": "VeeR VR",
          "provider_name": "Verse",
          "provider_name": "VEVO",
          "provider_name": "VideoJug",
          "provider_name": "Vidlit",
          "provider_name": "Vimeo",
          "provider_name": "Vlipsy",
          "provider_name": "wecandeo",
          "provider_name": "Wiredrive",
          "provider_name": "wizer.me",
          "provider_name": "Wootled",
          "provider_name": "WordPress.com",
          "provider_name": "Yes, I Know IT!",
          "provider_name": "YFrog",
          "provider_name": "YouTube",
          "provider_name": "ZProvider",


          Note that this doesn't mean that CORS is enabled on this websites.



          This data are mostly made to be parsed server side.



          Most of this informations can also be obtained by parsing the <meta og> open graph html attributes of a given page.



          See http://ogp.me/ for infos about open graph.






          share|improve this answer





















          • 1





            This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

            – Tinus Tate
            Jan 4 at 11:12



















          0














          Yes You Can Without Any API Just Requests an re Modules



          Code In Python:



          import requests,re

          video_url = "https://www.youtube.com/watch?v=2i2khp_npdE"

          response = requests.get(video_url).text

          title = re.findall(r'"title":"[^>]*",',response)[0].split(',')[0][9:-1]

          print("n[+] Video Title: {}".format(title))


          Output:



          [+] Video Title: Alan Walker - Sing Me To Sleep






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30084140%2fyoutube-video-title-with-api-v3-without-api-key%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            16














            To get the video title, you will need an API key, and you'll need to make a request to:



            https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY}


            In the returned packet, the title will be at items.snippet.title



            You can't retrieve any API data without an API key; all API requests are on a quota system, and the key is used to determine how much to charge your app's daily limit. A call like the above, however, is quite inexpensive; it's a total of 3 units (2 for the snippet and 1 for the request itself). Since you get 50,000,000 units a day and can retrieve up to 50 snippets for that same 3 units, it's not much of a burden to use the API key.






            share|improve this answer



















            • 1





              Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

              – andreszs
              May 6 '15 at 22:26






            • 1





              It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

              – jlmcdonald
              May 7 '15 at 4:08
















            16














            To get the video title, you will need an API key, and you'll need to make a request to:



            https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY}


            In the returned packet, the title will be at items.snippet.title



            You can't retrieve any API data without an API key; all API requests are on a quota system, and the key is used to determine how much to charge your app's daily limit. A call like the above, however, is quite inexpensive; it's a total of 3 units (2 for the snippet and 1 for the request itself). Since you get 50,000,000 units a day and can retrieve up to 50 snippets for that same 3 units, it's not much of a burden to use the API key.






            share|improve this answer



















            • 1





              Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

              – andreszs
              May 6 '15 at 22:26






            • 1





              It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

              – jlmcdonald
              May 7 '15 at 4:08














            16












            16








            16







            To get the video title, you will need an API key, and you'll need to make a request to:



            https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY}


            In the returned packet, the title will be at items.snippet.title



            You can't retrieve any API data without an API key; all API requests are on a quota system, and the key is used to determine how much to charge your app's daily limit. A call like the above, however, is quite inexpensive; it's a total of 3 units (2 for the snippet and 1 for the request itself). Since you get 50,000,000 units a day and can retrieve up to 50 snippets for that same 3 units, it's not much of a burden to use the API key.






            share|improve this answer













            To get the video title, you will need an API key, and you'll need to make a request to:



            https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY}


            In the returned packet, the title will be at items.snippet.title



            You can't retrieve any API data without an API key; all API requests are on a quota system, and the key is used to determine how much to charge your app's daily limit. A call like the above, however, is quite inexpensive; it's a total of 3 units (2 for the snippet and 1 for the request itself). Since you get 50,000,000 units a day and can retrieve up to 50 snippets for that same 3 units, it's not much of a burden to use the API key.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 6 '15 at 18:59









            jlmcdonaldjlmcdonald

            10.8k23653




            10.8k23653








            • 1





              Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

              – andreszs
              May 6 '15 at 22:26






            • 1





              It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

              – jlmcdonald
              May 7 '15 at 4:08














            • 1





              Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

              – andreszs
              May 6 '15 at 22:26






            • 1





              It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

              – jlmcdonald
              May 7 '15 at 4:08








            1




            1





            Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

            – andreszs
            May 6 '15 at 22:26





            Great, the video length field is gone from API v3. Why they have to break stuff that worked perfectly these Google guys? >:(

            – andreszs
            May 6 '15 at 22:26




            1




            1





            It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

            – jlmcdonald
            May 7 '15 at 4:08





            It's not gone, it's just in a different "part" -- primarily so that people who don't need the duration don't get charged for the quota (V3 is much more modular, whereas V2 just returned huge XML files to everything and ended up being pretty wasteful). The video duration is in the contentDetails part, so a request like this: googleapis.com/youtube/v3/videos?part=contentDetails&id={VIDEO_ID}&key={YOUR_API_KEY} will allow you to access the items.contentDetails.duration parameter. Note that the value is in ISO-8601-Duration format, so you might need to convert it.

            – jlmcdonald
            May 7 '15 at 4:08













            21














            No need for API key



            To get the video title, you will NOT need an API key, and you'll need to make a request to:



            https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ



            Change the YouTube URL for the video that you need.



            It also works with Vimeo and many other supported sites with URLs like:



            https://noembed.com/embed?url=https://vimeo.com/45196609



            Details



            It is not possible to get the video title using the video ID with API v3 without the API key if you use the API directly. The YouTube Data API v2 is deprecated (see: YouTube Data API v2 Deprecation: Frequently Asked Questions) and currently the YouTube API doesn't support oEmbed with JSONP as it should (see Issue 4329: oEmbed callback for JSONP).



            But fortunately there is the Noembed service that lets you get the titles (and other data) of YouTube videos with JSONP and without the API key.



            Demo



            Here is a simple demo to get the title with jQuery:



            var id = 'dQw4w9WgXcQ';
            var url = 'https://www.youtube.com/watch?v=' + id;

            $.getJSON('https://noembed.com/embed',
            {format: 'json', url: url}, function (data) {
            alert(data.title);
            });


            See DEMO on JS Bin.



            See also these questions:




            • Get Youtube information via JSON for single video (not feed) in Javascript

            • Response for JSONp request to youtube oembed call giving "invalid label" error






            share|improve this answer


























            • that's cool,, thanks

              – Lafif Astahdziq
              Sep 10 '15 at 14:24
















            21














            No need for API key



            To get the video title, you will NOT need an API key, and you'll need to make a request to:



            https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ



            Change the YouTube URL for the video that you need.



            It also works with Vimeo and many other supported sites with URLs like:



            https://noembed.com/embed?url=https://vimeo.com/45196609



            Details



            It is not possible to get the video title using the video ID with API v3 without the API key if you use the API directly. The YouTube Data API v2 is deprecated (see: YouTube Data API v2 Deprecation: Frequently Asked Questions) and currently the YouTube API doesn't support oEmbed with JSONP as it should (see Issue 4329: oEmbed callback for JSONP).



            But fortunately there is the Noembed service that lets you get the titles (and other data) of YouTube videos with JSONP and without the API key.



            Demo



            Here is a simple demo to get the title with jQuery:



            var id = 'dQw4w9WgXcQ';
            var url = 'https://www.youtube.com/watch?v=' + id;

            $.getJSON('https://noembed.com/embed',
            {format: 'json', url: url}, function (data) {
            alert(data.title);
            });


            See DEMO on JS Bin.



            See also these questions:




            • Get Youtube information via JSON for single video (not feed) in Javascript

            • Response for JSONp request to youtube oembed call giving "invalid label" error






            share|improve this answer


























            • that's cool,, thanks

              – Lafif Astahdziq
              Sep 10 '15 at 14:24














            21












            21








            21







            No need for API key



            To get the video title, you will NOT need an API key, and you'll need to make a request to:



            https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ



            Change the YouTube URL for the video that you need.



            It also works with Vimeo and many other supported sites with URLs like:



            https://noembed.com/embed?url=https://vimeo.com/45196609



            Details



            It is not possible to get the video title using the video ID with API v3 without the API key if you use the API directly. The YouTube Data API v2 is deprecated (see: YouTube Data API v2 Deprecation: Frequently Asked Questions) and currently the YouTube API doesn't support oEmbed with JSONP as it should (see Issue 4329: oEmbed callback for JSONP).



            But fortunately there is the Noembed service that lets you get the titles (and other data) of YouTube videos with JSONP and without the API key.



            Demo



            Here is a simple demo to get the title with jQuery:



            var id = 'dQw4w9WgXcQ';
            var url = 'https://www.youtube.com/watch?v=' + id;

            $.getJSON('https://noembed.com/embed',
            {format: 'json', url: url}, function (data) {
            alert(data.title);
            });


            See DEMO on JS Bin.



            See also these questions:




            • Get Youtube information via JSON for single video (not feed) in Javascript

            • Response for JSONp request to youtube oembed call giving "invalid label" error






            share|improve this answer















            No need for API key



            To get the video title, you will NOT need an API key, and you'll need to make a request to:



            https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ



            Change the YouTube URL for the video that you need.



            It also works with Vimeo and many other supported sites with URLs like:



            https://noembed.com/embed?url=https://vimeo.com/45196609



            Details



            It is not possible to get the video title using the video ID with API v3 without the API key if you use the API directly. The YouTube Data API v2 is deprecated (see: YouTube Data API v2 Deprecation: Frequently Asked Questions) and currently the YouTube API doesn't support oEmbed with JSONP as it should (see Issue 4329: oEmbed callback for JSONP).



            But fortunately there is the Noembed service that lets you get the titles (and other data) of YouTube videos with JSONP and without the API key.



            Demo



            Here is a simple demo to get the title with jQuery:



            var id = 'dQw4w9WgXcQ';
            var url = 'https://www.youtube.com/watch?v=' + id;

            $.getJSON('https://noembed.com/embed',
            {format: 'json', url: url}, function (data) {
            alert(data.title);
            });


            See DEMO on JS Bin.



            See also these questions:




            • Get Youtube information via JSON for single video (not feed) in Javascript

            • Response for JSONp request to youtube oembed call giving "invalid label" error







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 25 '15 at 8:14

























            answered Aug 24 '15 at 20:10









            rsprsp

            66.8k13116116




            66.8k13116116













            • that's cool,, thanks

              – Lafif Astahdziq
              Sep 10 '15 at 14:24



















            • that's cool,, thanks

              – Lafif Astahdziq
              Sep 10 '15 at 14:24

















            that's cool,, thanks

            – Lafif Astahdziq
            Sep 10 '15 at 14:24





            that's cool,, thanks

            – Lafif Astahdziq
            Sep 10 '15 at 14:24











            3














            It appear that it is precisely the meaning of the oEmbed protocol.




            oEmbed is a format for allowing an embedded representation of a URL on
            third party sites. The simple API allows a website to display embedded
            content (such as photos or videos) when a user posts a link to that
            resource, without having to parse the resource directly.



            This document is stored on GitHub.




            More informations on the format at: https://oembed.com



            https://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json


            Sample output:



            {
            "version": "1.0",
            "type": "video",
            "provider_name": "YouTube",
            "provider_url": "http://youtube.com/",
            "width": 425,
            "height": 344,
            "title": "Amazing Nintendo Facts",
            "author_name": "ZackScott",
            "author_url": "http://www.youtube.com/user/ZackScott",
            "html":
            "<object width="425" height="344">
            <param name="movie" value="http://www.youtube.com/v/M3r2XDceM6A&fs=1"></param>
            <param name="allowFullScreen" value="true"></param>
            <param name="allowscriptaccess" value="always"></param>
            <embed src="http://www.youtube.com/v/M3r2XDceM6A&fs=1"
            type="application/x-shockwave-flash" width="425" height="344"
            allowscriptaccess="always" allowfullscreen="true"></embed>
            </object>",
            }


            Here is a list of content providers that declared adhere to the format:



                "provider_name": "23HQ",
            "provider_name": "Adways",
            "provider_name": "Alpha App Net",
            "provider_name": "amCharts Live Editor",
            "provider_name": "Animatron",
            "provider_name": "Animoto",
            "provider_name": "Audiomack",
            "provider_name": "AudioSnaps",
            "provider_name": "Blackfire.io",
            "provider_name": "Box Office Buz",
            "provider_name": "Buttondown",
            "provider_name": "Cacoo",
            "provider_name": "Carbon Health",
            "provider_name": "CatBoat",
            "provider_name": "ChartBlocks",
            "provider_name": "chirbit.com",
            "provider_name": "CircuitLab",
            "provider_name": "Clipland",
            "provider_name": "Clyp",
            "provider_name": "Codepen",
            "provider_name": "Codepoints",
            "provider_name": "CodeSandbox",
            "provider_name": "CollegeHumor",
            "provider_name": "Commaful",
            "provider_name": "Coub",
            "provider_name": "Crowd Ranking",
            "provider_name": "Cyrano Systems",
            "provider_name": "Daily Mile",
            "provider_name": "Dailymotion",
            "provider_name": "Deviantart.com",
            "provider_name": "Didacte",
            "provider_name": "Dipity",
            "provider_name": "DocDroid",
            "provider_name": "Docs",
            "provider_name": "Dotsub",
            "provider_name": "edocr",
            "provider_name": "eduMedia",
            "provider_name": "EgliseInfo",
            "provider_name": "Embed Articles",
            "provider_name": "Embedly",
            "provider_name": "Ethfiddle",
            "provider_name": "Eyrie",
            "provider_name": "Facebook (Video)",
            "provider_name": "Flat",
            "provider_name": "Flickr",
            "provider_name": "FOX SPORTS Australia",
            "provider_name": "FrameBuzz",
            "provider_name": "FunnyOrDie",
            "provider_name": "Geograph Britain and Ireland",
            "provider_name": "Geograph Channel Islands",
            "provider_name": "Geograph Germany",
            "provider_name": "Getty Images",
            "provider_name": "Gfycat",
            "provider_name": "GIPHY",
            "provider_name": "Gyazo",
            "provider_name": "HuffDuffer",
            "provider_name": "Hulu",
            "provider_name": "iFixit",
            "provider_name": "IFTTT",
            "provider_name": "Indaco",
            "provider_name": "Infogram",
            "provider_name": "Inoreader",
            "provider_name": "inphood",
            "provider_name": "Instagram",
            "provider_name": "iSnare Articles",
            "provider_name": "ivlismusic",
            "provider_name": "Kickstarter",
            "provider_name": "Kidoju",
            "provider_name": "Kit",
            "provider_name": "Kitchenbowl",
            "provider_name": "Knacki",
            "provider_name": "LearningApps.org",
            "provider_name": "Ludus",
            "provider_name": "MathEmbed",
            "provider_name": "me.me",
            "provider_name": "Meetup",
            "provider_name": "MixCloud",
            "provider_name": "Moby Picture",
            "provider_name": "Modelo",
            "provider_name": "myBeweeg",
            "provider_name": "nanoo.tv",
            "provider_name": "nfb.ca",
            "provider_name": "Odds.com.au",
            "provider_name": "Office Mix",
            "provider_name": "Official FM",
            "provider_name": "On Aol",
            "provider_name": "Ora TV",
            "provider_name": "Orbitvu",
            "provider_name": "Oumy",
            "provider_name": "Pastery",
            "provider_name": "Pixdor",
            "provider_name": "Poll Daddy",
            "provider_name": "Port",
            "provider_name": "Portfolium",
            "provider_name": "Punters",
            "provider_name": "Quiz.biz",
            "provider_name": "Quizz.biz",
            "provider_name": "RapidEngage",
            "provider_name": "Reddit",
            "provider_name": "ReleaseWire",
            "provider_name": "RepubHub",
            "provider_name": "ReverbNation",
            "provider_name": "Roomshare",
            "provider_name": "Rumble",
            "provider_name": "Sapo Videos",
            "provider_name": "Screen9",
            "provider_name": "Screencast.com",
            "provider_name": "Screenr",
            "provider_name": "ScribbleMaps",
            "provider_name": "Scribd",
            "provider_name": "ShortNote",
            "provider_name": "Shoudio",
            "provider_name": "Show the Way, actionable location info",
            "provider_name": "Silk",
            "provider_name": "Simplecast",
            "provider_name": "Sizzle",
            "provider_name": "Sketchfab",
            "provider_name": "SlideShare",
            "provider_name": "SmugMug",
            "provider_name": "SocialExplorer",
            "provider_name": "Songlink",
            "provider_name": "SoundCloud",
            "provider_name": "Soundsgood",
            "provider_name": "SpeakerDeck",
            "provider_name": "Spotful",
            "provider_name": "Spreaker",
            "provider_name": "Streamable",
            "provider_name": "StreamOneCloud",
            "provider_name": "Sutori",
            "provider_name": "Sway",
            "provider_name": "Ted",
            "provider_name": "The New York Times",
            "provider_name": "They Said So",
            "provider_name": "TickCounter",
            "provider_name": "Toornament",
            "provider_name": "Topy",
            "provider_name": "Twitch",
            "provider_name": "Twitter",
            "provider_name": "Ubideo",
            "provider_name": "UOL",
            "provider_name": "Ustream",
            "provider_name": "Utposts",
            "provider_name": "Uttles",
            "provider_name": "VeeR VR",
            "provider_name": "Verse",
            "provider_name": "VEVO",
            "provider_name": "VideoJug",
            "provider_name": "Vidlit",
            "provider_name": "Vimeo",
            "provider_name": "Vlipsy",
            "provider_name": "wecandeo",
            "provider_name": "Wiredrive",
            "provider_name": "wizer.me",
            "provider_name": "Wootled",
            "provider_name": "WordPress.com",
            "provider_name": "Yes, I Know IT!",
            "provider_name": "YFrog",
            "provider_name": "YouTube",
            "provider_name": "ZProvider",


            Note that this doesn't mean that CORS is enabled on this websites.



            This data are mostly made to be parsed server side.



            Most of this informations can also be obtained by parsing the <meta og> open graph html attributes of a given page.



            See http://ogp.me/ for infos about open graph.






            share|improve this answer





















            • 1





              This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

              – Tinus Tate
              Jan 4 at 11:12
















            3














            It appear that it is precisely the meaning of the oEmbed protocol.




            oEmbed is a format for allowing an embedded representation of a URL on
            third party sites. The simple API allows a website to display embedded
            content (such as photos or videos) when a user posts a link to that
            resource, without having to parse the resource directly.



            This document is stored on GitHub.




            More informations on the format at: https://oembed.com



            https://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json


            Sample output:



            {
            "version": "1.0",
            "type": "video",
            "provider_name": "YouTube",
            "provider_url": "http://youtube.com/",
            "width": 425,
            "height": 344,
            "title": "Amazing Nintendo Facts",
            "author_name": "ZackScott",
            "author_url": "http://www.youtube.com/user/ZackScott",
            "html":
            "<object width="425" height="344">
            <param name="movie" value="http://www.youtube.com/v/M3r2XDceM6A&fs=1"></param>
            <param name="allowFullScreen" value="true"></param>
            <param name="allowscriptaccess" value="always"></param>
            <embed src="http://www.youtube.com/v/M3r2XDceM6A&fs=1"
            type="application/x-shockwave-flash" width="425" height="344"
            allowscriptaccess="always" allowfullscreen="true"></embed>
            </object>",
            }


            Here is a list of content providers that declared adhere to the format:



                "provider_name": "23HQ",
            "provider_name": "Adways",
            "provider_name": "Alpha App Net",
            "provider_name": "amCharts Live Editor",
            "provider_name": "Animatron",
            "provider_name": "Animoto",
            "provider_name": "Audiomack",
            "provider_name": "AudioSnaps",
            "provider_name": "Blackfire.io",
            "provider_name": "Box Office Buz",
            "provider_name": "Buttondown",
            "provider_name": "Cacoo",
            "provider_name": "Carbon Health",
            "provider_name": "CatBoat",
            "provider_name": "ChartBlocks",
            "provider_name": "chirbit.com",
            "provider_name": "CircuitLab",
            "provider_name": "Clipland",
            "provider_name": "Clyp",
            "provider_name": "Codepen",
            "provider_name": "Codepoints",
            "provider_name": "CodeSandbox",
            "provider_name": "CollegeHumor",
            "provider_name": "Commaful",
            "provider_name": "Coub",
            "provider_name": "Crowd Ranking",
            "provider_name": "Cyrano Systems",
            "provider_name": "Daily Mile",
            "provider_name": "Dailymotion",
            "provider_name": "Deviantart.com",
            "provider_name": "Didacte",
            "provider_name": "Dipity",
            "provider_name": "DocDroid",
            "provider_name": "Docs",
            "provider_name": "Dotsub",
            "provider_name": "edocr",
            "provider_name": "eduMedia",
            "provider_name": "EgliseInfo",
            "provider_name": "Embed Articles",
            "provider_name": "Embedly",
            "provider_name": "Ethfiddle",
            "provider_name": "Eyrie",
            "provider_name": "Facebook (Video)",
            "provider_name": "Flat",
            "provider_name": "Flickr",
            "provider_name": "FOX SPORTS Australia",
            "provider_name": "FrameBuzz",
            "provider_name": "FunnyOrDie",
            "provider_name": "Geograph Britain and Ireland",
            "provider_name": "Geograph Channel Islands",
            "provider_name": "Geograph Germany",
            "provider_name": "Getty Images",
            "provider_name": "Gfycat",
            "provider_name": "GIPHY",
            "provider_name": "Gyazo",
            "provider_name": "HuffDuffer",
            "provider_name": "Hulu",
            "provider_name": "iFixit",
            "provider_name": "IFTTT",
            "provider_name": "Indaco",
            "provider_name": "Infogram",
            "provider_name": "Inoreader",
            "provider_name": "inphood",
            "provider_name": "Instagram",
            "provider_name": "iSnare Articles",
            "provider_name": "ivlismusic",
            "provider_name": "Kickstarter",
            "provider_name": "Kidoju",
            "provider_name": "Kit",
            "provider_name": "Kitchenbowl",
            "provider_name": "Knacki",
            "provider_name": "LearningApps.org",
            "provider_name": "Ludus",
            "provider_name": "MathEmbed",
            "provider_name": "me.me",
            "provider_name": "Meetup",
            "provider_name": "MixCloud",
            "provider_name": "Moby Picture",
            "provider_name": "Modelo",
            "provider_name": "myBeweeg",
            "provider_name": "nanoo.tv",
            "provider_name": "nfb.ca",
            "provider_name": "Odds.com.au",
            "provider_name": "Office Mix",
            "provider_name": "Official FM",
            "provider_name": "On Aol",
            "provider_name": "Ora TV",
            "provider_name": "Orbitvu",
            "provider_name": "Oumy",
            "provider_name": "Pastery",
            "provider_name": "Pixdor",
            "provider_name": "Poll Daddy",
            "provider_name": "Port",
            "provider_name": "Portfolium",
            "provider_name": "Punters",
            "provider_name": "Quiz.biz",
            "provider_name": "Quizz.biz",
            "provider_name": "RapidEngage",
            "provider_name": "Reddit",
            "provider_name": "ReleaseWire",
            "provider_name": "RepubHub",
            "provider_name": "ReverbNation",
            "provider_name": "Roomshare",
            "provider_name": "Rumble",
            "provider_name": "Sapo Videos",
            "provider_name": "Screen9",
            "provider_name": "Screencast.com",
            "provider_name": "Screenr",
            "provider_name": "ScribbleMaps",
            "provider_name": "Scribd",
            "provider_name": "ShortNote",
            "provider_name": "Shoudio",
            "provider_name": "Show the Way, actionable location info",
            "provider_name": "Silk",
            "provider_name": "Simplecast",
            "provider_name": "Sizzle",
            "provider_name": "Sketchfab",
            "provider_name": "SlideShare",
            "provider_name": "SmugMug",
            "provider_name": "SocialExplorer",
            "provider_name": "Songlink",
            "provider_name": "SoundCloud",
            "provider_name": "Soundsgood",
            "provider_name": "SpeakerDeck",
            "provider_name": "Spotful",
            "provider_name": "Spreaker",
            "provider_name": "Streamable",
            "provider_name": "StreamOneCloud",
            "provider_name": "Sutori",
            "provider_name": "Sway",
            "provider_name": "Ted",
            "provider_name": "The New York Times",
            "provider_name": "They Said So",
            "provider_name": "TickCounter",
            "provider_name": "Toornament",
            "provider_name": "Topy",
            "provider_name": "Twitch",
            "provider_name": "Twitter",
            "provider_name": "Ubideo",
            "provider_name": "UOL",
            "provider_name": "Ustream",
            "provider_name": "Utposts",
            "provider_name": "Uttles",
            "provider_name": "VeeR VR",
            "provider_name": "Verse",
            "provider_name": "VEVO",
            "provider_name": "VideoJug",
            "provider_name": "Vidlit",
            "provider_name": "Vimeo",
            "provider_name": "Vlipsy",
            "provider_name": "wecandeo",
            "provider_name": "Wiredrive",
            "provider_name": "wizer.me",
            "provider_name": "Wootled",
            "provider_name": "WordPress.com",
            "provider_name": "Yes, I Know IT!",
            "provider_name": "YFrog",
            "provider_name": "YouTube",
            "provider_name": "ZProvider",


            Note that this doesn't mean that CORS is enabled on this websites.



            This data are mostly made to be parsed server side.



            Most of this informations can also be obtained by parsing the <meta og> open graph html attributes of a given page.



            See http://ogp.me/ for infos about open graph.






            share|improve this answer





















            • 1





              This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

              – Tinus Tate
              Jan 4 at 11:12














            3












            3








            3







            It appear that it is precisely the meaning of the oEmbed protocol.




            oEmbed is a format for allowing an embedded representation of a URL on
            third party sites. The simple API allows a website to display embedded
            content (such as photos or videos) when a user posts a link to that
            resource, without having to parse the resource directly.



            This document is stored on GitHub.




            More informations on the format at: https://oembed.com



            https://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json


            Sample output:



            {
            "version": "1.0",
            "type": "video",
            "provider_name": "YouTube",
            "provider_url": "http://youtube.com/",
            "width": 425,
            "height": 344,
            "title": "Amazing Nintendo Facts",
            "author_name": "ZackScott",
            "author_url": "http://www.youtube.com/user/ZackScott",
            "html":
            "<object width="425" height="344">
            <param name="movie" value="http://www.youtube.com/v/M3r2XDceM6A&fs=1"></param>
            <param name="allowFullScreen" value="true"></param>
            <param name="allowscriptaccess" value="always"></param>
            <embed src="http://www.youtube.com/v/M3r2XDceM6A&fs=1"
            type="application/x-shockwave-flash" width="425" height="344"
            allowscriptaccess="always" allowfullscreen="true"></embed>
            </object>",
            }


            Here is a list of content providers that declared adhere to the format:



                "provider_name": "23HQ",
            "provider_name": "Adways",
            "provider_name": "Alpha App Net",
            "provider_name": "amCharts Live Editor",
            "provider_name": "Animatron",
            "provider_name": "Animoto",
            "provider_name": "Audiomack",
            "provider_name": "AudioSnaps",
            "provider_name": "Blackfire.io",
            "provider_name": "Box Office Buz",
            "provider_name": "Buttondown",
            "provider_name": "Cacoo",
            "provider_name": "Carbon Health",
            "provider_name": "CatBoat",
            "provider_name": "ChartBlocks",
            "provider_name": "chirbit.com",
            "provider_name": "CircuitLab",
            "provider_name": "Clipland",
            "provider_name": "Clyp",
            "provider_name": "Codepen",
            "provider_name": "Codepoints",
            "provider_name": "CodeSandbox",
            "provider_name": "CollegeHumor",
            "provider_name": "Commaful",
            "provider_name": "Coub",
            "provider_name": "Crowd Ranking",
            "provider_name": "Cyrano Systems",
            "provider_name": "Daily Mile",
            "provider_name": "Dailymotion",
            "provider_name": "Deviantart.com",
            "provider_name": "Didacte",
            "provider_name": "Dipity",
            "provider_name": "DocDroid",
            "provider_name": "Docs",
            "provider_name": "Dotsub",
            "provider_name": "edocr",
            "provider_name": "eduMedia",
            "provider_name": "EgliseInfo",
            "provider_name": "Embed Articles",
            "provider_name": "Embedly",
            "provider_name": "Ethfiddle",
            "provider_name": "Eyrie",
            "provider_name": "Facebook (Video)",
            "provider_name": "Flat",
            "provider_name": "Flickr",
            "provider_name": "FOX SPORTS Australia",
            "provider_name": "FrameBuzz",
            "provider_name": "FunnyOrDie",
            "provider_name": "Geograph Britain and Ireland",
            "provider_name": "Geograph Channel Islands",
            "provider_name": "Geograph Germany",
            "provider_name": "Getty Images",
            "provider_name": "Gfycat",
            "provider_name": "GIPHY",
            "provider_name": "Gyazo",
            "provider_name": "HuffDuffer",
            "provider_name": "Hulu",
            "provider_name": "iFixit",
            "provider_name": "IFTTT",
            "provider_name": "Indaco",
            "provider_name": "Infogram",
            "provider_name": "Inoreader",
            "provider_name": "inphood",
            "provider_name": "Instagram",
            "provider_name": "iSnare Articles",
            "provider_name": "ivlismusic",
            "provider_name": "Kickstarter",
            "provider_name": "Kidoju",
            "provider_name": "Kit",
            "provider_name": "Kitchenbowl",
            "provider_name": "Knacki",
            "provider_name": "LearningApps.org",
            "provider_name": "Ludus",
            "provider_name": "MathEmbed",
            "provider_name": "me.me",
            "provider_name": "Meetup",
            "provider_name": "MixCloud",
            "provider_name": "Moby Picture",
            "provider_name": "Modelo",
            "provider_name": "myBeweeg",
            "provider_name": "nanoo.tv",
            "provider_name": "nfb.ca",
            "provider_name": "Odds.com.au",
            "provider_name": "Office Mix",
            "provider_name": "Official FM",
            "provider_name": "On Aol",
            "provider_name": "Ora TV",
            "provider_name": "Orbitvu",
            "provider_name": "Oumy",
            "provider_name": "Pastery",
            "provider_name": "Pixdor",
            "provider_name": "Poll Daddy",
            "provider_name": "Port",
            "provider_name": "Portfolium",
            "provider_name": "Punters",
            "provider_name": "Quiz.biz",
            "provider_name": "Quizz.biz",
            "provider_name": "RapidEngage",
            "provider_name": "Reddit",
            "provider_name": "ReleaseWire",
            "provider_name": "RepubHub",
            "provider_name": "ReverbNation",
            "provider_name": "Roomshare",
            "provider_name": "Rumble",
            "provider_name": "Sapo Videos",
            "provider_name": "Screen9",
            "provider_name": "Screencast.com",
            "provider_name": "Screenr",
            "provider_name": "ScribbleMaps",
            "provider_name": "Scribd",
            "provider_name": "ShortNote",
            "provider_name": "Shoudio",
            "provider_name": "Show the Way, actionable location info",
            "provider_name": "Silk",
            "provider_name": "Simplecast",
            "provider_name": "Sizzle",
            "provider_name": "Sketchfab",
            "provider_name": "SlideShare",
            "provider_name": "SmugMug",
            "provider_name": "SocialExplorer",
            "provider_name": "Songlink",
            "provider_name": "SoundCloud",
            "provider_name": "Soundsgood",
            "provider_name": "SpeakerDeck",
            "provider_name": "Spotful",
            "provider_name": "Spreaker",
            "provider_name": "Streamable",
            "provider_name": "StreamOneCloud",
            "provider_name": "Sutori",
            "provider_name": "Sway",
            "provider_name": "Ted",
            "provider_name": "The New York Times",
            "provider_name": "They Said So",
            "provider_name": "TickCounter",
            "provider_name": "Toornament",
            "provider_name": "Topy",
            "provider_name": "Twitch",
            "provider_name": "Twitter",
            "provider_name": "Ubideo",
            "provider_name": "UOL",
            "provider_name": "Ustream",
            "provider_name": "Utposts",
            "provider_name": "Uttles",
            "provider_name": "VeeR VR",
            "provider_name": "Verse",
            "provider_name": "VEVO",
            "provider_name": "VideoJug",
            "provider_name": "Vidlit",
            "provider_name": "Vimeo",
            "provider_name": "Vlipsy",
            "provider_name": "wecandeo",
            "provider_name": "Wiredrive",
            "provider_name": "wizer.me",
            "provider_name": "Wootled",
            "provider_name": "WordPress.com",
            "provider_name": "Yes, I Know IT!",
            "provider_name": "YFrog",
            "provider_name": "YouTube",
            "provider_name": "ZProvider",


            Note that this doesn't mean that CORS is enabled on this websites.



            This data are mostly made to be parsed server side.



            Most of this informations can also be obtained by parsing the <meta og> open graph html attributes of a given page.



            See http://ogp.me/ for infos about open graph.






            share|improve this answer















            It appear that it is precisely the meaning of the oEmbed protocol.




            oEmbed is a format for allowing an embedded representation of a URL on
            third party sites. The simple API allows a website to display embedded
            content (such as photos or videos) when a user posts a link to that
            resource, without having to parse the resource directly.



            This document is stored on GitHub.




            More informations on the format at: https://oembed.com



            https://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json


            Sample output:



            {
            "version": "1.0",
            "type": "video",
            "provider_name": "YouTube",
            "provider_url": "http://youtube.com/",
            "width": 425,
            "height": 344,
            "title": "Amazing Nintendo Facts",
            "author_name": "ZackScott",
            "author_url": "http://www.youtube.com/user/ZackScott",
            "html":
            "<object width="425" height="344">
            <param name="movie" value="http://www.youtube.com/v/M3r2XDceM6A&fs=1"></param>
            <param name="allowFullScreen" value="true"></param>
            <param name="allowscriptaccess" value="always"></param>
            <embed src="http://www.youtube.com/v/M3r2XDceM6A&fs=1"
            type="application/x-shockwave-flash" width="425" height="344"
            allowscriptaccess="always" allowfullscreen="true"></embed>
            </object>",
            }


            Here is a list of content providers that declared adhere to the format:



                "provider_name": "23HQ",
            "provider_name": "Adways",
            "provider_name": "Alpha App Net",
            "provider_name": "amCharts Live Editor",
            "provider_name": "Animatron",
            "provider_name": "Animoto",
            "provider_name": "Audiomack",
            "provider_name": "AudioSnaps",
            "provider_name": "Blackfire.io",
            "provider_name": "Box Office Buz",
            "provider_name": "Buttondown",
            "provider_name": "Cacoo",
            "provider_name": "Carbon Health",
            "provider_name": "CatBoat",
            "provider_name": "ChartBlocks",
            "provider_name": "chirbit.com",
            "provider_name": "CircuitLab",
            "provider_name": "Clipland",
            "provider_name": "Clyp",
            "provider_name": "Codepen",
            "provider_name": "Codepoints",
            "provider_name": "CodeSandbox",
            "provider_name": "CollegeHumor",
            "provider_name": "Commaful",
            "provider_name": "Coub",
            "provider_name": "Crowd Ranking",
            "provider_name": "Cyrano Systems",
            "provider_name": "Daily Mile",
            "provider_name": "Dailymotion",
            "provider_name": "Deviantart.com",
            "provider_name": "Didacte",
            "provider_name": "Dipity",
            "provider_name": "DocDroid",
            "provider_name": "Docs",
            "provider_name": "Dotsub",
            "provider_name": "edocr",
            "provider_name": "eduMedia",
            "provider_name": "EgliseInfo",
            "provider_name": "Embed Articles",
            "provider_name": "Embedly",
            "provider_name": "Ethfiddle",
            "provider_name": "Eyrie",
            "provider_name": "Facebook (Video)",
            "provider_name": "Flat",
            "provider_name": "Flickr",
            "provider_name": "FOX SPORTS Australia",
            "provider_name": "FrameBuzz",
            "provider_name": "FunnyOrDie",
            "provider_name": "Geograph Britain and Ireland",
            "provider_name": "Geograph Channel Islands",
            "provider_name": "Geograph Germany",
            "provider_name": "Getty Images",
            "provider_name": "Gfycat",
            "provider_name": "GIPHY",
            "provider_name": "Gyazo",
            "provider_name": "HuffDuffer",
            "provider_name": "Hulu",
            "provider_name": "iFixit",
            "provider_name": "IFTTT",
            "provider_name": "Indaco",
            "provider_name": "Infogram",
            "provider_name": "Inoreader",
            "provider_name": "inphood",
            "provider_name": "Instagram",
            "provider_name": "iSnare Articles",
            "provider_name": "ivlismusic",
            "provider_name": "Kickstarter",
            "provider_name": "Kidoju",
            "provider_name": "Kit",
            "provider_name": "Kitchenbowl",
            "provider_name": "Knacki",
            "provider_name": "LearningApps.org",
            "provider_name": "Ludus",
            "provider_name": "MathEmbed",
            "provider_name": "me.me",
            "provider_name": "Meetup",
            "provider_name": "MixCloud",
            "provider_name": "Moby Picture",
            "provider_name": "Modelo",
            "provider_name": "myBeweeg",
            "provider_name": "nanoo.tv",
            "provider_name": "nfb.ca",
            "provider_name": "Odds.com.au",
            "provider_name": "Office Mix",
            "provider_name": "Official FM",
            "provider_name": "On Aol",
            "provider_name": "Ora TV",
            "provider_name": "Orbitvu",
            "provider_name": "Oumy",
            "provider_name": "Pastery",
            "provider_name": "Pixdor",
            "provider_name": "Poll Daddy",
            "provider_name": "Port",
            "provider_name": "Portfolium",
            "provider_name": "Punters",
            "provider_name": "Quiz.biz",
            "provider_name": "Quizz.biz",
            "provider_name": "RapidEngage",
            "provider_name": "Reddit",
            "provider_name": "ReleaseWire",
            "provider_name": "RepubHub",
            "provider_name": "ReverbNation",
            "provider_name": "Roomshare",
            "provider_name": "Rumble",
            "provider_name": "Sapo Videos",
            "provider_name": "Screen9",
            "provider_name": "Screencast.com",
            "provider_name": "Screenr",
            "provider_name": "ScribbleMaps",
            "provider_name": "Scribd",
            "provider_name": "ShortNote",
            "provider_name": "Shoudio",
            "provider_name": "Show the Way, actionable location info",
            "provider_name": "Silk",
            "provider_name": "Simplecast",
            "provider_name": "Sizzle",
            "provider_name": "Sketchfab",
            "provider_name": "SlideShare",
            "provider_name": "SmugMug",
            "provider_name": "SocialExplorer",
            "provider_name": "Songlink",
            "provider_name": "SoundCloud",
            "provider_name": "Soundsgood",
            "provider_name": "SpeakerDeck",
            "provider_name": "Spotful",
            "provider_name": "Spreaker",
            "provider_name": "Streamable",
            "provider_name": "StreamOneCloud",
            "provider_name": "Sutori",
            "provider_name": "Sway",
            "provider_name": "Ted",
            "provider_name": "The New York Times",
            "provider_name": "They Said So",
            "provider_name": "TickCounter",
            "provider_name": "Toornament",
            "provider_name": "Topy",
            "provider_name": "Twitch",
            "provider_name": "Twitter",
            "provider_name": "Ubideo",
            "provider_name": "UOL",
            "provider_name": "Ustream",
            "provider_name": "Utposts",
            "provider_name": "Uttles",
            "provider_name": "VeeR VR",
            "provider_name": "Verse",
            "provider_name": "VEVO",
            "provider_name": "VideoJug",
            "provider_name": "Vidlit",
            "provider_name": "Vimeo",
            "provider_name": "Vlipsy",
            "provider_name": "wecandeo",
            "provider_name": "Wiredrive",
            "provider_name": "wizer.me",
            "provider_name": "Wootled",
            "provider_name": "WordPress.com",
            "provider_name": "Yes, I Know IT!",
            "provider_name": "YFrog",
            "provider_name": "YouTube",
            "provider_name": "ZProvider",


            Note that this doesn't mean that CORS is enabled on this websites.



            This data are mostly made to be parsed server side.



            Most of this informations can also be obtained by parsing the <meta og> open graph html attributes of a given page.



            See http://ogp.me/ for infos about open graph.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 28 '18 at 13:32

























            answered Feb 20 '18 at 11:28









            CryptopatCryptopat

            1,75511722




            1,75511722








            • 1





              This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

              – Tinus Tate
              Jan 4 at 11:12














            • 1





              This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

              – Tinus Tate
              Jan 4 at 11:12








            1




            1





            This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

            – Tinus Tate
            Jan 4 at 11:12





            This is a good answer, it doesn't need an api key and it doesn't depend on third party services.

            – Tinus Tate
            Jan 4 at 11:12











            0














            Yes You Can Without Any API Just Requests an re Modules



            Code In Python:



            import requests,re

            video_url = "https://www.youtube.com/watch?v=2i2khp_npdE"

            response = requests.get(video_url).text

            title = re.findall(r'"title":"[^>]*",',response)[0].split(',')[0][9:-1]

            print("n[+] Video Title: {}".format(title))


            Output:



            [+] Video Title: Alan Walker - Sing Me To Sleep






            share|improve this answer






























              0














              Yes You Can Without Any API Just Requests an re Modules



              Code In Python:



              import requests,re

              video_url = "https://www.youtube.com/watch?v=2i2khp_npdE"

              response = requests.get(video_url).text

              title = re.findall(r'"title":"[^>]*",',response)[0].split(',')[0][9:-1]

              print("n[+] Video Title: {}".format(title))


              Output:



              [+] Video Title: Alan Walker - Sing Me To Sleep






              share|improve this answer




























                0












                0








                0







                Yes You Can Without Any API Just Requests an re Modules



                Code In Python:



                import requests,re

                video_url = "https://www.youtube.com/watch?v=2i2khp_npdE"

                response = requests.get(video_url).text

                title = re.findall(r'"title":"[^>]*",',response)[0].split(',')[0][9:-1]

                print("n[+] Video Title: {}".format(title))


                Output:



                [+] Video Title: Alan Walker - Sing Me To Sleep






                share|improve this answer















                Yes You Can Without Any API Just Requests an re Modules



                Code In Python:



                import requests,re

                video_url = "https://www.youtube.com/watch?v=2i2khp_npdE"

                response = requests.get(video_url).text

                title = re.findall(r'"title":"[^>]*",',response)[0].split(',')[0][9:-1]

                print("n[+] Video Title: {}".format(title))


                Output:



                [+] Video Title: Alan Walker - Sing Me To Sleep







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 15 '18 at 9:50

























                answered Nov 15 '18 at 9:35









                OseidOseid

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30084140%2fyoutube-video-title-with-api-v3-without-api-key%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Xamarin.iOS Cant Deploy on Iphone

                    Glorious Revolution

                    Dulmage-Mendelsohn matrix decomposition in Python