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
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 --global
to install the package to access the APIzacks-api TSLA
to 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-project
to create a new foldernpm init
to scaffold the Node.js projecttouch index.js
to create the fileindex.js
npm install zacks-api
to install the library to access the API- Copy/paste the example code below inside the
index.js
file
const api = ;api;
node index.js
to run the code inside theindex.js
file- Done! Now you should see the Zacks rank of Tesla.