Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ashokshau/dl-api

YouTube and Instagram downloader api
https://github.com/ashokshau/dl-api

api downloader go insta-dl instagram instagram-api vercel yt-api yt-dlp

Last synced: 4 months ago
JSON representation

YouTube and Instagram downloader api

Awesome Lists containing this project

README

        

# Downloader API

## Features:

* Instagram Data Retrieval:
Fetches Instagram post-data using GraphQL queries.
Extracts and returns various details about an Instagram post, such as ID, caption, shortcode, dimensions, video URL, author, and more.

* YouTube Data Retrieval:
Fetches YouTube video or playlist data using the [kkdai/youtube](https://github.com/kkdai/youtube) library.
Extracts and returns various details about a YouTube video, such as ID, author, duration, thumbnail, description, stream URL, title, and view count.
Supports fetching data for both individual videos and playlists.

* Proxy Support:
Supports the use of a SOCKS5 proxy for YouTube data retrieval, configurable via the config.Socks5Proxy setting.

## Prerequisites:

- Go 1.23.0 or higher

## Configuration:

* `SOCKS5_PROXY` : SOCKS5 proxy URL (optional)

## Setup:

1. Clone the repository:
```sh
git clone https://github.com/Abishnoi69/dl-api.git
cd dl-api
```

2. Run the server:
```sh
go run main.go
```

3. The server will start on `http://localhost:8080`.

Deploy to Vercel



  1. Fork this repository 🍴

  2. Login your Vercel account

  3. Go to your Add New Project

  4. Choose the repository you forked

  5. Configure your Environment Variables: SOCKS5_PROXY

  6. Tap on Deploy

  7. Use your api and enjoy!

## Endpoints
> You can also use Video ID / Playlist ID instead of URL.

### Get Video Information:
* URL: /yt?url={video_url}/{playlist_url}
* Method: GET
* Description: Download video information and stream URL.
* Response:
```
{
"ID": "video_id",
"author": "video_author",
"duration": "video_duration",
"thumbnail": "thumbnail_url",
"description": "video_description",
"stream_url": "stream_url", // you can use this to download the video
"title": "video_title",
"view_count": "view_count"
...
}
```

### Get Instagram Post Information:
* URL: /ig?url={post_id}
* Method: GET
* Description: Instagram post-information.
* Response:
```
{
"ID": "post_id",
"caption": "post_caption",
"shortcode": "post_shortcode",
"dimensions": "post_dimensions",
"video_url": "video_url", // you can use this to download the video
"author": "post_author"
...
}
```

## Contributing
Contributions are welcome! For bug reports, feature requests, or pull requests, please open an issue or submit your changes directly

## License
This project is licensed under the MIT License—see the [LICENSE](/LICENSE) file for details.