๐ Announcing the Official EarningsCall JavaScript Client with TypeScript Support!
Weโre thrilled to announce the release of the official EarningsCall JavaScript client libraryโcomplete with TypeScript type definitions. This new toolkit makes it easier than ever to tap into EarningsCallโs comprehensive API, empowering developers to quickly integrate and leverage corporate earnings call data.
๐ Key Features
Simple Installation & Integration: Easily add the library to your existing JavaScript or TypeScript projects.
TypeScript-Ready: Benefit from improved type safety and enhanced productivity out of the box.
Rich API Coverage: Access transcripts, historical data, speaker details, word-level timestamps, and more.
Broad Company Coverage: Explore insights from over 5,000 companies across global markets.
No External Dependencies: Built solely on standard JavaScript/Node.js capabilities.
Compact Bundle (~4KB minified): Keep your application lean without sacrificing functionality.
๐ง Installation
Install the library via npm:
npm install earningscall
๐ Getting Started
Retrieving a Basic Transcript
To obtain a companyโs transcript for a particular year and quarter, use the getBasicTranscript()
method. This method returns the complete transcript as a single continuous text string, as well as the date of the conference call.
import { getCompany } from "earningscall";
const company = await getCompany({ symbol: "AAPL" }); // Get Company object by ticker symbol "AAPL"
const companyInfo = company.companyInfo;
console.log(`Company name: ${companyInfo.name} Sector: ${companyInfo.sector} Industry: ${companyInfo.industry}`);
const transcript = await company.getBasicTranscript({ year: 2021, quarter: 3 });
console.log(`${companyInfo.symbol} Q3 2021 Transcript: "${transcript?.text.slice(0, 100)}..."`);
Output:
Company name: Apple Inc. Sector: Technology Industry: Consumer Electronics
AAPL Q3 2021 Transcript: "Good day, and welcome to the Apple Q3 FY 2021 Earnings Conference Call. Today's call is being recorded..."
To access every available transcript for a specific company, use the events()
method. This approach provides a comprehensive list of the companyโs conference call transcripts in one place.
import { getCompany } from "earningscall";
const company = await getCompany({ symbol: "AAPL" });
console.log(`Getting all transcripts for: ${company.companyInfo.name}...`);
const events = await company.events();
for (const event of events) {
const transcript = await company.getBasicTranscript({ event });
console.log(`${company.companyInfo.symbol} Q${event.quarter} ${event.year}`);
console.log(` * Transcript Text: "${transcript?.text.slice(0, 100)}..."`);
}
Output:
Getting all transcripts for: Apple Inc...
* Q4 2023
Transcript Text: "Good day and welcome to the Apple Q4 Fiscal Year 2023 earnings conference call. Today's call is bein..."
* Q3 2023
Transcript Text: "Good day and welcome to the Apple Q3 Fiscal Year 2023 earnings conference call. Today's call is bein..."
* Q2 2023
Transcript Text: "At this time for opening remarks and introductions, I would like to turn the call over to Suhasini T..."
* Q1 2023
...
You can access earnings call transcripts segmented by speaker to gain a clearer understanding of who said what. The data is returned as an array of objects, where each object includes the speakerโs name, their professional title, and the text they provided. This structure makes it easy to identify the individualโs role and contributions during the call.
import { getCompany } from "earningscall";
const company = await getCompany({ symbol: "AAPL" });
const speakerGroups = await company.getSpeakerGroups({ year: 2024, quarter: 2 });
const firstSpeaker = speakerGroups?.speakers[0];
const secondSpeaker = speakerGroups?.speakers[1];
const thirdSpeaker = speakerGroups?.speakers[2];
console.log(`Speaker: ${firstSpeaker?.speakerInfo?.name}, ${firstSpeaker?.speakerInfo?.title}`);
console.log(`Text: ${firstSpeaker?.text?.slice(0, 100)}...`);
console.log(`Speaker: ${secondSpeaker?.speakerInfo?.name}, ${secondSpeaker?.speakerInfo?.title}`);
console.log(`Text: ${secondSpeaker?.text?.slice(0, 100)}...`);
console.log(`Speaker: ${thirdSpeaker?.speakerInfo?.name}, ${thirdSpeaker?.speakerInfo?.title}`);
console.log(`Text: ${thirdSpeaker?.text?.slice(0, 100)}...`);
Output:
Speaker: Suhasini Chandramouli, Director of Investor Relations
Text: Good afternoon and welcome to the Apple Q2 fiscal year 2024 earnings conference call. My name is Suh...
Speaker: Tim Cook, CEO
Text: Thank you, Suhasini. Good afternoon, everyone, and thanks for joining the call. Today, Apple is repo...
Speaker: Luca Maestri, CFO
Text: Thank you, Tim, and good afternoon, everyone. Revenue for the March quarter was $90.8 billion, down ...
Word-level timestamps are precise markers that indicate the exact point in time when each word in a transcript is spoken during an audio recording.
Why Are Word-Level Timestamps Useful?
- Enhanced Searchability and Navigation:
- You can jump to the exact part of the audio or video where a specific word or phrase was spoken.
- Example: If the CEO says โinflationโ at 3.25 seconds, you can navigate directly to that point.
- Precise Content Synchronization:
- Sync subtitles or captions with spoken content seamlessly.
- Example: Video platforms like YouTube and Netflix use this feature for accurate subtitles.
- Sentiment Analysis:
- Analyzing the tone or meaning of specific words and correlating them to the audio.
- Example: โRevenue growthโ may have a positive sentiment, while โrestructuringโ may be neutral or negative.
- AI Applications:
- Word-level timestamps enable AI models to identify pauses, stress on words, or other speech patterns.
- Example: Detecting emphasis on โrecord earningsโ might indicate a focus on financial success.
Here's how you can retrieve the word-level timestamps for a single quarter:
import { getCompany } from "earningscall";
const company = await getCompany({ symbol: "AAPL" });
const wordLevelTranscript = await company.getWordLevelTimestamps({ year: 2021, quarter: 3 });
const firstSpeaker = wordLevelTranscript?.speakers[0];
const wordsAndStartTimes = firstSpeaker?.words?.map((word, index) => ({
word,
startTime: firstSpeaker.startTimes[index]
}));
console.log(`Speaker: ${firstSpeaker?.speaker}`);
console.log("Words with start times:", wordsAndStartTimes);
Output:
Speaker: Suhasini Chandramouli, Director of Investor Relations
Words with start times: [
{ word: 'Good', startTime: 0.049 },
{ word: 'day,', startTime: 0.229 },
{ word: 'and', startTime: 0.489 },
{ word: 'welcome', startTime: 0.609 },
{ word: 'to', startTime: 0.929 },
...
]
Prepared remarks and Q&A sections are key parts of earnings call transcripts that provide valuable insights to investors and analysts.
- Prepared Remarks: This is the scripted portion at the start of the call where executives (like the CEO or CFO) summarize the companyโs performance, financials, and outlook. It is pre-planned and polished.
- Q&A: This follows the prepared remarks and is an unscripted session where analysts and investors ask questions, and company executives respond. It often contains candid insights not covered in prepared remarks.
Here's how you can retrieve the prepared remarks and Q&A for a single quarter.
import { getCompany } from "earningscall";
const company = await getCompany({ symbol: "AAPL" });
const transcript = await company.getQuestionAndAnswerTranscript({ year: 2021, quarter: 3 });
console.log(`${company} Q3 2021 Prepared Remarks: "${transcript?.preparedRemarks.slice(0, 100)}..."`);
console.log(`${company} Q3 2021 Q&A: "${transcript?.questionsAndAnswers.slice(0, 100)}..."`);
Output:
Apple Inc. Q3 2021 Prepared Remarks: "Good day, and welcome to the Apple Q3 FY 2021 Earnings Conference Call. Today's call is being record..."
Apple Inc. Q3 2021 Q&A: "Our first question comes from Katie Huberty from Morgan Stanley. Please go ahead. Hello, Katie. Your..."
If you want to download the audio file for a single quarter, you can do so with the downloadAudioFile
method.
import { getCompany } from "earningscall";
const company = await getCompany({ symbol: "AAPL" });
console.log(`Downloading audio file for ${company} Q3 2021...`);
const audioFile = await company.downloadAudioFile({ year: 2021, quarter: 3 });
console.log(`Audio file downloaded to: ${audioFile?.outputFilePath}`);
Output:
Downloading audio file for Apple Inc. Q3 2021...
Audio file downloaded to: AAPL_2021_Q3.mp3
List All Companies
You can use the getAllCompanies()
method to retrieve all companies in the EarningsCall database.
import { getAllCompanies } from "earningscall";
const companies = await getAllCompanies();
console.log(companies);
Output:
[
Company {
companyInfo: {
exchange: 'NASDAQ',
symbol: 'AAPL',
name: 'Apple Inc.',
sector: 'Technology',
industry: 'Consumer Electronics'
},
name: 'Apple Inc.',
events_: undefined
},
Company {
companyInfo: {
exchange: 'NASDAQ',
symbol: 'MSFT',
name: 'Microsoft Corporation',
sector: 'Technology',
industry: 'Software - Infrastructure'
},
name: 'Microsoft Corporation',
events_: undefined
}
]
By default, this library grants you access to only two companies, Apple Inc. and Microsoft, Inc.
To gain access to 5,000+ companies please signup here to get your API key: https://earningscall.biz/api-pricing
Once you have access to your API key, you can set the API Key like this:
Set API Key
For access to non-demo companies, you need to set an API key.
You can set the API key with the setApiKey
functions.
import { setApiKey } from "earningscall";
setApiKey("YOUR-SECRET-API-KEY");
You can also set the API key in the EARNINGSCALL_API_KEY
environment variable.
export EARNINGSCALL_API_KEY="YOUR-SECRET-API-KEY"
List S&P 500 Companies
import { listSP500Companies } from "earningscall";
const companies = await listSP500Companies();
console.log(companies);
Output
[
{ symbol: 'AAPL', name: 'Apple Inc.' },
{ symbol: 'GOOGL', name: 'Alphabet Inc.' },
{ symbol: 'MSFT', name: 'Microsoft Corporation' },
...
]
Summary:
The EarningsCall JavaScript Library offers a simple, dependency-free way to interface with the EarningsCall API using Node.js (18+). It provides convenient methods to retrieve and process corporate earnings call transcriptsโboth basic and word-levelโas well as company information, event listings, prepared remarks, Q&A segments, and even audio files. The library supports ECMAScript Modules and CommonJS, includes TypeScript type definitions, and is small in size (~4KB). By default, it grants access to a limited dataset (e.g., Apple and Microsoft), but users can unlock data for thousands of companies with an API key. The tool facilitates efficient navigation, comprehensive data retrieval, and integration with advanced analytics workflows, all while maintaining a minimal footprint and zero external dependencies.
This compact, efficient library provides a robust set of functionalities for accessing and analyzing corporate earnings call data. Its minimal dependency design, built-in TypeScript support, and flexible querying capabilities make it an ideal choice for developers and analysts looking to easily integrate transcript retrieval and analysis into their projects.
๐ Learn More
Start building with the EarningsCall JavaScript Client today and bring data-driven insights to your projects! ๐ก