// import syntax (recommended) import yahooFinance from 'yahoo-finance2'; // require syntax (if your code base does not support imports) const yahooFinance = require('yahoo-finance2').default; // NOTE the .default const results = await yahooFinance.search('AAPL'); const results = await ...
This message from yahoo has been provided since many months. The API was still accessible using the node-yahoo-finance2 library, because it deals with cookies. However, the "Invalid Crumb" error is new, as of last week. The API responded last Tuesday, using the version 2.9.0 of the libr...