Posts

Showing posts from August, 2021

How to use NASA's APOD API

Image
  Nasa publishes one astronomy-related picture(or videos sometimes) every day, i.e., Astronomy Picture of the Day. But do you know? That there is an API that lets you access that information, and you can make a website out of it? So I recently tried doing that, and   this   is what I was able to come up with. And here are the steps so you can do it too. 1.Get your API key: You can get your unique API key from  https://api.nasa.gov/  .What you need to do is just sign up and this website will generate your API key. We will need this key to use this API which has an Hourly Limit of 1,000 requests per hour. 2.Let's get done with HTML first There are a few things for which we want to make space in our HTML Doc. And those things are title, date picker, date(yyyy-mm-dd), copyright, image/video URL, HD URL in case of the image, explanation about image or video, and footer if you want to add your social handles or something. so this will be our code inside the  <body>  of the HTML. &