PoetryDB API

Beginner's Pick Books / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

PoetryDB serves a curated collection of classic English poems via a simple REST API—searchable by author, title, or first line. No authentication or rate limiting to worry about.

Beginner Tip

The URL pattern is the API itself: https://poetrydb.org/{field}/{search-term}. Try https://poetrydb.org/author/Shakespeare to get all Shakespeare poems as JSON immediately.

Available Data

PoetryDB data via REST API

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from PoetryDB",
    "description": "Enables you to get instant data from our vast poetry collection",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

title Title of the poem.
author Name of the poet.
lines Array of strings where each element is one line of the poem.
linecount Total number of lines in the poem as a string.

Implementation Example

Request
const url = "https://github.com/thundercomb/poetrydb";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

"404" or empty array response Author name or title not in the PoetryDB collection, or spelling mismatch
Fetch https://poetrydb.org/author to get the full list of available authors first, then use an exact name from that list.
Response contains "Poem not found" object The search term matched no entries
PoetryDB returns a JSON object with "reason" when nothing matches—check for this key in your response handling before accessing poem fields.
Line breaks lost in display The "lines" field is an array of strings, not a pre-formatted block
Join the "lines" array with "\n" (newline) to reconstruct the poem: poem.lines.join("\n").

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Books
Difficulty Beginner
Verified: 2026-04-04

Related Tags

Similar APIs

View All →