Random Poem API

Retrieve a random poem by many famous authors. You can filter poem's by length (number of lines).

Make sure to read about the best art APIs to supplement your app.

GET
https://api.apileague.com/retrieve-random-poem
Example Request and Response
GET
https://api.apileague.com/{{ examples.getRandomPoem }}
{
    "title": "Purpose",
    "author": "Amos Russel Wells",
    "poem": "Deeply and long the sap must flow\nEre the merest layer of elm can grow.\n\nMany a wave's recurrent shock\nIs needed to smooth the tiniest rock.\n\nThousands of leaves must fade and fall\nTo make the mold by the garden wall.\n\nThus, as the patient seasons roll,\nSlowly is fashioned a human soul.\n\nPurpose and failure and purpose still,\nSteadily moved by a quiet will,—\n\nLayer on layer in sturdy way,\nHardly seen the growth of a day,—\n\nTimes of failure and fear and fall,\nBut one strong tendency through it all,—\n\nGod and purpose and sun by sun\nReach the stars before they are done!\nFor I know the plans I have for you,” declares the Lord, “plans to prosper you and not to harm you, plans to give you hope and a future"
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}

Frequently Asked Questions

Can I filter poems by length?

Yes, you can specify a minimum and maximum number of lines to retrieve poems that fit your desired length.

Are the poems by famous authors?

The database includes poems from many famous and classic authors, as well as some lesser-known ones.

Does it return the full text of the poem?

Yes, the API returns the full content of the poem along with the title and the author's name.

How is the Random Poem API different from the Random Quote API?

The Random Poem API returns complete poems or significant excerpts, whereas the Random Quote API returns short, memorable statements or citations.

Questions? Need Help? Ask Away