Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Y

Youtube-API

> 编程语言
Open source

A way to host your own API that converts youtube video's to mp3/mp4 and returns a download/stream link and information.

175 stars0 likes0 views
WebsiteGitHub

About

A way to host your own API that converts youtube video's to mp3/mp4 and returns a download/stream link and information.

Youtube-API

With these files you are able to create your own Youtube API with ability to search also.

Laravel version of this package

Software requirements

  • youtube-dl
  • ffmpeg (+ libmp3lame)

General installation

First we install the dependencies on the server, then website.

VPS

  • Install ffmpeg (+ libmp3lame - see wiki for tutorial)
  • install youtube-dl or yt-dlp

Website

  • Get a google developer api key
  • Go to your webserver files to run composer into
  • Run composer create-project michaelbelgium/youtube-to-mp3 [directoryname] - where directoryname is .. a directory where people can access the API from.

Configuration

To configure everything, you need to create a copy of .env.example as .env. This file should contain your settings. For more information on the settings, check the comments in the .env or .env.example file.

Documentation

Check out the wiki for more docs.

Docker

You can deploy this project using docker-compose.yml and the Dockerfile to build from. Please add your google API Key to the .env file. It will expose port 80 from the container, out to port 80 on the host. This can also be changed in .env under HOST_PORT. The docker image uses yt-dlp.

How to run with docker-compose

Put docker-compose.yml and Dockerfile together in a new, empty folder. Create .env, and set the values listed in the example .env in this repo. To run, use the following command:

bash
docker-compose up -d

To stop:

bash
docker-compose down
# Or use this to remove the attached volume, to clear up space-
docker-compose down -v

Issues· 2 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPffmpegmp3-apiyoutube-api-v3youtube-dl

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言