{"id":15636341,"url":"https://github.com/westy92/holiday-event-api-js","last_synced_at":"2025-10-17T08:16:14.296Z","repository":{"id":43463432,"uuid":"468126452","full_name":"westy92/holiday-event-api-js","owner":"westy92","description":"The Official Holiday and Event API for JavaScript/TypeScript","archived":false,"fork":false,"pushed_at":"2024-12-12T08:07:27.000Z","size":634,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T05:44:50.547Z","etag":null,"topics":["api","calendar","celebration","checkiday","date","day","event","federal","holiday","holidays","javascript","list","month","nodejs","occurrence","official","public","typescript","unofficial","year"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/holiday-event-api","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/westy92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["westy92"]}},"created_at":"2022-03-09T23:35:29.000Z","updated_at":"2024-09-10T12:27:47.000Z","dependencies_parsed_at":"2024-01-01T11:27:06.419Z","dependency_job_id":"3adeca84-b6c2-4788-8d42-8665231cb8f2","html_url":"https://github.com/westy92/holiday-event-api-js","commit_stats":{"total_commits":195,"total_committers":3,"mean_commits":65.0,"dds":0.2564102564102564,"last_synced_commit":"52528f67ab3a9d6048b267ed1bd2dfc08b98977c"},"previous_names":["westy92/holiday-api-js"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westy92%2Fholiday-event-api-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westy92%2Fholiday-event-api-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westy92%2Fholiday-event-api-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westy92%2Fholiday-event-api-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/westy92","download_url":"https://codeload.github.com/westy92/holiday-event-api-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651221,"owners_count":21621702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","calendar","celebration","checkiday","date","day","event","federal","holiday","holidays","javascript","list","month","nodejs","occurrence","official","public","typescript","unofficial","year"],"created_at":"2024-10-03T11:02:18.571Z","updated_at":"2025-10-17T08:16:08.820Z","avatar_url":"https://github.com/westy92.png","language":"TypeScript","funding_links":["https://github.com/sponsors/westy92"],"categories":[],"sub_categories":[],"readme":"# The Official Holiday and Event API for JavaScript/TypeScript\n\n[![npm version](https://badge.fury.io/js/holiday-event-api.svg)](https://www.npmjs.com/package/holiday-event-api)\n[![Build Status](https://github.com/westy92/holiday-event-api-js/actions/workflows/github-actions.yml/badge.svg)](https://github.com/westy92/holiday-event-api-js/actions)\n[![Code Coverage](https://codecov.io/gh/westy92/holiday-event-api-js/branch/main/graph/badge.svg)](https://codecov.io/gh/westy92/holiday-event-api-js)\n[![Known Vulnerabilities](https://snyk.io/test/github/westy92/holiday-event-api-js/badge.svg)](https://snyk.io/test/github/westy92/holiday-event-api-js)\n[![Funding Status](https://img.shields.io/github/sponsors/westy92)](https://github.com/sponsors/westy92)\n\nIndustry-leading Holiday and Event API for JavaScript/TypeScript. Over 5,000 holidays and thousands of descriptions. Trusted by the World’s leading companies. Built by developers for developers since 2011.\n\n## Authentication\n\nAccess to the Holiday and Event API requires an API Key. You can get for one for FREE [here](https://apilayer.com/marketplace/checkiday-api#pricing), no credit card required! Note that free plans are limited. To access more data and have more requests, a paid plan is required.\n\n## Installation\n\n```console\nnpm install --save holiday-event-api\n```\n\n## Example Usage\n\n### Authentication\n\nSimply construct an instance of `Holidays` and pass your API Key like this:\n\n```ts\nimport { Holidays } from 'holiday-event-api';\n\n// Get a FREE API key from https://apilayer.com/marketplace/checkiday-api#pricing\nconst api = new Holidays({ apiKey: '\u003cYour API Key Here\u003e' });\n```\n\n### Example Project\n\nYou can find a fully-functioning example project [here](example).\n\n### Get Events\n\nGet all events for a specified date.\n\n```ts\nconst response = await api.getEvents({\n  // Date to get the events for.\n  // (Optional, defaults to today.)\n  date: '5/5/2025',\n  // IANA Time Zone for calculating dates and times.\n  // (Optional, defaults to America/Chicago.)\n  timezone: 'America/New_York',\n  // Include events that may be unsafe for viewing at work or by children.\n  // (Optional, defaults to false.)\n  adult: true,\n});\n```\n\nExample response (some events removed to save space):\n\n```json\n{\n    \"timezone\": \"America/New_York\",\n    \"date\": \"05/05/2025\",\n    \"adult\": true,\n    \"events\": [\n        {\n            \"id\": \"b80630ae75c35f34c0526173dd999cfc\",\n            \"name\": \"Cinco de Mayo\",\n            \"url\": \"https://www.checkiday.com/b80630ae75c35f34c0526173dd999cfc/cinco-de-mayo\"\n        },\n        {\n            \"id\": \"346052f12d9209ef2119f45565a47279\",\n            \"name\": \"Totally Chipotle Day\",\n            \"url\": \"https://www.checkiday.com/346052f12d9209ef2119f45565a47279/totally-chipotle-day\"\n        }\n    ],\n    \"multiday_starting\": [\n        {\n            \"id\": \"b9321bf3ce70e98fb385cb03d2f0cac4\",\n            \"name\": \"Teacher Appreciation Week\",\n            \"url\": \"https://www.checkiday.com/b9321bf3ce70e98fb385cb03d2f0cac4/teacher-appreciation-week\"\n        }\n    ],\n    \"multiday_ongoing\": [\n        {\n            \"id\": \"676cd91e31adcacd0a505117d2c4a842\",\n            \"name\": \"Be Kind to Animals Week\",\n            \"url\": \"https://www.checkiday.com/676cd91e31adcacd0a505117d2c4a842/be-kind-to-animals-week\"\n        },\n        {\n            \"id\": \"9cc82cc56178ba41f120381a4d6e5213\",\n            \"name\": \"Syringomyelia Awareness Month\",\n            \"url\": \"https://www.checkiday.com/9cc82cc56178ba41f120381a4d6e5213/syringomyelia-awareness-month\"\n        }\n    ],\n    \"rateLimit\": {\n        \"limitMonth\": 100,\n        \"remainingMonth\": 88\n    }\n}\n```\n\n### Search For Events\n\nSearch for events with a specified query.\n\n```ts\nconst response = await api.search({\n  // The search query. Must be at least 3 characters long.\n  query: 'zucchini',\n  // Include events that may be unsafe for viewing at work or by children.\n  // (Optional, defaults to false.)\n  adult: true,\n});\n```\n\nExample response:\n\n```json\n{\n    \"query\": \"zucchini\",\n    \"adult\": true,\n    \"events\": [\n        {\n            \"id\": \"cc81cbd8730098456f85f69798cbc867\",\n            \"name\": \"National Zucchini Bread Day\",\n            \"url\": \"https://www.checkiday.com/cc81cbd8730098456f85f69798cbc867/national-zucchini-bread-day\"\n        },\n        {\n            \"id\": \"778e08321fc0ca4ec38fbf507c0e6c26\",\n            \"name\": \"National Zucchini Day\",\n            \"url\": \"https://www.checkiday.com/778e08321fc0ca4ec38fbf507c0e6c26/national-zucchini-day\"\n        },\n        {\n            \"id\": \"61363236f06e4eb8e4e14e5925c2503d\",\n            \"name\": \"Sneak Some Zucchini Onto Your Neighbor's Porch Day\",\n            \"url\": \"https://www.checkiday.com/61363236f06e4eb8e4e14e5925c2503d/sneak-some-zucchini-onto-your-neighbors-porch-day\"\n        }\n    ],\n    \"rateLimit\": {\n        \"limitMonth\": 100,\n        \"remainingMonth\": 88\n    }\n}\n```\n\n### Get Event Information\n\nGet additional information for an Event.\n\n```ts\nconst response = await api.getEventInfo({\n  // The ID of the requested Event.\n  id: 'f90b893ea04939d7456f30c54f68d7b4',\n  // The starting range of returned occurrences.\n  // (Optional, defaults to 2 years prior.)\n  start: 2001,\n  // The ending range of returned occurrences.\n  // (Optional, defaults to 3 years in the future.)\n  end: 2003,\n});\n```\n\nExample response (some strings shortened to save space):\n\n```json\n{\n    \"event\": {\n        \"id\": \"f90b893ea04939d7456f30c54f68d7b4\",\n        \"name\": \"International Cat Day\",\n        \"alternate_names\": [],\n        \"adult\": false,\n        \"url\": \"https://www.checkiday.com/f90b893ea04939d7456f30c54f68d7b4/international-cat-day\",\n        \"hashtags\": [\n            \"InternationalCatDay\",\n            \"CatDay\"\n        ],\n        \"image\": {\n            \"small\": \"https://static.checkiday.com/img/300/kittens-555822.jpg\",\n            \"medium\": \"https://static.checkiday.com/img/600/kittens-555822.jpg\",\n            \"large\": \"https://static.checkiday.com/img/1200/kittens-555822.jpg\"\n        },\n        \"sources\": [\n            \"https://www.ibtimes.com/international-cat-day-2014-cat-lovers-worldwide-celebrate-feline-obsession-1653614\",\n            \"https://www.ifaw.org/united-states/news/ifaw-marks-international-cat-day\"\n        ],\n        \"founders\": [\n            {\n                \"name\": \"International Fund For Animal Welfare\",\n                \"url\": \"https://www.ifaw.org/\",\n                \"date\": \"2002\"\n            }\n        ],\n        \"description\": {\n            \"text\": \"International Cat Day celebrates love for cats...\",\n            \"html\": \"\u003cp\u003eInternational Cat Day celebrates love for cats...\",\n            \"markdown\": \"International Cat Day celebrates love for cats...\"\n        },\n        \"how_to_observe\": {\n            \"text\": \"Spend the day playing with your cat...\",\n            \"html\": \"\u003cp\u003eSpend the day playing with your cat...\",\n            \"markdown\": \"Spend the day playing with your cat...\"\n        },\n        \"patterns\": [\n            {\n                \"first_year\": 2002,\n                \"last_year\": null,\n                \"observed\": \"annually on August 8th\",\n                \"observed_html\": \"annually on \u003ca href=\\\"https://www.checkiday.com/8/8\\\"\u003eAugust 8th\u003c/a\u003e\",\n                \"observed_markdown\": \"annually on [August 8th](https://www.checkiday.com/8/8)\",\n                \"length\": 1\n            }\n        ],\n        \"tags\": [\n            {\n                \"name\": \"Pets \u0026 Animals\"\n            }\n        ],\n        \"occurrences\": [\n            {\n                \"date\": \"08/08/2002\",\n                \"length\": 1\n            },\n            {\n                \"date\": \"08/08/2003\",\n                \"length\": 1\n            }\n        ]\n    },\n    \"rateLimit\": {\n        \"limitMonth\": 100,\n        \"remainingMonth\": 88\n    }\n}\n```\n\n## License\n\nThe Holiday and Event API is made available under the MIT License (MIT). Please see the [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesty92%2Fholiday-event-api-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesty92%2Fholiday-event-api-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesty92%2Fholiday-event-api-js/lists"}