The Earnings Press Releases API allows you to fetch a list of earnings-related press releases for a given company.This data is powered by RSS feeds and is updated instantly when new press releases are published.The endpoint returns all of the earnings-related press releases that the company has filed with the SEC.The data returned from the API includes the URL, publish date, and full text of the press release.To get started, please create an account and grab your API key at financialdatasets.ai.You will use the API key to authenticate your API requests.
import requests# add your API key to the headersheaders = { "X-API-KEY": "your_api_key_here"}# set your query paramsticker = 'AAPL'# create the URLurl = ( f'https://api.financialdatasets.ai/earnings/press-releases' f'?ticker={ticker}')# make API requestresponse = requests.get(url, headers=headers)# parse press releases from the responsepress_releases = response.json().get('press_releases')