Every calendar.
One API.
Events, free time and sync for nine providers, including Google, Outlook and iCloud, in one typed TypeScript API.
Running in your browser: six sample calendars in memory, with the real listEvents, findFreeTime and createEvent.
Switch calendars, not code
Pick a provider. Only the import and the setup change, and the events come back in the same shape.
Choose a providerimport { listEvents } from 'calsdk';
import { google } from '@calsdk/google';
const calendar = google({ accessToken });
const { events } = await listEvents({
calendar,
timeMin: '2026-11-01T00:00:00Z',
timeMax: '2026-12-01T00:00:00Z',
});
for (const event of events) {
console.log(
event.title,
event.start,
event.conference?.joinUrl,
);
}- Read, supported
- Write, supported
- Recurring, supported
- Video linksGoogle Meet
- Sync, supported
The quirks are handled.The rest is reported.
Recurrence, time zones and field names are converted for you. When a provider can't do what you asked, the result says so.
How warnings work"pattern": {
"type": "weekly",
"daysOfWeek": ["monday",
"tuesday", "wednesday",
"thursday", "friday"]
}'RRULE:FREQ=WEEKLY;
Recurrence is always an RRULE
Outlook stores a pattern object and Zoom numbers its weekdays. You read and write one RRULE.
color: '#ec4899'
warnings: [{ type: 'compatibility', feature: 'color' }]
Warnings, not silent changes
Google has a fixed palette. Your color is saved as the nearest one, and the result says so.
9:30 New York standup, in Berlin, March 2027
Time zones that survive clock changes
The standup stays at 9:30 in New York. Berlin sees it an hour early until Europe changes its clocks too.
The calendar code you'd rather not write
Book a meeting, with the video link
Create a meeting with a Google Meet or Teams link. Provider changes come back as warnings.
import { createEvent } from 'calsdk';
const result = await createEvent({
calendar,
event: {
title: 'Intro call',
start: {
dateTime: '2026-11-12T15:00:00',
timeZone: 'Europe/Berlin',
},
end: {
dateTime: '2026-11-12T15:30:00',
timeZone: 'Europe/Berlin',
},
attendees: [
{ email: 'guest@example.com' },
],
createConference: true,
},
sendUpdates: 'all',
});// result.event.conference
{
provider: 'google-meet',
joinUrl:
'https://meet.google.com/…',
id: '…',
}
// result.warnings
[]Runs anywhere
Only fetch, no vendor SDKs. Node, Bun, Deno and edge runtimes.
A calendar for tests
@calsdk/mock keeps a real calendar in memory. The demo at the top runs on it.
Tested on the real APIs
Google, Outlook, Zoho, Zoom, Cal.com and Calendly are recorded live and replayed in CI.
Bring your own provider
A provider is one object with a few functions, checked by the conformance suite.