Licence
MIT
Version
1.0.2
Deps
1
Size
21 kB
Vulns
0
Weekly
0
@yoshx/api
Official TypeScript & Node.js API Client Fetcher for Yoshida Tech API (https://api.yuura.site).
Installation
npm install @yoshx/api
# or
yarn add @yoshx/api
# or
pnpm add @yoshx/api
Environment Variables (Optional)
You can set default credentials in your .env file:
API_ENDPOINT = "https://api.yuura.site"
API_KEY = "ytk_live_your_api_key"
Quick Start
1. Modern Structured Syntax (Recommended)
const Api = require('@yoshx/api')();
// Or specify custom: require('@yoshx/api')('https://api.yuura.site', 'your_api_key')
async function run() {
// 1. Download Instagram Post / Reel / Carousel / Story
const ig = await Api.downloader.instagram('https://www.instagram.com/reel/xxxxxx');
console.log('Instagram Media:', ig.data);
// 2. Download TikTok Video (No Watermark & Audio)
const tt = await Api.downloader.tiktok('https://vt.tiktok.com/xxxxxx');
console.log('TikTok Video URL:', tt.data.video);
// 3. AI Chat Assistant (GPT-4o)
const ai = await Api.ai.chat('Explain debounce function in JavaScript');
console.log('AI Response:', ai.data.response);
// 4. Spotify Music Search
const spotify = await Api.searching.spotify('Alan Walker Faded', 5);
console.log('Tracks:', spotify.data);
// 5. Health Check
const ping = await Api.tools.ping();
console.log('Server Status:', ping.data);
}
run();
2. Classic Generic Syntax (.get() & .post())
const Api = require('@yoshx/api')();
// Generic GET request
const json = await Api.get('/api/downloader/tiktok', {
url: 'https://vt.tiktok.com/xxxxxx/'
});
console.log(json);
// Generic POST request
const postRes = await Api.post('/api/pricing/apply-coupon', {
code: 'LAUNCH50',
planSlug: 'starter-vip'
});
console.log(postRes);
3. WhatsApp Bot Integration (Baileys Example)
const Api = require('@yoshx/api')('https://api.yuura.site', process.env.API_KEY);
async function handleMessage(sock, msg, text) {
if (text.startsWith('.ig ')) {
const url = text.split(' ')[1];
const res = await Api.downloader.instagram(url);
if (res.status && res.data?.media?.length) {
for (const item of res.data.media) {
if (item.type === 'video') {
await sock.sendMessage(msg.key.remoteJid, { video: { url: item.url } }, { quoted: msg });
} else {
await sock.sendMessage(msg.key.remoteJid, { image: { url: item.url } }, { quoted: msg });
}
}
}
}
}
Endpoints Reference
| Category | Sub-module | Methods & Features |
|---|---|---|
| Media Downloader | Api.downloader |
instagram(), tiktok(), youtube(), spotify(), facebook(), twitter(), threads(), pinterest(), reddit(), capcut(), mediafire(), terabox(), gitclone() |
| Artificial Intelligence | Api.ai |
chat(), gemini(), deepseek(), gpt120b(), image(), flux(), nanobanana(), faceswap(), removebg(), upscale(), tts(), morphic() |
| Search & Discovery | Api.searching |
google(), spotify(), pinterest(), youtube(), soundcloud(), genius(), lyrics(), recipes(), pixiv(), booru() |
| Developer Tools | Api.tools |
alightmotion(), img2pdf(), uploader(), shazam(), base64(), ipinfo(), github(), ping() |
| Stalking & Profile | Api.stalk |
instagram(), twitter(), github() |
License
MIT License 2026 Yoshida Tech