FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
wolf
wolfBingImageOfDay
Public
Like
BingImageOfDay
Home
Code
4
README.md
C
backupImage.tsx
fetchBingImage.tsx
H
index.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.tsx
https://wolf--a5e9d94206d911f0a183569c3dd06744.web.val.run
README.md

Bing Image of the Day Archive

This Val Town project fetches, displays, and archives the Bing Image of the Day, providing an API to access both current and historical images.

Overview

  • Fetch the current Bing Image of the Day
  • Archive images to Val Town blob storage with date-based naming
  • List all archived images with their dates
  • Retrieve specific historical images by date

API Endpoints

EndpointMethodDescription
/GETReturns the current Bing Image of the Day
/listGETReturns a JSON object listing all archived images with dates as keys and URLs as values
/get/:dateGETReturns a specific archived image by date (format: MM-DD-YYYY)
/backupGETManually triggers a backup of the current Bing Image of the Day
/docsGETReturns API documentation in JSON format

How It Works

  • The service scrapes the Bing image from a public source (bing.gifposter.com)
  • Images are stored in Val Town's blob storage with keys in the format bing-images-of-day/MM-DD-YYYY.jpg
  • The main API serves both current and archived images with proper caching headers
  • Automation can be set up to trigger the backup endpoint daily to build a complete archive

Usage Examples

View Current Image

GET /

Returns the current Bing Image of the Day as a JPEG with appropriate headers.

List All Archived Images

GET /list

Returns a JSON object like:

{ "1-15-2024": "https://your-val.web.val.run/get/1-15-2024.jpg", "1-14-2024": "https://your-val.web.val.run/get/1-14-2024.jpg", "1-13-2024": "https://your-val.web.val.run/get/1-13-2024.jpg" }

Get Specific Image by Date

GET /get/1-15-2024

Returns the image for January 15, 2024 as a JPEG.

HTTP
  • index.tsx
    wolf--a5e9d94206d911f0a183569c3dd06744.web.val.run
Cron
  • backupImage.tsx
Code
README.md
C
backupImage.tsx
fetchBingImage.tsx
H
index.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.