Bug: API returning default NASA logo instead of APOD image in url and hdurl

Open
#184 1 comment 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start by finding the scraper used by the planetary APOD endpoint and tracing how it extracts image URLs from science.nasa.gov. Reproduce the issue with the supplied GET request and compare the returned fields with the page’s APOD image. Done means url and hdurl return the APOD image URLs rather than the NASA logo, while the text fields continue to work.

Written by the indexing model from the issue text.

Description

Since the recent website migration to the new WordPress structure, the API seems to be failing to scrape the actual daily image. Instead of returning the Astronomy Picture of the Day, the API is grabbing the default NASA logo from the site header for both the url and hdurl fields.

Steps to Reproduce:
Make a standard GET request to the planetary APOD endpoint:
https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY

The url and hdurl fields should contain the direct link to the daily space image

Both image fields return the fallback NASA logo asset:
https://science.nasa.gov/wp-content/themes/nasa-child/assets/images/[email protected]

{
"date": "2026-10-05",
"explanation": "A deep image of the Sombrero galaxy reveals surprises...",
"hdurl": "https://science.nasa.gov/wp-content/themes/nasa-child/assets/images/[email protected]",
"media_type": "image",
"service_version": "v1",
"title": "NASA Science",
"url": "https://science.nasa.gov/wp-content/themes/nasa-child/assets/images/[email protected]"
}

The text fields (explanation and date) appear to be scraping correctly for the current day, so the issue is isolated specifically to how the scraper targets the image media URLs on the new science.nasa.gov layout.

Dominant language
Python
Stars
1.1k
Forks
218
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/apod-api

All issues in nasa/apod-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.