const axios = require('axios'); const client = axios.create({ baseURL: 'https://api.nimfinder.com', headers: { 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 Chrome/137.0.0.0 Mobile Safari/537.36', 'Accept': '*/*', 'Origin': 'https://nimfinder.com', 'Referer': 'https://nimfinder.com/' } }); async function cari(q, limit = 20, offset = 0) { const r = await client.get('/search', { params: { q, limit, offset } }); return r.data; } (async () => { const [q, limit = 20, offset = 0] = process.argv.slice(2); if (!q) { console.error('usage: node nimfinder.js [limit] [offset]'); process.exit(1); } try { const out = await cari(q, Number(limit), Number(offset)); console.log(JSON.stringify(out, null, 2)); } catch (e) { console.error(JSON.stringify({ success: false, error: e.message }, null, 2)); process.exit(1); } })();