Skip to content

Latest commit

 

History

History
132 lines (95 loc) · 3.9 KB

doc.md

File metadata and controls

132 lines (95 loc) · 3.9 KB

National API Day API Reference

Over 7000 Holidays that you may or may not have heard of that happen annually - all conveniently available through this API.

Ever wondered what obscure holidays were today? On your birthday? Or this month? Or how many pizza-related holidays there are?

This might be the most complete list of Holidays on the internet - I've aggregated from many sources so all your queries produce the most complete and accurate results!

Functions

All API urls are extended off of /api

GET /today

arguments: none

returns all of the holidays that take place on the date of the GET request in GMT +/- 0:00

GET /api/today

{
    "day": 27,
    "month": 8,
    "holidays": ["Banana Lovers Day", "The Duchess Who Wasnt Day", "The Duchess Who Wasn't Day", "Petroleum Day", "Tug-of-War Day", "International Bat Night", "National Pots de Cr\u00e8me Day", "Burger Day", "Pots De Creme Day", "National Banana Lovers Day", "International Lottery Day"]
}

GET /date/{month}/{day}

arguments: month, day (both required, both ints.)

returns all annual holidays that take place on month/day/year

GET /api/date/11/26

{
    "day": 26,
    "month": 11,
    "holidays": ["A Blue Christmas", "National Cake Day", "Cakes Day", "Turkey Free Thanksgiving", "Cake Day", "Day of Mourning"]
}

GET /random

arguments: none

returns the date and name of a single random holiday on that date

GET /api/random

{
    "month": 1,
    "day": 31,
    "holiday": "Gorilla Suit Day"
}

GET /month/{month}

arguments: month (int, required)

returns all the holidays that take place in the specified month, grouped by the day they occur on.

GET /api/month/4

{
    "month": 4,
    "holidays": {
        "1": ["Reading Is Funny Day", "Fun at Work Day", "Day Of Hope", "One Cent Day", "Sourdough Bread Day", "Fun Day"],
        "2": ["Love Your Produce Manager Day", "Ferret Day", "National Peanut Butter and Jelly Day", "Peanut Butter and Jelly Day", "World Autism Day", "Children's Book Day", "Tell A Lie Day"],
        "3": ["National Find a Rainbow Day", "World Party Day", "Poet in a Cupcake Day", "Tweed Day", "Fish Fingers and Custard Day", "Find A Rainbow Day", "Chocolate Mousse Day", "Walk to Work Day"],
        "4": ...

GET /search/{query}

returns all the holidays that have titles that pattern match the query parameter, sorted by date

GET /api/search/pizza

{
    "2": {
        "9": ["Pizza Day", "National Pizza Day (at least five slices)[1]"],
        "10": ["Great American Pizza Bake"],
        "16": ["Great American Pizza Bake"]
        },
    "4": {
        "5": ["Deep Dish Pizza Day"]
        },
    "5": {
        "15": ["Pizza Party Day"]
        },
    "9": {
        "5": ["National Cheese Pizza Day", "Cheese Pizza Day"],
        "20": ["Pepperoni Pizza Day", "National Pepperoni Pizza Day"]
        },
    "10": {
        "9": ["Beer and Pizza Day", "International Beer and Pizza Day"],
        "11": ["Sausage Pizza Day", "National Sausage Pizza Day"]
        },
    "11": {
        "12": ["Pizza With The Works Except Anchovies Day", "National Pizza with the Works Except Anchovies Day"]
        }
}

About the Data

The data for this app has been scraped from:

Can't find a holiday that you expect?

  • suggest adding it under the issues for this project on github
  • create a pr and add it yourself
    • preferably, follow the procedure in the holiday_agg directory