NASA API: Get astronomy picture of the day
Returns NASA's Astronomy Picture of the Day for a date: title, explanation, featured media link, optional high-resolution link, and credit.
Unofficial. Not affiliated with or endorsed by NASA.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Date optional
date Picture date in YYYY-MM-DD, such as 2025-09-14. Defaults to today (UTC). Dates run from 1995-06-16 to today.
2026-09-28
Input as JSON
{ "date": "2026-09-28"}Output
{ "date": "2026-09-28", "title": "Cosmic Latte: The Average Color of the Universe", "credit": "Karl Glazebrook & Ivan Baldry ( JHU )", "copyright": null, "page_link": "https://apod.nasa.gov/apod/ap260928.html" , "media_link": "https://assets.science.nasa.gov/dynamicimage/assets/science/cds/apod/apod/2026/september/CosmicLatte_jhu_960_annotated.jpg?w=960&h=640&fit=clip&crop=faces%2Cfocalpoint" , "media_type": "image", "explanation": "What color is the universe? More precisely, if the entire sky were smeared out, what color would the final mix be? This whimsical question came up when trying to determine what stars are commonplace in nearby galaxies. The answer, depicted here, is a conditionally perceived shade of beige . In compu…", "high_resolution_image_link": null}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"nasa.gov/get_astronomy_picture_of_the_day","input":{"date":"2026-09-28"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "nasa.gov/get_astronomy_picture_of_the_day" , "input": { "date": "2026-09-28" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "nasa.gov/get_astronomy_picture_of_the_day" , "input": { "date": "2026-09-28" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run nasa.gov/get_astronomy_picture_of_the_day# with {"date":"2026-09-28"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "properties": { "date": { "type": "string", "description": "Picture date in YYYY-MM-DD, such as 2025-09-14. Defaults to today (UTC). Dates run from 1995-06-16 to today." } }}Output schema
{ "type": "object", "required": [ "date", "title", "explanation", "media_type", "media_link", "high_resolution_image_link", "credit", "copyright", "page_link" ], "properties": { "date": { "type": "string", "format": "date", "description": "Date of this APOD entry." }, "title": { "type": "string", "description": "Title of the picture." }, "credit": { "type": [ "string", "null" ], "description": "Image or video credit as plain text, if listed." }, "copyright": { "type": [ "string", "null" ], "description": "Copyright information as plain text, if listed." }, "page_link": { "type": "string", "description": "APOD page for this date." }, "media_link": { "type": "string", "description": "Link to the featured image or video." }, "media_type": { "enum": [ "image", "video" ], "type": "string", "description": "Type of featured media." }, "explanation": { "type": "string", "description": "Explanation in plain text." }, "high_resolution_image_link": { "type": [ "string", "null" ], "description": "Higher-resolution image link, if one is provided." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
nasa.gov/get_astronomy_picture_of_the_day- Returns
- date, title, explanation, media type and link, high-resolution link, credit, copyright, APOD page link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method nasa.gov/get_astronomy_picture_of_the_day with the inputs above.
Ask your agent
- Show me the astronomy picture from March 3, 2019, with its explanation and credit
- What's the featured space image for 2023-07-21? I want the title and high-res link if available
- Pull up today's astronomy picture of the day from NASA and tell me who took the photo
- I need the APOD entry for 1998-11-09, including the copyright line and the page link
- Could you fetch the NASA picture of the day for 2010-04-15 and give me the media link and explanation?
See more
All NASA methodsSearches NASA public photos, videos or audio by words and creation year, returning matches in relevance order with thumbnails and full-size file links.
nasa.gov/search_imagesLists near-Earth asteroids that pass Earth between two UTC dates within a chosen distance, with approach times, size ranges, speed and hazard status.
nasa.gov/list_near_earth_asteroidsFinds upcoming International Space Station sightings for a city in NASA's city list, with local start times, visibility and sky directions. Cities without scheduled passes return an empty list.
nasa.gov/get_iss_sightingsList EONET natural events with latest observations in the past number of days, most recent first. A country or region filter matches reported event locations against mapped boundaries; locations and ongoing status are approximate, and not all events have a reported size or strength.
nasa.gov/list_natural_eventsFinds the closest Wayback Machine capture of a web page to a past date and returns its title and readable text.
web.archive.org/get_archived_pageGets daily sunrise, sunset, solar noon, day length and civil twilight for a place from Time and Date, for one or more consecutive days. Times are local with UTC offset; days without sunrise or sunset are marked.
timeanddate.com/get_sunrise_and_sunsetGets the quote BrainyQuote shows today in a chosen daily category (general, love, nature, funny or art), with its author and quote link. The date follows the day shown on BrainyQuote.
brainyquote.com/get_quote_of_the_dayGets Bible Gateway's Verse of the Day in the requested translation (NIV by default). The date is the one Bible Gateway assigns, which may differ from the local date.
biblegateway.com/get_verse_of_the_day