{"openapi":"3.1.0","info":{"title":"Poetry API","version":"1.0.0","description":"A corpus of 2,500+ classic public-domain poems by 127 authors (Shakespeare, Keats, Dickinson, Whitman, Poe, Frost and many more), via the PoetryDB collection. Look up a poem by title or id and get its full text, line by line; browse every poem by an author (or list all authors); full-text search across titles, authors and lines; or fetch a random poem (optionally by author or capped to a number of lines, perfect for a poem-of-the-day). Ideal for literary apps, education, writing tools, daily-poem widgets and creative projects.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/poetry-api","description":"oanor gateway"}],"tags":[{"name":"Poetry"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/author":{"get":{"operationId":"get_v1_author","tags":["Poetry"],"summary":"Poems by an author, or list all authors","description":"","parameters":[{"name":"name","in":"query","required":false,"description":"Author name, e.g. Shakespeare (omit to list all)","schema":{"type":"string"},"example":"Shakespeare"},{"name":"limit","in":"query","required":false,"description":"Max poems (1-500, default 50)","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":162,"poems":[{"id":2286,"title":"A Lover's Complaint","author":"William Shakespeare","linecount":331},{"id":2287,"title":"Spring and Winter ii","author":"William Shakespeare","linecount":18},{"id":2288,"title":"Orpheus with his Lute Made Trees","author":"William Shakespeare","linecount":12},{"id":2289,"title":"Winter","author":"William Shakespeare","linecount":18},{"id":2290,"title":"Spring","author":"William Shakespeare","linecount":18},{"id":2291,"title":"Spring and Winter i","author":"William Shakespeare","linecount":18},{"id":2292,"title":"Blow, Blow, Thou Winter Wind","author":"William Shakespeare","linecount":20},{"id":2293,"title":"Under the Greenwood Tree","author":"William Shakespeare","linecount":16},{"id":2294,"title":"Sonnet 3: Look in thy glass and tell the face thou viewest","author":"William Shakespeare","linecount":14},{"id":2295,"title":"Sonnet 7: Lo! in the orient when the gracious light","author":"William Shakespeare","linecount":14},{"id":2296,"title":"Sonnet 8: Music to hear, why hear'st thou music sadly?","author":"William Shakespeare","linecount":14},{"id":2297,"title":"Sonnet 10: For shame! deny that thou bear'st love to any","author":"William Shakespeare","linecount":14},{"id":2298,"title":"Sonnet 21: So is it not with me as with that Muse","author":"William Shakespeare","linecount":14},{"id":2299,"title":"Sonnet 25: Let those who are in favour with their stars","author":"William Shakespeare","linecount":14},{"id":2300,"title":"Sonnet 26: Lord of my love, to whom in vassalage","author":"William Shakespeare","linecount":14},{"id":2301,"title":"Sonnet 27: Weary with toil, I haste me to my bed","author":"William Shakespeare","linecount":14},{"id":2302,"title":"Sonnet 30: When to the sessions of sweet silent thought","author":"William Shakespeare","linecount":14},{"id":2303,"title":"Sonnet 33: Full many a glorious morning have I seen","author":"William Shakespeare","linecount":14},{"id":2304,"title":"Sonnet 34: Why didst thou promise such a beauteous day","author":"William Shakespeare","linecount":14},{"id":2305,"title":"Sonnet 41: Those pretty wrongs that liberty commits","author":"William Shakespeare","linecount":14},{"id":2306,"title":"Sonnet 42: That thou hast her it is not all my grief","author":"William Shakespeare","linecount":14},{"id":2307,"title":"Sonnet 45: The other two, slight air, and purging fire","author":"William Shakespeare","linecount":14},{"id":2308,"title":"Sonnet 50: How heavy do I journey on the way","author":"William Shakespeare","linecount":14},{"id":2309,"title":"Sonnet 57: Being your slave what should I do but tend","author":"William Shakespeare","linecount":14},{"id":2310,"title":"Sonnet 58: That god forbid, that made me first your slave","author":"William Shakespeare","linecount":14},{"id":2311,"title":"Sonnet 60: Like as the waves make towards the pebbled shore","author":"William Shakespeare","linecount":14},{"id":2312,"title":"Sonnet 64: When I have seen by Time's fell hand defac'd","author":"William Shakespeare","linecount":14},{"id":2313,"title":"Sonnet 71: No longer mourn for me when I am dead","author":"William Shakespeare","linecount":14},{"id":2314,"title":"Sonnet 72: O! lest the world should task you to recite","author":"William Shakespeare","linecount":14},{"id":2315,"title":"Sonnet 76: Why is my verse so barren of new pride","author":"William Shakespeare","linecount":14},{"id":2316,"title":"Sonnet 82: I grant thou wert not married to my Muse","author":"William Shakespeare","linecount":14},{"id":2317,"title":"Sonnet 85: My tongue-tied Muse in manners holds her still","author":"William Shakespeare","linecount":14},{"id":2318,"title":"Sonnet 86: Was it the proud full sail of his great verse","author":"William Shakespeare","linecount":14},{"id":2319,"title":"Sonnet 87: Farewell! thou art too dear for my possessing","author":"William Shakespeare","linecount":14},{"id":2320,"title":"Sonnet 89: Say that thou didst forsake me for some fault","author":"William Shakespeare","linecount":14},{"id":2321,"title":"Sonnet 90: Then hate me when thou wilt; if ever, now","author":"William Shakespeare","linecount":14},{"id":2322,"title":"Sonnet 93: So shall I live, supposing thou art true","author":"William Shakespeare","linecount":14},{"id":2323,"title":"Sonnet 97: How like a winter hath my absence been","author":"William Shakespeare","linecount":14},{"id":2324,"title":"Sonnet 109: O! never say that I was false of heart","author":"William Shakespeare","linecount":14},{"id":2325,"title":"Sonnet 114: Or whether doth my mind, being crown'd with you","author":"William Shakespeare","linecount":14},{"id":2326,"title":"Sonnet 118: Like as, to make our appetite more keen","author":"William Shakespeare","linecount":14},{"id":2327,"title":"Sonnet 4: Unthrifty loveliness, why dost thou spend","author":"William Shakespeare","linecount":14},{"id":2328,"title":"Sonnet 6: Then let not winter's ragged hand deface","author":"William Shakespeare","linecount":14},{"id":2329,"title":"Sonnet 12: When I do count the clock that tells the time","author":"William Shakespeare","linecount":14},{"id":2330,"title":"Sonnet 13: O! that you were your self; but, love you are","author":"William Shakespeare","linecount":14},{"id":2331,"title":"Sonnet 15: When I consider every thing that grows","author":"William Shakespeare","linecount":14},{"id":2332,"title":"Sonnet 16: But wherefore do not you a mightier way","author":"William Shakespeare","linecount":14},{"id":2333,"title":"Sonnet 23: As an unperfect actor on the stage","author":"William Shakespeare","linecount":14},{"id":2334,"title":"Sonnet 24: Mine eye hath play'd the painter and hath stell'd","author":"William Shakespeare","linecount":14},{"id":2335,"title":"Sonnet 36: Let me confess that we two must be twain","author":"William Shakespeare","linecount":14}],"author":"William Shakespeare"},"meta":{"timestamp":"2026-05-31T05:48:00.417Z","request_id":"e40bb3b6-94f8-437f-bce7-a5b4f9f2b4c4"},"status":"ok","message":"Author poems listed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/poem":{"get":{"operationId":"get_v1_poem","tags":["Poetry"],"summary":"A poem by title or id (full text)","description":"","parameters":[{"name":"title","in":"query","required":false,"description":"Poem title, e.g. To Hope","schema":{"type":"string"},"example":"To Hope"},{"name":"id","in":"query","required":false,"description":"Poem id","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"id":1298,"lines":["When by my solitary hearth I sit,","      And hateful thoughts enwrap my soul in gloom;","When no fair dreams before my \"mind's eye\" flit,","      And the bare heath of life presents no bloom;","            Sweet Hope, ethereal balm upon me shed,","            And wave thy silver pinions o'er my head!","","Whene'er I wander, at the fall of night,","      Where woven boughs shut out the moon's bright ray,","Should sad Despondency my musings fright,","      And frown, to drive fair Cheerfulness away,","            Peep with the moonbeams through the leafy roof,","            And keep that fiend Despondence far aloof!","","Should Disappointment, parent of Despair,","      Strive for her son to seize my careless heart;","When, like a cloud, he sits upon the air,","      Preparing on his spell-bound prey to dart:","            Chase him away, sweet Hope, with visage bright,","            And fright him as the morning frightens night!","","Whene'er the fate of those I hold most dear","      Tells to my fearful breast a tale of sorrow,","O bright-eyed Hope, my morbidfancy cheer;","      Let me awhile thy sweetest comforts borrow:","            Thy heaven-born radiance around me shed,","            And wave thy silver pinions o'er my head!","","Should e'er unhappy love my bosom pain,","      From cruel parents, or relentless fair;","O let me think it is not quite in vain","      To sigh out sonnets to the midnight air!","            Sweet Hope, ethereal balm upon me shed,","            And wave thy silver pinions o'er my head!","","In the long vista of the years to roll,","      Let me not see our country's honour fade:","O let me see our land retain her soul,","      Her pride, her freedom; and not freedom's shade.","            From thy bright eyes unusual brightness shed---","            Beneath thy pinions canopy my head!","","Let me not see the patriot's high bequest,","      Great Liberty! how great in plain attire!","With the base purple of a court oppress'd,","      Bowing her head, and ready to expire:","            But let me see thee stoop from heaven on wings","            That fill the skies with silver glitterings!","","And as, in sparkling majesty, a star","      Gilds the bright summit of some gloomy cloud;","Brightening the half veil'd face of heaven afar:","      So, when dark thoughts my boding spirit shroud,","            Sweet Hope, celestial influence round me shed,","            Waving thy silver pinions o'er my head!"],"title":"To Hope","author":"John Keats","linecount":48},"meta":{"timestamp":"2026-05-31T05:48:00.486Z","request_id":"abdf4b50-cc21-40d9-a6f7-861c56406297"},"status":"ok","message":"Poem retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/random":{"get":{"operationId":"get_v1_random","tags":["Poetry"],"summary":"A random poem","description":"","parameters":[{"name":"author","in":"query","required":false,"description":"Restrict to an author","schema":{"type":"string"}},{"name":"max_lines","in":"query","required":false,"description":"Only poems up to this many lines","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"id":1448,"lines":["On this thy natal day permit a friend -","A brother - with thy joys his own to blend:","In all gladness he would wish to share","As willing in thy griefs a part to bear.","","Meekly attend the ways of higher heav'n!","Is much deny'd? Yet much my dear is giv'n.","Thy health, thy reason unimpaired remain","And while as new fal'n snows thy spotless fame","The partner of thy life, attentive - kind -","And blending e'en the interests of the mind.","","What bliss is thine when fore thy glistring eye","Thy lovely infant train pass jocund by!","The ruddy cheek, the smiling morning face","Denote a healthy undegenerate race:","In them renew'd, you'll live and live again,","And children's children's children lisp thy name.","Bright be the skies where'er my sister goes","Nor scowling tempests injure her repose -","The field of life with roses thick be strow'd","Nor one sharp thorn lie lurking in the road.","Thy ev'ry path be still a path of peace","And each revolving year thy joys increase;","Till hours and years of time itself be o'er","And one eternal day around thee pour."],"title":"On my Sister Joanna's Entrance into Her 33rd Year","author":"Major Henry Livingston, Jr.","linecount":24},"meta":{"timestamp":"2026-05-31T05:48:00.558Z","request_id":"e7693b87-8a78-4eaa-804d-95186aeb4857"},"status":"ok","message":"Random poem retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/search":{"get":{"operationId":"get_v1_search","tags":["Poetry"],"summary":"Search titles, authors and lines","description":"","parameters":[{"name":"q","in":"query","required":true,"description":"Search term, e.g. love","schema":{"type":"string"},"example":"love"},{"name":"author","in":"query","required":false,"description":"Restrict to an author","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Results per page (1-100, default 20)","schema":{"type":"string"},"example":"20"},{"name":"offset","in":"query","required":false,"description":"Pagination offset","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":20,"limit":20,"query":"love","total":1165,"offset":0,"results":[{"id":3,"title":"I Have A Rendezvous With Death","author":"Alan Seeger","linecount":24},{"id":4,"title":"Ode in Memory of the American Volunteers Fallen for France","author":"Alan Seeger","linecount":104},{"id":5,"title":"Juvenilia, An Ode to Natural Beauty","author":"Alan Seeger","linecount":175},{"id":6,"title":"The Deserted Garden","author":"Alan Seeger","linecount":400},{"id":7,"title":"Paris","author":"Alan Seeger","linecount":174},{"id":8,"title":"Fragments","author":"Alan Seeger","linecount":83},{"id":13,"title":"Autumn.","author":"Alexander Pope","linecount":102},{"id":14,"title":"The Rape of the Lock:","author":"Alexander Pope","linecount":804},{"id":15,"title":"Epitaph. on General Henry Withers, in Westminster Abbey, 1729.","author":"Alexander Pope","linecount":12},{"id":16,"title":"Epitaph. on Two Lovers Struck Dead by Lightning.","author":"Alexander Pope","linecount":24},{"id":17,"title":"Book IV. Ode I. to Venus.","author":"Alexander Pope","linecount":48},{"id":18,"title":"Winter.","author":"Alexander Pope","linecount":100},{"id":20,"title":"Ode on St Cecilia's Day,","author":"Alexander Pope","linecount":134},{"id":21,"title":"An Essay on Criticism.","author":"Alexander Pope","linecount":747},{"id":22,"title":"Epistle to Robert Earl of Oxford and Earl Mortimer.","author":"Alexander Pope","linecount":40},{"id":23,"title":"Two Choruses to the Tragedy of Brutus.","author":"Alexander Pope","linecount":86},{"id":24,"title":"Epistle to Mr Jervas, With Mr Dryden's Translation of Fresnoy's 'art of Painting.'","author":"Alexander Pope","linecount":78},{"id":25,"title":"Epistle to Miss Blount, With the Works of Voiture.","author":"Alexander Pope","linecount":80},{"id":26,"title":"Epistle to Mrs Teresa Blount.  on Her Leaving the Town After the Coronation.","author":"Alexander Pope","linecount":50},{"id":29,"title":"Epitaph. on Dr Francis Atterbury, Bishop of Rochester, Who Died in Exile at Paris, 1732.","author":"Alexander Pope","linecount":12}]},"meta":{"timestamp":"2026-05-31T05:48:00.648Z","request_id":"c375c867-7748-4d1f-97d5-e11a91f504c0"},"status":"ok","message":"Poems listed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Totals & source","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Classic public-domain poems. Use /v1/poem for full text, /v1/author to browse, /v1/random for a random poem.","poems":2526,"fields":["id","title","author","lines","linecount"],"source":"PoetryDB (public-domain classic poetry)","authors":127},"meta":{"timestamp":"2026-05-31T05:48:00.696Z","request_id":"8e1cc91c-170a-4105-91ca-f80415dba4d0"},"status":"ok","message":"Meta retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":450,"monthly_call_quota":65000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1350,"monthly_call_quota":320000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3400,"monthly_call_quota":1500000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/poetry-api"}