BYTETOOLS

PoetryDB API

Free poetry API with no key: full poem text by author, title or line count from a public-domain corpus. CORS enabled. Tested curl example and live JSON.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the PoetryDB API?

PoetryDB is a free API providing full text of public-domain poems searchable by author, title, line count or content. It requires no API key and returns complete poem text rather than excerpts.

PoetryDB serves complete poems rather than snippets, which is unusual and makes it genuinely useful for building reading applications. The corpus is public domain, so there are no licensing complications in displaying the full text.

Its combinable path syntax is neat: you can request `/author,title/Emily Dickinson;Hope` to filter on both at once, or `/linecount/14` to find every sonnet-length poem in the corpus — a nice fit for literary tools and teaching resources.

Quick facts

Base URL
https://poetrydb.org
Authentication
No key required.
Rate limit
No published limit.
Pricing
Free. Poems are public domain.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the PoetryDB API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. List poem titles by an author

GET https://poetrydb.org/author/Emily%20Dickinson/title

curl
curl 'https://poetrydb.org/author/Emily%20Dickinson/title'
JavaScript (fetch)
const res = await fetch("https://poetrydb.org/author/Emily%20Dickinson/title");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://poetrydb.org/author/Emily%20Dickinson/title", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
[
  {
    "title": "Not at Home to Callers"
  },
  {
    "title": "Defrauded I a Butterfly --"
  },
  {
    "title": "The words the happy say"
  },
  {
    "title": "Summer begins to have the look"
  },
  {
    "title": "The Notice that is called the Spring"
  },
  {
    "title": "Than Heaven more remote,"
  },
  {
    "title": "Which is the best -- the Moon or the Crescent?"
  },
  {
    "title": "The Life we have is very great."
  },
  {
    "title": "Her Sweet turn to leave the Homestead"
  },
  {
    "title": "We should not mind so small a flower"
  },
  {
    "title": "Nature can do no more"
  },
  {
    "title": "Declaiming Waters none may dread --"
  },
  {
    "title": "The Butterfly's Numidian Gown"
  },
  {
    "title": "I prayed, at first, a little Girl,"
  },
  {
    "title": "So give me back to Death --"
  },
  {
    "title": "I never felt at Home -- Below"
  },
  {
    "title": "Could Hope inspect her Basis"
  },
  {
    "title": "He put the Belt around my life"
  },
  {
    "title": "A full fed Rose on meals of Tint"
  },
  {
    "title": "Success is counted sweetest"
  },
  {
    "title": "I Years had been from Home"
  },
  {
    "title": "Musicians wrestle everywhere"
  },
  {
    "title": "How much the present moment means"
  },
  {
    "title": "Yesterday is History,"
  },
  {
    "title": "Now I knew I lost her --"
  },
  {
    "title": "I noticed People disappeared"
  },
  {
    "title": "Snow beneath whose chilly softness"
  },
  {
    "title": "Absent Place -- an April Day --"
  },
  {
    "title": "Where Thou art -- that -- is Home --"
  },
  {
    "

Parameters

ParameterTypeRequiredDescription
<field>pathRequiredauthor, title, lines or linecount. author
<value>pathRequiredThe search term, URL-encoded. Emily%20Dickinson
<output>pathOptionalRestrict returned fields, e.g. /title or /author,title. title

Response fields

[].titlestring
Poem title.
[].authorstring
Poet's name.
[].linesarray
The poem text, one array element per line.
[].linecountstring
Number of lines, returned as a string.

What you can build with the PoetryDB API

  • Build a poem-a-day app or literary reading widget
  • Create educational resources for literature classes
  • Find poems by structural form using line count, such as sonnets
  • Generate found poetry or text-analysis projects from a real corpus

Common errors and how to fix them

status 404 in body

No poems matched; returned as a JSON object rather than an HTTP error.

Fix: Check whether the response is an array before iterating — errors come back as an object.

Author not found

Names must match the corpus exactly.

Fix: Fetch /author for the list of available poets and match against it.

PoetryDB API — frequently asked questions

Is PoetryDB free to use?

Yes, completely free with no API key. The poems are public domain, so you can display the full text without licensing concerns.

Does PoetryDB return the full poem text?

Yes, in the `lines` array with one element per line — which preserves the poem's line breaks, important for poetry.

How do I find poems of a specific length?

Use /linecount/14 for fourteen-line poems, for example. Combined with an author filter it is a quick way to find sonnets in the corpus.

How does PoetryDB signal that nothing matched?

It returns a JSON object with a status field rather than an HTTP error code or empty array. Check whether the response is an array before iterating over it.

Tools that pair with this API

PoetryDB is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.