Example

Google Sheets / Apps Script Calendar Sync

Let analysts work from a spreadsheet instead of an app.

Request

GET https://api.earningsapi.com/v1/calendar/earnings?date=today&apikey=YOUR_API_KEY

Code example

ExamplePython
import datetime as dt
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.earningsapi.com"

def fetch_calendar(day):
    response = requests.get(
        f"{BASE_URL}/v1/calendar/earnings",
        params={"date": day.isoformat(), "apikey": API_KEY},
        timeout=30,
    )
    response.raise_for_status()
    return response.json()

start = dt.date.today() - dt.timedelta(days=90)
for offset in range(121):
    day = start + dt.timedelta(days=offset)
    calendar = fetch_calendar(day)
    print(day, len(calendar.get("pre", [])), len(calendar.get("after", [])))

Result shape

datesymbolnamebucket
2026-01-31AAPLApple Inc.after
2026-02-01MSFTMicrosoft Corporationafter

Build steps

  1. 1Store the API key in Apps Script properties.
  2. 2Loop the next 30 dates and call the calendar endpoint.
  3. 3Flatten reporting buckets into rows before writing to the sheet.

Quota and limits

Free tier includes 60 requests per minute, 100 requests per day, and 1,000 requests per month. Paid plans are built for production use with higher limits and a 300 requests per minute rate limit. Daily and monthly reset windows use New York time.

View usage