Stock Profile API
getProfile
The getProfile API is used to request information about a publicly traded company, such as sector, industry, company description, CEO, recent earnings, P/E ratio, and address, based on symbol. This data can be used to build models that quickly screen for companies matching investment criteria.
View All APIsContact Us to Get Access
Inputs
symbolsrequired
A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used.
Type
list (A comma or semi-colon delimited string.)
Example
AAPL,GOOG
fieldsoptional
The fields requested.
Type
list (A comma or semi-colon delimited string.)
Example
qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings
Outputs
symbol
always returned
always returned
A symbol or code that identifies a financial instrument. Multiple symbols separated by a comma may be used.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
symbolCode
always returned
always returned
A code denoting the financial instrument type.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
exchange
always returned
always returned
Exchange code for the marketplace where the financial instruments are listed.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
exchangeName
always returned
always returned
The name of the marketplace.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
instrumentName
always returned
always returned
The name of the instrument.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
sicSector
always returned
always returned
A four-digit code for classifying industries.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
industry
always returned
always returned
A code that identifies a group of businesses that produce similar products or services.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
subIndustry
always returned
always returned
A more specific group of businesses within an industry that produce similar products or services.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
indexMembership
as requested
as requested
Indices which a stock may be part of, like the DJIA or S&P 500.
list
A comma or semi-colon delimited string.
A comma or semi-colon delimited string.
businessSummary
always returned
always returned
A description of the company.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
ceo
always returned
always returned
The Chief Executive Officer.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
qtrOneEarnings
as requested
as requested
The most recent 1st quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
qtrOneEarningsDate
as requested
as requested
The reported date of the most recent 1st quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrOneEarningsEndDate
as requested
as requested
The end date of the most recent 1st quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrTwoEarnings
as requested
as requested
The most recent 2nd quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
qtrTwoEarningsDate
as requested
as requested
The reported date of the most recent 2nd quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrTwoEarningsEndDate
as requested
as requested
The end date of the most recent 2nd quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrThreeEarnings
as requested
as requested
The most recent 3rd quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
qtrThreeEarningsDate
as requested
as requested
The reported date of the most recent 3rd quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrThreeEarningsEndDate
as requested
as requested
The end date of the most recent 3rd quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrFourEarnings
as requested
as requested
The most recent 4th quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
A numeric type defining a number with fractional parts. (example: 2.14)
qtrFourEarningsDate
as requested
as requested
The reported date of the most recent 4th quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
qtrFourEarningsEndDate
as requested
as requested
The end date of the most recent 4th quarter earnings.
date
A date in the format of YYYY-MM-DD.
A date in the format of YYYY-MM-DD.
peRatio
as requested
as requested
The ratio of a company's current share price relative to its earnings (price divided by earnings).
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
epsGrowth
as requested
as requested
The annual rate of earnings per share growth over the trailing one-year period.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
recentEarnings
as requested
as requested
The last reported quarterly earnings value.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
annualEPS
as requested
as requested
The most recent annual net income divided by the number of shares outstanding.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
address
always returned
always returned
The address of the company's headquarters.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
city
always returned
always returned
The city where the company's headquarters is located.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
state
always returned
always returned
The state where the company's headquarters is located.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
country
always returned
always returned
The country where the company's headquarters is located.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
zipCode
always returned
always returned
The zip code of the company's headquarters.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
phoneNumber
always returned
always returned
The company's main phone number.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
instrumentType
always returned
always returned
The type of instrument. Ex. Equity, Future or Mutual Fund etc.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
figi
always returned
always returned
This code is unique at exchange level, a pair of exchange and company is assigned a unique figi.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
compositeFigi
always returned
always returned
This code is shared in all exchanges across a country for a given company.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
shareClassFigi
always returned
always returned
This code is shared in all exchanges across the world for a given company.
string
A sequence of characters. (example: GOOG)
A sequence of characters. (example: GOOG)
cik
as requested
as requested
The Central Index Key (CIK) is used on the SEC's computer systems to identify corporations and individual people who have filed disclosure with the SEC.
int
A numeric type defining a whole number. (example: 2)
A numeric type defining a whole number. (example: 2)
Status Code Responses
200
OK
Success
400
Bad Request
The request was invalid, please see the message for more information.
500
Internal Server Error
Something is not working correctly, please contact support.
JSON
GET
GET https://ondemand.websol.barchart.com/getProfile.json?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=qtrOneEarnings%2CqtrTwoEarnings%2CqtrThreeEarnings%2CqtrFourEarnings
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getProfile.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=qtrOneEarnings%2CqtrTwoEarnings%2CqtrThreeEarnings%2CqtrFourEarnings
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"symbol": "AAPL",
"symbolCode": "STK",
"exchange": "NASDAQ",
"exchangeName": "Apple Inc",
"instrumentName": "Apple Inc",
"sicSector": "3571",
"industry": "Computer",
"subIndustry": "Micro",
"businessSummary": "Apple's business primarily runs around its flagship iPhone. However, the Services portfolio that includes cloud services, App store, Apple Music, AppleCare, Apple Pay & licensing and other services which become the cash cow. Moreover, non-iPhone devices like Apple Watch and AirPod have gained significant traction. In fact, Apple dominates the Wearables and Hearables markets due to the growing adoption of Watch and AirPods. Solid uptake of Apple Watch also helps Apple to strengthen its presence in the personal health monitoring space. Apple also designs, manufactures and sells iPad, MacBookand HomePod. These devices are powered by software applications including iOS, macOS, watchOS and tvOS operating systems. Apple's other services include subscription-based Apple News, Apple Card, Apple Arcade, new Apple TV app, Apple TV channels and Apple TV, a new subscription service.",
"ceo": "Timothy D. Cook",
"qtrOneEarnings": 1.64,
"qtrTwoEarnings": 1.4,
"qtrThreeEarnings": 1.53,
"qtrFourEarnings": 2.18,
"address": "ONE APPLE PARK WAY",
"city": "CUPERTINO",
"state": "CA",
"country": "USA",
"zipCode": "95014",
"phoneNumber": "408-996-1010",
"instrumentType": "Equity",
"figi": "BBG000B9Y5X2",
"compositeFigi": "BBG000B9XRY4",
"shareClassFigi": "BBG001S5N8V8"
},
{
"symbol": "GOOG",
"symbolCode": "STK",
"exchange": "NASDAQ",
"exchangeName": "Alphabet Cl C",
"instrumentName": "Alphabet Cl C",
"sicSector": "7370",
"industry": "Internet",
"subIndustry": "Services",
"businessSummary": "Alphabet Inc. is engaged in technology business. The Company provides web-based search, advertisements, maps, software applications, mobile operating systems, consumer content, enterprise solutions, commerce and hardware products through its subsidiaries. Alphabet Inc., formerly known as Google Inc., is headquartered in Mountain View, California.",
"ceo": "Larry Page",
"qtrOneEarnings": 2.12,
"qtrTwoEarnings": 1.89,
"qtrThreeEarnings": 1.89,
"qtrFourEarnings": 1.64,
"address": "1600 AMPHITHEATRE PARKWAY",
"city": "MOUNTAIN VIEW",
"state": "CA",
"country": "USA",
"zipCode": "94043",
"phoneNumber": "650-253-0000",
"instrumentType": "Equity",
"figi": "BBG009S4MVF2",
"compositeFigi": "BBG009S3NB30",
"shareClassFigi": "BBG009S3NB21"
}
]
}
XML
GET
GET https://ondemand.websol.barchart.com/getProfile.xml?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=qtrOneEarnings%2CqtrTwoEarnings%2CqtrThreeEarnings%2CqtrFourEarnings
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getProfile.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=qtrOneEarnings%2CqtrTwoEarnings%2CqtrThreeEarnings%2CqtrFourEarnings
Response
<?xml version="1.0" encoding="utf-8"?>
<getProfile>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<symbol>AAPL</symbol>
<symbolCode>STK</symbolCode>
<exchange>NASDAQ</exchange>
<exchangeName>Apple Inc</exchangeName>
<instrumentName>Apple Inc</instrumentName>
<sicSector>3571</sicSector>
<industry>Computer</industry>
<subIndustry>Micro</subIndustry>
<businessSummary>Apple's business primarily runs around its flagship iPhone. However, the Services portfolio that includes cloud services, App store, Apple Music, AppleCare, Apple Pay & licensing and other services which become the cash cow. Moreover, non-iPhone devices like Apple Watch and AirPod have gained significant traction. In fact, Apple dominates the Wearables and Hearables markets due to the growing adoption of Watch and AirPods. Solid uptake of Apple Watch also helps Apple to strengthen its presence in the personal health monitoring space. Apple also designs, manufactures and sells iPad, MacBookand HomePod. These devices are powered by software applications including iOS, macOS, watchOS and tvOS operating systems. Apple's other services include subscription-based Apple News, Apple Card, Apple Arcade, new Apple TV app, Apple TV channels and Apple TV, a new subscription service.</businessSummary>
<ceo>Timothy D. Cook</ceo>
<qtrOneEarnings>1.64</qtrOneEarnings>
<qtrTwoEarnings>1.4</qtrTwoEarnings>
<qtrThreeEarnings>1.53</qtrThreeEarnings>
<qtrFourEarnings>2.18</qtrFourEarnings>
<address>ONE APPLE PARK WAY</address>
<city>CUPERTINO</city>
<state>CA</state>
<country>USA</country>
<zipCode>95014</zipCode>
<phoneNumber>408-996-1010</phoneNumber>
<instrumentType>Equity</instrumentType>
<figi>BBG000B9Y5X2</figi>
<compositeFigi>BBG000B9XRY4</compositeFigi>
<shareClassFigi>BBG001S5N8V8</shareClassFigi>
</item>
<item>
<symbol>GOOG</symbol>
<symbolCode>STK</symbolCode>
<exchange>NASDAQ</exchange>
<exchangeName>Alphabet Cl C</exchangeName>
<instrumentName>Alphabet Cl C</instrumentName>
<sicSector>7370</sicSector>
<industry>Internet</industry>
<subIndustry>Services</subIndustry>
<businessSummary>Alphabet Inc. is engaged in technology business. The Company provides web-based search, advertisements, maps, software applications, mobile operating systems, consumer content, enterprise solutions, commerce and hardware products through its subsidiaries. Alphabet Inc., formerly known as Google Inc., is headquartered in Mountain View, California.</businessSummary>
<ceo>Larry Page</ceo>
<qtrOneEarnings>2.12</qtrOneEarnings>
<qtrTwoEarnings>1.89</qtrTwoEarnings>
<qtrThreeEarnings>1.89</qtrThreeEarnings>
<qtrFourEarnings>1.64</qtrFourEarnings>
<address>1600 AMPHITHEATRE PARKWAY</address>
<city>MOUNTAIN VIEW</city>
<state>CA</state>
<country>USA</country>
<zipCode>94043</zipCode>
<phoneNumber>650-253-0000</phoneNumber>
<instrumentType>Equity</instrumentType>
<figi>BBG009S4MVF2</figi>
<compositeFigi>BBG009S3NB30</compositeFigi>
<shareClassFigi>BBG009S3NB21</shareClassFigi>
</item>
</getProfile>
CSV
GET
GET https://ondemand.websol.barchart.com/getProfile.csv?apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=qtrOneEarnings%2CqtrTwoEarnings%2CqtrThreeEarnings%2CqtrFourEarnings
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getProfile.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&symbols=AAPL%2CGOOG&fields=qtrOneEarnings%2CqtrTwoEarnings%2CqtrThreeEarnings%2CqtrFourEarnings
Response
symbol,symbolCode,exchange,exchangeName,instrumentName,sicSector,industry,subIndustry,businessSummary,ceo,qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings,address,city,state,country,zipCode,phoneNumber,instrumentType,figi,compositeFigi,shareClassFigi
"AAPL","STK","NASDAQ","Apple Inc","Apple Inc","3571","Computer","Micro","Apple's business primarily runs around its flagship iPhone. However, the Services portfolio that includes cloud services, App store, Apple Music, AppleCare, Apple Pay & licensing and other services which become the cash cow. Moreover, non-iPhone devices like Apple Watch and AirPod have gained significant traction. In fact, Apple dominates the Wearables and Hearables markets due to the growing adoption of Watch and AirPods. Solid uptake of Apple Watch also helps Apple to strengthen its presence in the personal health monitoring space. Apple also designs, manufactures and sells iPad, MacBookand HomePod. These devices are powered by software applications including iOS, macOS, watchOS and tvOS operating systems. Apple's other services include subscription-based Apple News, Apple Card, Apple Arcade, new Apple TV app, Apple TV channels and Apple TV, a new subscription service.","Timothy D. Cook","1.64","1.4","1.53","2.18","ONE APPLE PARK WAY","CUPERTINO","CA","USA","95014","408-996-1010","Equity","BBG000B9Y5X2","BBG000B9XRY4","BBG001S5N8V8"
"GOOG","STK","NASDAQ","Alphabet Cl C","Alphabet Cl C","7370","Internet","Services","Alphabet Inc. is engaged in technology business. The Company provides web-based search, advertisements, maps, software applications, mobile operating systems, consumer content, enterprise solutions, commerce and hardware products through its subsidiaries. Alphabet Inc., formerly known as Google Inc., is headquartered in Mountain View, California.","Larry Page","2.12","1.89","1.89","1.64","1600 AMPHITHEATRE PARKWAY","MOUNTAIN VIEW","CA","USA","94043","650-253-0000","Equity","BBG009S4MVF2","BBG009S3NB30","BBG009S3NB21"
PHP
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'symbols' => 'AAPL,GOOG',
'fields' => 'qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings',
];
$result = $ondemand->getProfile($params);
var_dump($result);
Classic ASP
Dim ondemand
Dim result
Set ondemand = Server.CreateObject("MSSOAP.SoapClient30")
ondemand.ClientProperty("ServerHTTPRequest") = True
ondemand.MSSoapInit("https://ondemand.websol.barchart.com/service?wsdl")
Set result = ondemand.getProfile("YOUR_API_KEY", "AAPL,GOOG", "qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings")
Perl
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getProfile('YOUR_API_KEY', 'AAPL,GOOG', 'qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings');
print $result;
Python
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getProfile('YOUR_API_KEY', 'AAPL,GOOG', 'qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings')
print(result)
Ruby
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getProfile,
message: {
apikey: 'YOUR_API_KEY',
symbols: 'AAPL,GOOG',
fields: 'qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings',
}
)
response.body