0

I asked this question on Stack Overflow already, but it got closed. I hope, here is the right place to ask it.

So there is this great website, that tells me some interesting events of the current day. Searching for an API for it, I found this page.

However I may be blind or whatever but I can't find any possibility to get the API endpoint. And I am sure there is one, because this website says, it has one.

I may be wrong with the terms, but what I want: I go to www.daysoftheyear/some/thing.json and get JSON data of today's events. Is this possible? If not, is there a public API for something like this?

I already contacted the site owners about this but it may take a long time to get an answer back.

4
  • 1
    That website is hard to read, it looks 1/2 broken. I would recommend timeanddate.com/services/api which requires a 3-month trial account, then a paid-for account. What exactly do you want to be able to do? Commented Mar 29, 2021 at 12:04
  • @spikey_richie , I am trying to make something similar to google's doodles. But in a discord bot, so that the bot tells "today is the day of Coloured Macaroni" for example. And best it would be some fun facts too, not some serious religious holidays
    – gXLg
    Commented Mar 29, 2021 at 12:09
  • 1
    There's also en.wikipedia.org/api/rest_v1/#/Feed/onThisDay Commented Mar 29, 2021 at 12:12
  • Still, not exactly what I want, the events are nothing funny. E.g "Same sexual marriage allowed in UK" or "Christian feast day", is not that interesting as "Day of Lemon Cake", that is at least nothing serious
    – gXLg
    Commented Mar 29, 2021 at 12:52

2 Answers 2

2

So, I still did not manage to find some API endpoint for this, but I got what I wanted in another way: I used a similar website (https://nationaltoday.com/) which had oEmbed included in the homepage. Luckily, the oEmbed contains the events on that day. I used the module unfurled for Node.js to get the oEmbed of that page as JSON, that I filter out and get the events.

1

I just managed to get an API key for days of the year, and they granted me access via curl -H 'X-Api-Key: [key]', 'https://www.daysoftheyear.com/api/v1/today' but all my .json() answers (I'm using React) aren´t what I'm looking for.

They say, in the documentation, that you have to access with your key first, then access the endpoint, but I'm not sure how to deal with it, since I'm trying a lot of maners with some friends with good knowledge of javascript and we're not being able to access the data.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Sep 28, 2022 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .