% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/audio.R
\name{mp3_get}
\alias{mp3_get}
\title{Download MP3 from URL}
\usage{
mp3_get(
  id,
  mp3 = TRUE,
  repo = "yt-dlp",
  params = "--no-check-certificate",
  start_time = 0,
  end_time = NA,
  overwrite = TRUE,
  open = FALSE,
  delete = open,
  info = TRUE,
  title = NULL,
  cover = FALSE,
  metadata = FALSE,
  quiet = FALSE
)
}
\arguments{
\item{id}{Character. YouTube URL or ID to search for.}

\item{mp3}{Boolean. Add mp3 optimal parameters?}

\item{repo}{Character. Chose repository you installed youtube-dl from.
Any of: "youtube-dl" (latest stable version), "yt-dlp"
(latest dev version).}

\item{params}{Character. Additional parameters.}

\item{start_time, end_time}{Numeric. Start and end time
to trim the audio output in seconds.}

\item{overwrite}{Boolean. Overwrite original file?}

\item{open, delete}{Boolean. After everything's done, should the
file be opened? Should it be deleted?}

\item{info}{Boolean. Import and return metadata?}

\item{title}{Character. Title of the track to search for cover, metadata, and
name the file.}

\item{cover}{Boolean. Google Search its squared cover? Uses \code{title}
input when provided.}

\item{metadata}{Boolean. Use iTunes Search API (free) to extract "track" 
data and high-res cover art. Falls back to "spotifyr" if no results
are found (requires credentials and, since 2026-03-09, Spotify Premium 
linked to the client id). Uses \code{title} input when provided.}

\item{quiet}{Boolean. Keep quiet? If not, informative messages will be shown.}
}
\value{
(Invisible) list with id's meta-data.
}
\description{
This function downloads YouTube videos or Soundcloud or any other
platform supported by the youtube-dl library, and converts them into
high quality MP3 files. The URL can be for a single video or a whole
playlist. It also returns metadata into an (invisible) list.
}
\section{youtube-dl}{

More info from the original developers and its code:
\href{https://github.com/ytdl-org/youtube-dl/}{youtube-dl's Github}
}

\examples{
# You must have "youtube-dl" installed in your OS:
\dontrun{
# Download video from YouTube and convert to MP3
mp3_get("https://www.youtube.com/watch?v=lrlKcCdVw9Q")
# OR simply
mp3_get("lrlKcCdVw9Q")
# For dev version, use:
mp3_get("m3RX4LJh0iI", repo = "yt-dlp")
}
}
\seealso{
Other Scrapper: 
\code{\link{filesGD}()},
\code{\link{gtrends_related}()},
\code{\link{holidays}()},
\code{\link{ip_data}()},
\code{\link{readGS}()},
\code{\link{splot_summary}()},
\code{\link{stocks_quote}()}

Other Audio: 
\code{\link{mp3_trim}()},
\code{\link{mp3_update_tags}()}
}
\concept{Audio}
\concept{Scrapper}
