• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
greasegum

greasegum

birdfacts

Public
Like
birdfacts
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
3
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
/
README.md
Code
/
README.md
Search
6/29/2025
Viewing readonly version of main branch: v2
View latest version
README.md

Bird Facts Microservice

A robust, layered bird facts API that provides regionally-relevant bird information with fun facts and rich descriptions.

Features

  • Regional Bird Selection: Uses eBird API to get locally relevant birds
  • Fun Facts: API Ninjas for engaging bird facts
  • Rich Descriptions: Wikipedia API for detailed information and images
  • Smart Caching: Reduces API calls and improves response times
  • Graceful Fallbacks: Multiple data sources ensure reliable responses

API Endpoints

GET /api/birds/random

Get a random bird fact with regional relevance.

Query Parameters:

  • region (optional): Region code (e.g., "US-CA" for California)
  • lat (optional): Latitude for location-based results
  • lng (optional): Longitude for location-based results

Response:

{ "name": "Scarlet Macaw", "scientificName": "Ara macao", "fact": "Scarlet macaws are known for their striking red, yellow, and blue plumage...", "wikipedia": { "summary": "The scarlet macaw is a large red, yellow, and blue Central and South American parrot...", "image": "https://upload.wikimedia.org/wikipedia/commons/9/9f/Ara_macao_01.jpg", "url": "https://en.wikipedia.org/wiki/Scarlet_macaw" }, "region": "Amazon Basin", "source": "regional" }

GET /api/birds/region/:regionCode

Get birds observed in a specific region.

GET /health

Health check endpoint.

Architecture

  • Backend: Hono framework with TypeScript
  • Caching: Val Town Blob storage for API response caching
  • APIs: eBird, API Ninjas, Wikipedia
  • Error Handling: Graceful fallbacks between data sources

Environment Variables

  • EBIRD_API_KEY: eBird API key
  • API_NINJAS_KEY: API Ninjas key (optional, has free tier)
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.