A little poetry, by API.
Read-only JSON endpoints power this website. Every poem carries its author, source link, and available license information. Preserve those credits and observe each work’s usage terms.
The daily poem
GET /api/poemA deterministic selection from the included collection, changing at midnight UTC. The iOS app has its own selection and may show a different poem.
A random discovery
GET /api/poem?mode=random&source=mixedSources: mixed, poetrydb, bundled, contemporary. Mixed uses PoetryDB on roughly half of requests. If PoetryDB fails, the response supplies a bundled poem with fallback: true.
The collection
GET /api/poems?era=contemporary&limit=30Search with q. Filter era: all, classic, contemporary. Pagination uses offset (0 or greater) and limit (1–100). Includes total matching poems.
Headlines & a reading mood
GET /api/newsRecent headlines and links from BBC and NPR RSS feeds. Response includes fetchedAt and unavailableSources; a total outage returns 503. Feed results are cached for up to ten minutes per server instance. No full articles are republished.
GET /api/vibeA transparent keyword-based reading mood and a matching poem. This is not Apple Intelligence or a reliable measurement of world sentiment. It does not generate poetry.
Example
const response = await fetch('/api/poem');
if (!response.ok) throw new Error('Poem unavailable');
const { poem } = await response.json();
console.log(poem.title, poem.author, poem.content);Use this website’s origin for external clients. Access follows the site’s visibility: private previews require sign-in; public access is available only after the owner enables it. These endpoints are not yet a versioned service with an uptime guarantee. Cache responses and avoid bulk polling.
Favorites and history stay in the browser; these endpoints do not expose or sync personal collections. The iOS app has not been switched to these APIs.