Using a Web API

  • Endpoint?
  • Parameters?
  • Authentication?
  • Responses?

NASA APOD

Image Credit: NASA

Access via CURL

curl -X GET https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY

JSON Response

{
    "date":"2021-04-19",
    "explanation":"What does the center of our galaxy look like?  In visible light, the ...",
    "hdurl":"https://apod.nasa.gov/apod/image/2104/GalacticCore_SpitzerSchmidt_6143.jpg",
    "media_type":"image",
    "service_version":"v1",
    "title":"The Galactic Center in Infrared",
    "url":"https://apod.nasa.gov/apod/image/2104/GalacticCore_SpitzerSchmidt_960.jpg"
}
The Galactic Center in Infrared

Image Credit: NASA