1.0.5 • Published 7 years ago
zacks-api v1.0.5
Zacks.com API
The API returns the Zacks rank (from 1 = strong buy, to 5 = strong sell)
of any given company by providing the ticker of the company
(e.g. TSLA for Tesla).
See here for more information on the Zacks rank: www.zacks.com/education
Example Response for Tesla
{
"ticker": "TSLA",
"name": "Tesla, Inc.",
"zacksRankText": "Strong Sell",
"zacksRank": "5",
"updatedAt": "2019-04-12T05:58:00.000Z"
}Setup
You can use the API in the command line, or develop your own application using the API as imported package. How to set up either option is explained below.
Prerequisite
- Install Node.js if you haven't already. On Mac in the command line type
brew install node. More information here: nodejs.org
1. Option: Command Line
To use the Zacks API via the command line, type in your command line
npm install zacks-api --globalto install the package to access the APIzacks-api TSLAto get the Zacks rank of Tesla (ticker: TSLA)- Done! Now you should see the Zacks rank of Tesla.
2. Option: Develop your own application
To set up a new Node.js project, type in the command line
mkdir my-new-project && cd my-new-projectto create a new foldernpm initto scaffold the Node.js projecttouch index.jsto create the fileindex.jsnpm install zacks-apito install the library to access the API- Copy/paste the example code below inside the
index.jsfile
const api = require('zacks-api');
api.getData('TSLA').then(console.log);node index.jsto run the code inside theindex.jsfile- Done! Now you should see the Zacks rank of Tesla.