• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Rapid Blog

  • Enterprise
  • API Hub
  • Add Your API
  • About
  • Docs
    • API Glossary
  • Blog
    • What is an API?
    • REST API Tutorials
    • Most Popular APIs
  • Sign Up
    • Log In
Blog » API Tutorials » How to Use the Seeking Alpha API with Python, PHP, Ruby & JavaScript Examples
seeking alpha api

How to Use the Seeking Alpha API with Python, PHP, Ruby & JavaScript Examples

By Team RapidAPI // June 22, 2021

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.

Connect to the Seeking Alpha 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

EndpointUsageParameters

Required

/market​/get-market-openGet market open–
/market/get-equityGet different market equitiesfilterCategory
/market/get-day-watchGet market day watch–
/market/get-dividend-investingGet dividend investing–
/market/get-realtime-pricesGet real-time pricessymbols

Parameter definitions

ParameterDescriptionValues
filterCategoryType of market equity us-equity-markets        

us-equity-sectors            

us-equity-factors                 

global-equity                  

countries-equity

symbolsSymbols of the companiesEx: 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

EndpointUsageRequired parametersOptional parameters
/symbols/get-meta-dataGet metadata of specific symbolsymbol–
/symbols/get-estimatesGet estimated EPS/revenue of specific symbol by annual or quarterlysymbolData_type period_type
/symbols/get-chartGet data to draw a chart for a specific symbolsymbolperiod
/symbols/get-fundamentalsGet fundamentals for a specific symbolsymbolLimit period_type
/symbols/get-key-dataGet key data of specific symbolsymbol–
/symbols/get-ratingsGet ratings data for a specific symbolsymbol–
/symbols/get-valuationGet a valuation of a specific symbolsymbols–
/symbols/get-momentumGet momentum of the specific symbolsymbols–
/symbols/get-peersGet peers of a specific symbolsymbol
/symbols/get-dividend-historyGet dividend history of the specific symbolsymbolYears   group_by
/symbols/get-summaryGet summary information of specific symbolsymbols–
/symbols/get-profileGet profile information of specific symbolsymbols–

 

Parameter definitions

ParameterDescriptionValues
symbolSymbol of the company, only one is allowed at a time.Ex: AAPL
symbolsSymbols of the list of companies. Separating by comma to query multiple characters at onceEx: AAPL, FB
data_typeType pf estimationseps|revenues
periodThe period for stock charts1D    

5D 

1M

6M

1Y

5Y

10Y

MAX

period_typePeriod for which you need estimations quarterly         

annual

limitHow many records you wantEx: 5
yearsno of yearsEx: 6
group_bygroup by year or monthyear

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

EndpointUsageRequired ParametersOptional Parameters
/analysis/get-detailsGet analysis detail by idid–
/analysis/listList analysis of the specific symboliduntil         

size

 

Parameter definitions

ParameterDescription
id in /analysis/get-detailsThe value of id returned in …/analysis/list endpoint
id in /analysis/listSymbol of the company, only one is allowed at a time.
untilThe value of meta/page/minmaxPublishOn/min json object returned right in this endpoint to load next page
sizeThe number of items per response

Articles

Article endpoints provide various articles such as the latest articles, editor’s picks, dividends, investing strategies, etc. 

Endpoints

EndpointUsageRequired ParametersOptional Parameters
/articles/listList articles by categorycategoryuntil                 

size

/articles/get-detailsGet analysis detail by idid–
/articles/list-wall-street-breakfastList articles by category––
/articles/list-trendingList trending articles––

Parameter definitions

ParameterDescriptionValues
idThe value of id returned in …/analysis/list endpoint.–
categoryArticle categoryEtfs-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

EndpointUsageParameters
RequiredOptional
/news/list-trendingList latest trending news––
/news/listList news of specific symboliduntil,             

size

/news/get-detailsGet analysis detail by idid–

Parameter definitions

ParameterDescription
Id in /news/listSymbol to query for data, only one is allowed at a time
Id in /news/get-detailsThe value of id returned in …/news/list or …/news/list-trending endpoint
untilThe value of meta/page/minmaxPublishOn/min json object returned right in this endpoint to load next page
sizeThe 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

EndpointUsageParameters
RequiredOptional
/press-releases/get-detailsGet press release detail by idid
/press-releases/listList press releases of a specific symboliduntil     

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

EndpointUsageParameters
RequiredOptional
/transcripts/get-detailsGet transcript detail by idid–
/transcripts/listList transcripts of the specific symboliduntil

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

ParameterDescription
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
sortOrder 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. 

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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)
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)
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.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<?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();
<?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();
<?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.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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
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
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.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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);
});
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); });
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.

Connect to the Seeking Alpha API

5/5 - (2 votes)
« How to Use the COVID-19 Data API with Python, PHP, Ruby & JavaScript Examples
How to Use the unogsNG API with Java, Python, PHP, Ruby & JavaScript Examples »

Filed Under: REST API Tutorials Tagged With: best finance apis, finance api, seeking alpha api, stock api, stock apis

Team RapidAPI

Reader Interactions

Comments

  1. Rui says

    August 10, 2021 at 9:02 am

    Hi, I saw that this API includes the transcript. Does this API include the PPT/slides under each transcript on SeekingAlpha?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Build anything with APIs, faster.

Discover, evaluate, and integrate with any API. RapidAPI is the world’s largest API Hub with over 4 Million developers and 35,000 APIs.

Browse APIs »

APIs mentioned in this article

Connect to the Seeking Alpha API
Connect to the Seeking Alpha API

Footer

  • API Guides
  • API Courses
  • API Glossary
  • API Testing
  • API Management
  • Most Popular APIs
  • Free APIs List
  • How to use an API
  • Learn REST API
  • Build API’s
  • About
  • Build APIs
  • Careers
  • Contact Us
  • Write for Us
  • API Directory
  • Press Room
  • Privacy Policy
  • Terms of Use

© 2025 RapidAPI. All rights reserved.

Building an Enterprise API Program
Learn More

×