getProfile API

The getProfile API is used to request information about a company, such as sector, industry, company description, CEO, recent earnings, P/E ratio, and address, based on a symbol.

All APIs

Contact Us to Get Access

Inputs

symbols required

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 

fields optional

The fields requested.

Type
list (A comma or semi-colon delimited string.) 
Example
qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings 

Outputs

Name / Requirement
Description
Type
symbol
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)
symbolCode
always returned
A code denoting the financial instrument type.
string
A sequence of characters. (example: GOOG)
exchange
always returned
Exchange code for the marketplace where the financial instruments are listed.
string
A sequence of characters. (example: GOOG)
exchangeName
always returned
The name of the marketplace.
string
A sequence of characters. (example: GOOG)
sicSector
always returned
A four-digit code for classifying industries.
string
A sequence of characters. (example: GOOG)
industry
always returned
A code that identifies a group of businesses that produce similar products or services.
string
A sequence of characters. (example: GOOG)
subIndustry
always returned
A more specific group of businesses within an industry that produce similar products or services.
string
A sequence of characters. (example: GOOG)
indexMembership
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.
businessSummary
always returned
A description of the company.
string
A sequence of characters. (example: GOOG)
ceo
always returned
The Chief Executive Officer.
string
A sequence of characters. (example: GOOG)
qtrOneEarnings
as requested
The most recent 1st quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
qtrOneEarningsDate
as requested
The reported date of the most recent 1st quarter earnings.
date
A date in the format of YYYY-MM-DD.
qtrTwoEarnings
as requested
The most recent 2nd quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
qtrTwoEarningsDate
as requested
The reported date of the most recent 2nd quarter earnings.
date
A date in the format of YYYY-MM-DD.
qtrThreeEarnings
as requested
The most recent 3rd quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
qtrThreeEarningsDate
as requested
The reported date of the most recent 3rd quarter earnings.
date
A date in the format of YYYY-MM-DD.
qtrFourEarnings
as requested
The most recent 4th quarter earnings.
double
A numeric type defining a number with fractional parts. (example: 2.14)
qtrFourEarningsDate
as requested
The reported date of the most recent 4th quarter earnings.
date
A date in the format of YYYY-MM-DD.
peRatio
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)
epsGrowth
as requested
The annual rate of earnings per share growth over the trailing one-year period.
string
A sequence of characters. (example: GOOG)
recentEarnings
as requested
The last reported quarterly earnings value.
string
A sequence of characters. (example: GOOG)
annualEPS
as requested
The most recent annual net income divided by the number of shares outstanding.
string
A sequence of characters. (example: GOOG)
address
always returned
The address of the company's headquarters.
string
A sequence of characters. (example: GOOG)
city
always returned
The city where the company's headquarters is located.
string
A sequence of characters. (example: GOOG)
state
always returned
The state where the company's headquarters is located.
string
A sequence of characters. (example: GOOG)
country
always returned
The country where the company's headquarters is located.
string
A sequence of characters. (example: GOOG)
zipCode
always returned
The zip code of the company's headquarters.
string
A sequence of characters. (example: GOOG)
phoneNumber
always returned
The company's main phone number.
string
A sequence of characters. (example: GOOG)
instrumentType
always returned
The type of instrument. Ex. Equity, Future or Mutual Fund etc.
string
A sequence of characters. (example: GOOG)

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",
            "sicSector": "3571",
            "industry": "Computer",
            "subIndustry": "Mini",
            "businessSummary": "Apple Inc. is engaged in designing, manufacturing and marketing mobile communication and media devices, personal computers, and portable digital music players. The Company's products and services include iPhone, iPad, Mac, iPod, Apple TV, a portfolio of consumer and professional software applications, the iOS and Mac OS X operating systems, iCloud, and a range of accessory, service and support offerings. It sells its products worldwide through its online stores, its retail stores, its direct sales force, third-party wholesalers, and resellers. Apple Inc. is headquartered in Cupertino, California.",
            "ceo": "Timothy D. Cook",
            "qtrOneEarnings": 2.07,
            "qtrTwoEarnings": 1.67,
            "qtrThreeEarnings": 2.1,
            "qtrFourEarnings": 3.36,
            "address": "ONE INFINITE LOOP",
            "city": "CUPERTINO",
            "state": "CA",
            "country": "USA",
            "zipCode": "95014",
            "phoneNumber": "408-996-1010",
            "instrumentType": "Equity"
        },
        {
            "symbol": "GOOG",
            "symbolCode": "STK",
            "exchange": "NASDAQ",
            "exchangeName": "Alphabet Class 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": 9.57,
            "qtrTwoEarnings": 5.01,
            "qtrThreeEarnings": 7.73,
            "qtrFourEarnings": 9.36,
            "address": "1600 AMPHITHEATRE PARKWAY",
            "city": "MOUNTAIN VIEW",
            "state": "CA",
            "country": "USA",
            "zipCode": "94043",
            "phoneNumber": "650-253-0000",
            "instrumentType": "Equity"
        }
    ]
}

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>
   <sicSector>3571</sicSector>
   <industry>Computer</industry>
   <subIndustry>Mini</subIndustry>
   <businessSummary>Apple Inc. is engaged in designing, manufacturing and marketing mobile communication and media devices, personal computers, and portable digital music players. The Company's products and services include iPhone, iPad, Mac, iPod, Apple TV, a portfolio of consumer and professional software applications, the iOS and Mac OS X operating systems, iCloud, and a range of accessory, service and support offerings. It sells its products worldwide through its online stores, its retail stores, its direct sales force, third-party wholesalers, and resellers. Apple Inc. is headquartered in Cupertino, California.</businessSummary>
   <ceo>Timothy D. Cook</ceo>
   <qtrOneEarnings>2.07</qtrOneEarnings>
   <qtrTwoEarnings>1.67</qtrTwoEarnings>
   <qtrThreeEarnings>2.1</qtrThreeEarnings>
   <qtrFourEarnings>3.36</qtrFourEarnings>
   <address>ONE INFINITE LOOP</address>
   <city>CUPERTINO</city>
   <state>CA</state>
   <country>USA</country>
   <zipCode>95014</zipCode>
   <phoneNumber>408-996-1010</phoneNumber>
   <instrumentType>Equity</instrumentType>
  </item>
  <item>
   <symbol>GOOG</symbol>
   <symbolCode>STK</symbolCode>
   <exchange>NASDAQ</exchange>
   <exchangeName>Alphabet Class C</exchangeName>
   <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>9.57</qtrOneEarnings>
   <qtrTwoEarnings>5.01</qtrTwoEarnings>
   <qtrThreeEarnings>7.73</qtrThreeEarnings>
   <qtrFourEarnings>9.36</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>
  </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,sicSector,industry,subIndustry,businessSummary,ceo,qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings,address,city,state,country,zipCode,phoneNumber,instrumentType
"AAPL","STK","NASDAQ","Apple Inc","3571","Computer","Mini","Apple Inc. is engaged in designing, manufacturing and marketing mobile communication and media devices, personal computers, and portable digital music players. The Company's products and services include iPhone, iPad, Mac, iPod, Apple TV, a portfolio of consumer and professional software applications, the iOS and Mac OS X operating systems, iCloud, and a range of accessory, service and support offerings. It sells its products worldwide through its online stores, its retail stores, its direct sales force, third-party wholesalers, and resellers. Apple Inc. is headquartered in Cupertino, California.","Timothy D. Cook","2.07","1.67","2.1","3.36","ONE INFINITE LOOP","CUPERTINO","CA","USA","95014","408-996-1010","Equity"
"GOOG","STK","NASDAQ","Alphabet Class 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","9.57","5.01","7.73","9.36","1600 AMPHITHEATRE PARKWAY","MOUNTAIN VIEW","CA","USA","94043","650-253-0000","Equity"


PHP

<?php

$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');

$params = [
    '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("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('AAPL,GOOG', 'qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings');

print $result;

Python

from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')

result = client.service.getProfile('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: {
        symbols: 'AAPL,GOOG',
        fields: 'qtrOneEarnings,qtrTwoEarnings,qtrThreeEarnings,qtrFourEarnings',
    }
)

response.body