const aggregateSearch = async () => { try { const searchQuery = { 'metadata.vendor.name': { $in: [...] } }; const response = await fetch('https://api.stylegpt.net/v1/dataset/retrieve', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY' }, body: JSON.stringify(searchQuery) }); const results = await response.json(); } catch (err) { throw new Error(`Error creating market analysis: ${err.message}`); } };