0% found this document useful (0 votes)
9 views3 pages

API Method 1 Json Rest API

The document provides two methods for using the Download Lagu MP3 API: a JSON REST API and a Button/Iframe API. Users can send HTTP requests to retrieve various formats of media from YouTube using specific URLs that include the desired format and YouTube video ID. The document also includes examples of the API requests and expected JSON responses for different media types.

Uploaded by

Justino Macadona
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

API Method 1 Json Rest API

The document provides two methods for using the Download Lagu MP3 API: a JSON REST API and a Button/Iframe API. Users can send HTTP requests to retrieve various formats of media from YouTube using specific URLs that include the desired format and YouTube video ID. The document also includes examples of the API requests and expected JSON responses for different media types.

Uploaded by

Justino Macadona
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

API

Method #1 - JSON REST API

Send an HTTP request to:

[Link]

...where {format} is one of the following:

"mp3" : for MP3 results


"videos" : for Video w/Audio results
"mergedstreams" : for Merged Video + Audio results
"videostreams" : for Video-Only results
"audiostreams" : for Audio-Only results

...and {YouTube-Video-ID} is any valid YouTube video ID.

The API request and corresponding JSON response should look like one of the following, e.g.:

MP3 Video w/Audio Merged Video + Video-Only Audio-Only


Audio

GET [Link] HTTP/1.1

...generates this:
{
"vidID": "CevxZvSJLk8",
"vidTitle": "Katy Perry - Roar (Official)",
"vidInfo": {
"0": {
"dloadUrl": "//[Link]/@download/320-58e7c0e582ce2-10800000/mp3/CevxZvSJLk8/Katy%2BPerry%2B-%2BRoar%
2B%2528Official%2529.mp3",
"bitrate": 320,
"mp3size": "10.3 MB"
},
"1": {
"dloadUrl": "//[Link]/@download/256-58e7c0e582ce2-8640000/mp3/CevxZvSJLk8/Katy%2BPerry%2B-%2BRoar%2
B%2528Official%2529.mp3",
"bitrate": 256,
"mp3size": "8.24 MB"
},
"2": {
"dloadUrl": "//[Link]/@download/192-58e7c0e582ce2-6480000/mp3/CevxZvSJLk8/Katy%2BPerry%2B-%2BRoar%2
B%2528Official%2529.mp3",
"bitrate": 192,
"mp3size": "6.18 MB"
},
"3": {
"dloadUrl": "//[Link]/@download/128-58e7c0e582ce2-4320000/mp3/CevxZvSJLk8/Katy%2BPerry%2B-%2BRoar%2
B%2528Official%2529.mp3",
"bitrate": 128,
"mp3size": "4.12 MB"
},
"4": {
"dloadUrl": "//[Link]/@download/64-58e7c0e582ce2-2160000/mp3/CevxZvSJLk8/Katy%2BPerry%2B-%2BRoar%2B
%2528Official%2529.mp3",
"bitrate": 64,
"mp3size": "2.06 MB"
}
}
}

Method #2 - Button/Iframe API

Set the "src" attribute of an HTML iframe to:

[Link]

...where {format} is one of the following:

"mp3" : for MP3 results


"videos" : for Video w/Audio results
"mergedstreams" : for Merged Video + Audio results
"videostreams" : for Video-Only results
"audiostreams" : for Audio-Only results

...and {YouTube-Video-ID} is any valid YouTube video ID.

The resulting iframe code and corresponding output should look like one of the following, e.g.:

MP3 Video w/Audio Merged Video + Video-Only Audio-Only


Audio
<iframe class="button-api-frame" src="[Link] width="100%" height="100%" all
owtransparency="true" scrolling="no" style="border:none"></iframe>

<!-- Optional script that automatically makes iframe content responsive. -->
<script src="[Link]
<script>iFrameResize({}, '.button-api-frame');</script>

...generates this:

English(US)

Copyright © 2019 by [Link]

You might also like