Based on my initial experimentation, sunrisesunset.io requires entering a lat/long, you can't use a named location, nor can you omit the location. Which is odd: It will use the the internet location to determine the timezone, why can't it use the same information to determine location? Agreed that the location would be imprecise, but would be close enough for most usages, and you could have a warning field in the returned JSON which says that it'll be imprecise. Maybe the same site offers a separate API call to return the lat/long of a location, maybe there's another easier way to do that from a public API, or maybe there's a simple way to do that in code at the browser level without having to call any API, and I just don't know those methods.

Anyway, I wanted my implementation to be able to either omit the location information, or just use a zip code or city name, and Googling and scraping the result was easy at the time (until it got more complicated recently).

Along the lines of Roger's suggestion, I wonder if there's a Google API for returning those kinds of results in a JSON, so that I don't have to scrape the HTML? That would be the best solution. Heck, that same code is already using the Google API to control YouTube videos, why didn't I think to look for a Google API for web searches? Silly me.
_________________________
Tony Fabris