https://github.com/imhappykumar/happy-dl
A simple tool to generate direct download links for media from Instagram, Facebook, Twitter, SnapChat, YouTube and TikTok! Just provide the post URL, and this package will return a direct download URL.
https://github.com/imhappykumar/happy-dl
downloader facebook facebook-api facebook-downloader instagram instagram-api instagram-downloader npm npm-package social-media twitter twitter-api
Last synced: about 1 year ago
JSON representation
A simple tool to generate direct download links for media from Instagram, Facebook, Twitter, SnapChat, YouTube and TikTok! Just provide the post URL, and this package will return a direct download URL.
- Host: GitHub
- URL: https://github.com/imhappykumar/happy-dl
- Owner: ImHappyKumar
- License: mit
- Created: 2024-12-20T10:18:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-22T08:59:46.000Z (about 1 year ago)
- Last Synced: 2025-05-09T01:05:42.876Z (about 1 year ago)
- Topics: downloader, facebook, facebook-api, facebook-downloader, instagram, instagram-api, instagram-downloader, npm, npm-package, social-media, twitter, twitter-api
- Homepage: https://www.npmjs.com/package/happy-dl
- Size: 548 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HAPPY DOWNLOADER (HAPPY DL)

[](https://github.com/ImHappyKumar/happy-dl)
[](https://www.npmjs.com/package/happy-dl)
[](https://www.npmjs.com/package/happy-dl)
[](LICENSE)
A simple tool to generate direct download links for media from Instagram, Facebook, Twitter, Snapchat, YouTube, TikTok and Pinterest! Just provide the post URL, and this package will return a direct download URL.
## Installation
You can install `happy-dl` via npm:
```bash
npm install happy-dl
```
Or, if you're using Yarn:
```bash
yarn add happy-dl
```
## Usage
### Importing the Package
You can import the entire `happy-dl` module:
```javascript
const happyDL = require("happy-dl");
```
Or destructure specific functions:
```javascript
const {
instagramDownloader,
facebookDownloader,
twitterDownloader,
snapchatDownloader,
youtubeDownloader,
tiktokDownloader,
pinterestDownloader,
} = require("happy-dl");
```
### Example Usage
#### Instagram Downloader
```javascript
async function fetchInstagramData() {
try {
const result = await happyDL.instagramDownloader(
"https://www.instagram.com/reel/C2xQMDBBY6v/"
);
console.log("Fetched Instagram media details:", result);
} catch (error) {
console.error("Error fetching Instagram media details:", error);
}
}
fetchInstagramData();
```
#### Facebook Downloader
```javascript
async function fetchFacebookData() {
try {
const result = await happyDL.facebookDownloader(
"https://www.facebook.com/share/r/yfF9ZULaNJnQ72Ur/"
);
console.log("Fetched Facebook media details:", result);
} catch (error) {
console.error("Error fetching Facebook media details:", error);
}
}
fetchFacebookData();
```
#### Twitter Downloader
```javascript
async function fetchTwitterData() {
try {
const result = await happyDL.twitterDownloader(
"https://x.com/ImHappyKumar/status/1758877530776547450"
);
console.log("Fetched Twitter media details:", result);
} catch (error) {
console.error("Error fetching Twitter media details:", error);
}
}
fetchTwitterData();
```
#### Snapchat Downloader
```javascript
async function fetchSnapchatData() {
try {
const result = await happyDL.snapchatDownloader(
"https://snapchat.com/t/VHVlyNZX"
);
console.log("Fetched Snapchat media details:", result);
} catch (error) {
console.error("Error fetching Snapchat media details:", error);
}
}
fetchSnapchatData();
```
#### YouTube Downloader
```javascript
async function fetchYoutubeData() {
try {
const result = await happyDL.youtubeDownloader(
"https://www.youtube.com/watch?v=j7asIBf1HcQ&ab_channel=SeekingOfHappiness"
);
console.log("Fetched YouTube media details:", result);
} catch (error) {
console.error("Error fetching YouTube media details:", error);
}
}
fetchYoutubeData();
```
#### TikTok Downloader
```javascript
async function fetchTiktokData() {
try {
const result = await happyDL.tiktokDownloader(
"https://www.tiktok.com/@khaby.lame/video/7473945919407377686?lang=en"
);
console.log("Fetched TikTok media details:", result);
} catch (error) {
console.error("Error fetching TikTok media details:", error);
}
}
fetchTiktokData();
```
#### Pinterest Downloader
```javascript
async function fetchPinterestData() {
try {
const result = await happyDL.pinterestDownloader(
"https://in.pinterest.com/pin/37858453112938677/"
);
console.log("Fetched Pinterest media details:", result);
} catch (error) {
console.error("Error fetching Pinterest media details:", error);
}
}
fetchPinterestData();
```
## Supported Platforms
- Instagram
- Facebook
- Twitter
- Snapchat
- YouTube
- TikTok
- Pinterest
- More coming soon!
## Contributing
Contributions are welcome! If you find any issues or want to contribute new features, feel free to fork the repository and create a pull request.
### Steps to Contribute:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Make your changes and commit them (`git commit -am 'Add new feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.