PoetryDB API

Beginner's Pick Books / No Auth Required Beginner HTTPS CORS
Free to Use
72 B
Measured Score 0 50 100 Speed 9/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://poetrydb.org/author,title/Dickinson;Hope
Result
HTTP 200 · application/json · 6,807 bytes · compressed
Response time
351 ms (median of 3) · fastest 335 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
title string Could Hope inspect her Basis
author string Emily Dickinson
lines array [1 item]
linecount string 8

Captured Response

Captured from a real request to https://poetrydb.org/author,title/Dickinson;Hope on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "title": "Could Hope inspect her Basis",
    "author": "Emily Dickinson",
    "lines": [
      "Could Hope inspect her Basis"
    ],
    "linecount": "8"
  }
]

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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://poetrydb.org/author,title/Dickinson;Hope";
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

"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").

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 9/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 351ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Books
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →