Stock market research is a valuable resource for an investor to make informed investment decisions. Seeking Alpha is a stock research platform where you can get stock research data, financial news, market data, and many more. This crowd-sourced platform publishes research content from both professional investors and individual contributors. From this platform, you can get an idea about the reasons behind stocks and market movements. In addition, its financial news provides investors with the future earnings of stocks and price trajectory. Currently, around 20 million people use Seeking Alpha every month.
Seeking Alpha API is the API that provides the capability to retrieve information from seeking Alpha. Therefore, anyone looking to build a financial application can use this API.
What is the Seeking Alpha API?
Seeking Alpha API from RapidAPI is an API that queries stock news, market-moving, price quotes, charts, indices, analysis, and many more from investors and experts on seeking alpha stock research platform. In addition, it has a comprehensive list of endpoints for different categories of data.
Currently, the API has three pricing plans and a free subscription. It supports various programming languages, including Python, PHP, Ruby, and Javascript. This article will dig deeper into its details and see how to use this API with multiple programming languages.
How does the Seeking Alpha API work?
Seeking Alpha API works using simple API logic in which It sends a request to a specific endpoint and obtains the necessary output as the response. When sending a request, it includes x-RapidAPI-key and host as authentication parameters so that the server can identify it as a valid request. In addition, the API requests body contains the optional parameters to process the request. Once the API server has received the request, it will process the request using the back-end application. Finally, the server will send back the information requested by the client in JSON format.
Target Audience for the Seeking Alpha API
Financial Application Developers
Financial application developers can integrate this API to attract Seeking Alphas’ audience to their financial applications. Its comprehensive list of APIs enables providing the complete Seeking Alpha experience. This API has affordable pricing plans, each endpoint requires only a few lines of code, and integration to an application is pretty straightforward. Since it supports multiple programming languages, it has widespread usability.
Stock Market Investors and learners
Investors, especially those who research financial companies and the stock market, can use this to get information straight from this API. In addition, it has a free plan, and its Pro plan only costs $10. Therefore, anyone who learns about the stock market can make use of it for a low cost.
How to connect to the Seeking Alpha API Tutorial – Step by Step
Step 1 – Sign up and Get a RapidAPI Account.
RapidAPI is the world’s largest API marketplace which is used by more than a million developers worldwide. You can use RapidAPI to search and connect to thousands of APIs using a single SDK, API key, and Dashboard.
To create a RapidAPI account, go to rapidapi.com and click on the Sign Up icon. You can use your Google, Github, or Facebook account for Single Sign-on (SSO) or create an account manually.
Step 2 – Search the API Marketplace
Navigate to the Marketplace and search for “Seeking Alpha API”. Then, select the ‘Seeking Alpha API’ from the search results.
Step 3 – Subscribe to the API
To use this API, we need to subscribe to it. First, navigate to the “pricing” section of the API and subscribe to your preferred plan. For this article, we select the free basic plan of the Seeking Alpha API. Then, simply click on the “subscribe” button to activate the subscription.
Step 4 – Test the API Subscription
After subscribing to the API, run a test for the endpoints. For that, navigate to the ‘Endpoints’ section of the API page, which shows all the available endpoints.
Next, select the endpoint you want to test and add the required values for the parameters. Each API endpoint has code snippets in multiple languages, and it automatically adds the API keys.
Finally, click on the “Test Endpoint” Button to test the API. Upon successful testing of an API endpoint, you will get the response with a 200 status code. In addition, it will output an error code and message if there is an error in the request.
The Seeking Alpha API Endpoints
The Seeking Alpha API provides a lot of endpoints, including a default endpoint. These endpoints belong to 9 categories.
- Market
- Symbol
- Analysis
- Article
- News
- Press Release
- Transcript
- Author
- Comment
Default endpoint – GET /auto-complete
You can get suggested companies, authors, web pages, and queries for a particular search term from this endpoint. Therefore, you should include the search term in its mandatory ‘term’ parameter. The output consists of the following JSON object arrays.
- symbols – Each company in the stock market has a symbol of recognizing it uniquely. For example,
AAPL – Apple Incorporation, FB – Facebook, NFLX – Netflix incorporation
So if you include the search term as ‘apple,’ then this object would return’ companies whose name has that term
- people – This object contains the list of suggested authors having the search term in their names.
- pages – A list of URLs of web pages in the Seeking Alpha site having that search term. For example, if you search ‘portfolio,’ it will list both “investing-strategy/portfolio-strategy” and “account/portfolio” pages of the Seeking Alpha site.
- query – Returns the query term.
Now, let’s take a look at the endpoints of each category.
Market
Market endpoints give you market information like market equities, real-time stock prices, dividend investing, etc. The following tables display all the endpoints and descriptions of their parameters.
Endpoints
Endpoint | Usage | Parameters Required |
/market/get-market-open | Get market open | – |
/market/get-equity | Get different market equities | filterCategory |
/market/get-day-watch | Get market day watch | – |
/market/get-dividend-investing | Get dividend investing | – |
/market/get-realtime-prices | Get real-time prices | symbols |
Parameter definitions
Parameter | Description | Values |
filterCategory | Type of market equity | us-equity-markets us-equity-sectors us-equity-factors global-equity countries-equity |
symbols | Symbols of the companies | Ex: AAPL, FB |
Symbol
Symbol endpoints provide a list of essential data about the companies of your choice. For example, you can get information like company metadata, revenue estimations, data for stock charts, summary, fundamentals, momentum, company ratings, dividend histories, valuations, etc. Following is the summary of its endpoints and parameters.
Endpoints
Endpoint | Usage | Required parameters | Optional parameters |
/symbols/get-meta-data | Get metadata of specific symbol | symbol | – |
/symbols/get-estimates | Get estimated EPS/revenue of specific symbol by annual or quarterly | symbol | Data_type period_type |
/symbols/get-chart | Get data to draw a chart for a specific symbol | symbol | period |
/symbols/get-fundamentals | Get fundamentals for a specific symbol | symbol | Limit period_type |
/symbols/get-key-data | Get key data of specific symbol | symbol | – |
/symbols/get-ratings | Get ratings data for a specific symbol | symbol | – |
/symbols/get-valuation | Get a valuation of a specific symbol | symbols | – |
/symbols/get-momentum | Get momentum of the specific symbol | symbols | – |
/symbols/get-peers | Get peers of a specific symbol | symbol | |
/symbols/get-dividend-history | Get dividend history of the specific symbol | symbol | Years group_by |
/symbols/get-summary | Get summary information of specific symbol | symbols | – |
/symbols/get-profile | Get profile information of specific symbol | symbols | – |
Parameter definitions
Parameter | Description | Values |
symbol | Symbol of the company, only one is allowed at a time. | Ex: AAPL |
symbols | Symbols of the list of companies. Separating by comma to query multiple characters at once | Ex: AAPL, FB |
data_type | Type pf estimations | eps|revenues |
period | The period for stock charts | 1D 5D 1M 6M 1Y 5Y 10Y MAX |
period_type | Period for which you need estimations | quarterly annual |
limit | How many records you want | Ex: 5 |
years | no of years | Ex: 6 |
group_by | group by year or month | year month |
Analysis
Seeking Alpha publishes analysis articles about various topics. You can use analysis endpoints to retrieve information about them. From its /analysis/list endpoint, you can get a list of analysis articles. The response contains an id for each piece. You can get more details about each article using that id using its /analysis/get-details endpoint. Refer to the following tables about the endpoints and parameters.
Endpoints
Endpoint | Usage | Required Parameters | Optional Parameters |
/analysis/get-details | Get analysis detail by id | id | – |
/analysis/list | List analysis of the specific symbol | id | until size |
Parameter definitions
Parameter | Description |
id in /analysis/get-details | The value of id returned in …/analysis/list endpoint |
id in /analysis/list | Symbol of the company, only one is allowed at a time. |
until | The value of meta/page/minmaxPublishOn/min json object returned right in this endpoint to load next page |
size | The number of items per response |
Articles
Article endpoints provide various articles such as the latest articles, editor’s picks, dividends, investing strategies, etc.
Endpoints
Endpoint | Usage | Required Parameters | Optional Parameters |
/articles/list | List articles by category | category | until size |
/articles/get-details | Get analysis detail by id | id | – |
/articles/list-wall-street-breakfast | List articles by category | – | – |
/articles/list-trending | List trending articles | – | – |
Parameter definitions
Parameter | Description | Values |
id | The value of id returned in …/analysis/list endpoint. | – |
category | Article category | Etfs-and-funds latest-articles Stock-ideas Editors-picks Stock-ideas::editors-picks Dividends Investing-strategy Dividends::reits Podcast market-outlook |
News
These endpoints retrieve the latest and trending stock news and a list of news about a specific company.
Endpoints
Endpoint | Usage | Parameters | |
Required | Optional | ||
/news/list-trending | List latest trending news | – | – |
/news/list | List news of specific symbol | id | until, size |
/news/get-details | Get analysis detail by id | id | – |
Parameter definitions
Parameter | Description |
Id in /news/list | Symbol to query for data, only one is allowed at a time |
Id in /news/get-details | The value of id returned in …/news/list or …/news/list-trending endpoint |
until | The value of meta/page/minmaxPublishOn/min json object returned right in this endpoint to load next page |
size | The number of items per response |
Pre-release
Press-release endpoints provide press releases of a specific company, and they allow you to search for details about any particular press release using its id. The below table gives you a description of each of its endpoints. Parameters are similar to ‘News’ endpoints.
Endpoints
Endpoint | Usage | Parameters | |
Required | Optional | ||
/press-releases/get-details | Get press release detail by id | id | |
/press-releases/list | List press releases of a specific symbol | id | until size |
Transcript
You can get a list of transcripts of a specific company and get more details about a particular transcript using transcript endpoints.
Endpoints
Endpoint | Usage | Parameters | |
Required | Optional | ||
/transcripts/get-details | Get transcript detail by id | id | – |
/transcripts/list | List transcripts of the specific symbol | id | until size |
Author – GET /authors/get-details
This endpoint is used to get details about a particular author. It requires you to specify the parameter ‘slug’, which identifies the author. You should use the value of the slug parameter in the ‘people’ JSON object returned from the GET /auto-complete endpoint.
Comment – GET /comments/list
This endpoint lists all comments relating to a post or article, or news.
Parameter definitions
Parameter | Description |
Id | Mandatory Parameter. The value of the id returned in …/articles/list or …/articles/list-trending or …/articles/list-wall-street-breakfast endpoints |
from_id | Comment id |
parent_count | Maximum data for paging purpose |
sort | Order by newest or oldest. For ordering by the latest comment, use the value ‘-top_parent_id.’ Otherwise, just leave it empty. |
Integrating the Seeking Alpha API to an Application
This section will show you how to integrate the Seeking Alpha API into Python, PHP, Ruby, and Javascript software applications with sample code snippets. For this instance, we will be using the “GET auto-complete” endpoint for all the languages. In each code, you need to include the ‘X-RapidAPI-key and X-RapidAPI-host parameters in the header, which you can obtain from the API page.
Python Code Snippet (requests)
First, you need to install the requests module on your computer. Then, specify all the parameters in the “querystring” variable. Finally, the request object’s request method sends the API call.
import requests url = "https://seeking-alpha.p.rapidapi.com/auto-complete" querystring = {"term":"apple"} headers = { 'x-rapidapi-key': "cJvLRNK0GfdM9WSMbQe3inU7REn8JVy5", 'x-rapidapi-host': "seeking-alpha.p.rapidapi.com" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
PHP Code Snippet (HTTP v2)
First, you need to create a client and a request class object. Then set the API URL and the request method separately to the request object. Next, create a new QueryString object including all the parameters and set it to the request. Finally, send the request through the client objects’ send method.
<?php $client = new http\Client; $request = new http\Client\Request; $request->setRequestUrl('https://seeking-alpha.p.rapidapi.com/auto-complete'); $request->setRequestMethod('GET'); $request->setQuery(new http\QueryString([ 'term' => 'apple' ])); $request->setHeaders([ 'x-rapidapi-key' => 'cJvLRNK0GfdM9WSMbQe3inU7REn8JVy5', 'x-rapidapi-host' => 'seeking-alpha.p.rapidapi.com' ]); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
Ruby (net::http)
Suppose you are using the net::http module in Ruby. Import ‘openssl’ and ‘uri’ modules initially. In this instance, bypass SSL certification verification setting it to ‘VERIFY_NONE.’ Directly select the parameters in the query string along with the URL.
require 'uri' require 'net/http' require 'openssl' url = URI("https://seeking-alpha.p.rapidapi.com/auto-complete?term=apple") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["x-rapidapi-key"] = 'cJvLRNK0GfdM9WSMbQe3inU7REn8JVy5' request["x-rapidapi-host"] = 'seeking-alpha.p.rapidapi.com' response = http.request(request) puts response.read_body
Javascript (Axios)
Integrating this API into a Javascript application is pretty straightforward. The following code snippet shows how to call this API using its ‘axios’ module. You can define the parameters, url, headers, and the request method in one javascript object. The use of the Axios objects’ request method to send the request and retrieve the response.
import axios from "axios"; const options = { method: 'GET', url: 'https://seeking-alpha.p.rapidapi.com/auto-complete', params: {term: 'apple'}, headers: { 'x-rapidapi-key': 'cJvLRNK0GfdM9WSMbQe3inU7REn8JVy5', 'x-rapidapi-host': 'seeking-alpha.p.rapidapi.com' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); });
Alternatives to the Seeking Alpha API
Stock Analysis – Get financial information about stick companies such as earnings, margin, P/E ratio, 52-week high/low, dividend information, etc. This API also returns analysts’ earnings.
Estimates, upgrades, and downgrades.
Stock Market News – A query and real-time API covering analyst ratings, earnings, FDA drug approvals, press releases, and more than 20K new articles daily
Yahoo Finance – query for all information about finance summary, stocks, quotes, movers, etc., as on Yahoos’ official website.
Twelve Data – This API provides Instant access for real-time and historical data of stocks, forex, crypto, ETFs, indices, and more.
Benefits of Seeking Alpha API
Extensive Functionality
This API is not limited to only a single functionality. It covers almost all the financial information like company data, trending articles, news, types of equities, and even data for financial charts you can get from the Official Seeking Alpha site. Therefore, developers can build a comprehensive financial application without depending on other APIs.
Easy to Integrate
All the endpoints of Seeking Alpha API need just a few parameters. Thus, you do not have to spend a lot of time writing complicated code. Additionally, you can find example code snippets in many programming languages with two or more frameworks or modules. Because of this simplicity, even someone with little to no background using APIs can master the API reasonably quickly.
Multiple Options
Most of the API endpoints of Seeking Alpha API have multiple optional parameters. Because of this reason, developers can customize their applications based on what they require.
Summary
Seeking Alpha API is a comprehensive and powerful API that you can use to get almost all the stock market research data and related information from Seeking Alpha. This article discussed how to subscribe for it, its available endpoints, benefits, for whom it will be helpful, and provided sample code snippets in Python, PHP, Ruby, and Javascript to show how to use it in an application.
Hi, I saw that this API includes the transcript. Does this API include the PPT/slides under each transcript on SeekingAlpha?