Since some days ago NASA APOD API (https://api.nasa.gov/) stopped to work suddenly.
Here is a sample link (with demo key): https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY
Some questions for who is using this API:
- Do you know the reason why this API doesn't work?
- Is there an alternative URL (or way) for getting this data?
Please give me an answer, because I need this data for my projects.
Thank you
I don't know how to solve; I thought an html parser for the original site, but it looks so complicated (and I don't want to have dirty data in my projects).
Perhaps the API has simply just gone down? It appears the same here, with a HTTP 504 Gateway Timeout error. There isn't a lot you can do until it comes back online, which it should hopefully in a few days.
The non-developer page still is working at the APOD website, with the archive found here. A HTML Parser would work, however I would highly recommend against requesting to these pages as they haven't been designed for doing so. They can change without notice which may render your HTML Parser useless when they do change. As a temporary fix, this may be possible, but not a good idea.
If you wish to create an HTML parser with that website, you could use something like this, using the fetch api. This may conflict with other img elements, but since you haven't provided any code, here would be my implementation of it
A good option may be hosting your own. You can use the tutorial on the apod-api Github site.
If you're unable to host your own, unfortunately the best thing to do is just to wait it out. Sorry!