This service contains a single endpoint, "/v1/apod/", which may be used to obtain a selected image url and metadata from http://apod.nasa.gov. You can use this service endpoint by sending a GET request which may contain one or more of the following parameters which direct its output:
| Allowed Field | Description |
|---|---|
| date | A string in YYYY-MM-DD format indicating the date of the APOD image (example: 2014-11-03). Must be after 1995-06-16, the first day an APOD picture was posted. There are no images for tomorrow available through this API. Defaults to today's date. |
| concept_tags | A boolean indicating whether concept tags should be returned with the rest of the response. The concept tags are not necessarily included in the explanation, but rather derived from common search tags that are associated with the description text. (Better than just pure text search.). Defaults to False. |
For example, using curl (http://curl.haxx.se):
curl http://apod.idas-ds1.appdat.jsc.nasa.gov/v1/apod/?concept_tags=True&date=2015-10-11
which should return an application/json response with a JSON formatted string containing the desired information. For example, the return JSON from the above query is:
{
"concepts": "concept_tags functionality turned off in current service",
"date": "2015-10-11",
"explanation": "Clouds of glowing gas mingle with dust lanes in the Trifid Nebula, a star forming region toward the constellation of the Archer (Sagittarius). In the center, the three prominent dust lanes that give the Trifid its name all come together. Mountains of opaque dust appear on the right, while other dark filaments of dust are visible threaded throughout the nebula. A single massive star visible near the center causes much of the Trifid's glow. The Trifid, also known as M20, is only about 300,000 years old, making it among the youngest emission nebulae known. The nebula lies about 9,000 light years away and the part pictured here spans about 10 light years. The above image is a composite with luminance taken from an image by the 8.2-m ground-based Subaru Telescope, detail provided by the 2.4-m orbiting Hubble Space Telescope, color data provided by Martin Pugh and image assembly and processing provided by Robert Gendler. Follow APOD on: Facebook, Google Plus, or Twitter",
"service_version": "v1",
"title": "In the Center of the Trifid Nebula",
"url": "http://apod.nasa.gov/apod/image/1510/Trifid_HubbleGendler_960.jpg"
}
Returned field meanings are as follows:
| Returned Field | Description |
|---|---|
| resource | A dictionary describing the `image_set` or `planet` that the response illustrates, completely determined by the structured endpoint |
| concept_tags | A boolean reflection of the supplied option. Included in response because of default values. |
| title | The title of the image. |
| date | Date of image. Included in response because of default values. |
| url | The URL of the APOD image of the day. |
| explanation | The supplied text explanation of the image. |
| concepts | The most relevant concepts within the text explanation. Only supplied if `concept_tags` is set to True. |
| thumbnail_url | The URL of thumbnail of the video. Only supplied if `thumbs` is set to True. |