npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shadowx-tiksr

v1.1.0

Published

TikTok video search and download module - Search videos by query, get video details, download links, and metadata

Readme

shadowx-tiksr

🎵 TikTok video search & download module by Mueid Mursalin Rifat


📦 Installation

npm install shadowx-tiksr

Requires Node.js 18+ (recommended) or 16+.


🚀 Quick Start

const TikSR = require('shadowx-tiksr');
const tiktok = new TikSR();

// Search videos
async function searchTikTok() {
  try {
    const result = await tiktok.search('Goku');
    
    console.log('✅ Found!');
    console.log('📹 Title:', result.video.title);
    console.log('👤 Creator:', result.video.author.nickname);
    console.log('❤️ Likes:', result.video.stats.likes);
    console.log('📥 Download:', result.downloads.video);
  } catch (error) {
    console.error('❌ Error:', error.message);
  }
}

searchTikTok();

📥 Download Video Directly

// Get first video download link
const video = await tiktok.download('funny cats');
console.log('Download URL:', video.download.video_url);

📋 API Reference

new TikSR(options)

Option Type Default Description baseURL string 'https://shadowx-api.onrender.com/api' API endpoint timeout number 30000 Request timeout (ms)

Methods

Method Description Returns search(query) Search videos by keyword Promise download(query) Get first video download Promise extractVideoId(url) Extract ID from TikTok URL string|null


📤 Response Format

{
  success: true,
  query: "Goku",
  
  package: {
    name: "shadowx-tiksr",
    version: "1.0.0",
    author: "Mueid Mursalin Rifat"
  },
  
  video: {
    title: "Son Goku Super Saiyan 5 THIS FORM IS INSANE 🔥",
    region: "PK",
    duration: 30,
    play_url: "https://.../video.mp4",
    music_url: "https://.../audio.mp3",
    
    stats: {
      play_count: "56.6K",
      likes: "2.9K", 
      comments: "25",
      shares: "154",
      downloads: "25"
    },
    
    author: {
      nickname: "Skull Anime",
      username: "skulanime",
      profile_url: "https://www.tiktok.com/@skulanime"
    }
  },
  
  downloads: {
    video: "https://.../video.mp4",
    audio: "https://.../audio.mp3",
    video_no_watermark: "https://.../video.mp4"
  },
  
  metadata: {
    region: "PK",
    operator: "Mueid Mursalin Rifat",
    powered_by: "CatX TikTok API",
    timestamp: "2024-01-01T12:00:00.000Z"
  }
}

📝 Examples

Search with Different Queries

const tiktok = new TikSR();

const queries = ['dance', 'cooking', 'funny cats'];

for (const query of queries) {
  const result = await tiktok.search(query);
  console.log(`${query}: ${result.video.title}`);
}

Get Video Statistics

const result = await tiktok.search('anime');

console.log('📊 Statistics:');
console.log(`👁️ Views: ${result.video.stats.play_count}`);
console.log(`❤️ Likes: ${result.video.stats.likes}`);
console.log(`💬 Comments: ${result.video.stats.comments}`);
console.log(`↗️ Shares: ${result.video.stats.shares}`);

Extract Video ID from URL

const url = 'https://www.tiktok.com/@user/video/123456789';
const videoId = tiktok.extractVideoId(url);
console.log(videoId); // '123456789'

Error Handling

try {
  const result = await tiktok.search('');
} catch (error) {
  console.log('Error Code:', error.code);
  console.log('Message:', error.message);
  console.log('Status:', error.statusCode);
}

Common error codes:

· INVALID_QUERY - Empty or invalid search · NOT_FOUND - No videos found · RATE_LIMITED - Too many requests · TIMEOUT - Request timed out · NETWORK_ERROR - Connection issues


⚙️ Configuration

Environment Variables

TIKTOK_API_URL=https://shadowx-api.onrender.com/api
TIKTOK_TIMEOUT=30000

Custom Configuration

const tiktok = new TikSR({
  baseURL: 'https://your-custom-api.com/api',
  timeout: 60000 // 60 seconds
});

🔧 Requirements

· Node.js: 16.x or higher (18+ recommended) · npm: 7.x or higher



📄 License

MIT © Mueid Mursalin Rifat


🙏 Credits

· Author: Mueid Mursalin Rifat · API: ShadowX TikTokSr API · Powered by: ShadowX


🔗 Links

· npm Package · GitHub Repository · Issue Tracker