Wolne Lektury

Academic API · Works globally · Polish literature · 5,000+ free books

TL;DR

Wolne Lektury (Free Reading) is a Polish non-profit digital library offering over 5,000 free literary works in the public domain. The API provides access to books, poems, and plays by Polish and world authors including Adam Mickiewicz, Henryk Sienkiewicz, Bolesław Prus, Juliusz Słowacki, and translated works from Shakespeare, Dostoevsky, Dickens, and more. Each work includes full text, author info, genres, epochs, themes, and cover images. Multiple formats are available including plain text (TXT), XML, PDF, HTML, and many works have audiobook versions. The API supports searching, filtering by epoch and genre, and browsing by author.

Quick start: https://wolnelektury.pl/api/books/pan-tadeusz/

No API key needed — just make a request!

How to Use This API

1. Get Book Details

https://wolnelektury.pl/api/books/pan-tadeusz/

Returns full metadata for "Pan Tadeusz" by Adam Mickiewicz.

2. List All Books (Paginated)

https://wolnelektury.pl/api/books/?page=1
https://wolnelektury.pl/api/books/?page=2

3. Search Books by Keyword

https://wolnelektury.pl/api/books/?search=miłość
https://wolnelektury.pl/api/books/?search=warszawa

4. Browse by Author

https://wolnelektury.pl/api/authors/adam-mickiewicz/books/
https://wolnelektury.pl/api/authors/henryk-sienkiewicz/books/

5. Filter by Epoch and Genre

https://wolnelektury.pl/api/books/?epoch=romantyzm
https://wolnelektury.pl/api/books/?genre=powieść
https://wolnelektury.pl/api/books/?epoch=pozytywizm&genre=powieść

6. Response Format

{
  "title": "Pan Tadeusz",
  "authors": [{"name": "Adam Mickiewicz", "url": "/api/authors/adam-mickiewicz/"}],
  "epochs": [{"name": "Romantyzm", "url": "/api/epochs/romantyzm/"}],
  "genres": [{"name": "Poemat epicki", "url": "/api/genres/poemat-epicki/"}],
  "kinds": [{"name": "Poezja", "url": "/api/kinds/poezja/"}],
  "cover": "https://.../pan-tadeusz.jpg",
  "fragment": "Litwo! Ojczyzno moja!...",
  "formats": {
    "txt": "https://.../pan-tadeusz.txt",
    "pdf": "https://.../pan-tadeusz.pdf",
    "html": "https://.../pan-tadeusz.html",
    "xml": "https://.../pan-tadeusz.xml"
  }
}

7. JavaScript — Fetch Book Info

fetch('https://wolnelektury.pl/api/books/lalka/')
  .then(r => r.json())
  .then(book => {
    console.log(`Title: ${book.title}`);
    console.log(`Author: ${book.authors[0]?.name}`);
    console.log(`Epoch: ${book.epochs?.map(e => e.name).join(', ')}`);
    console.log(`Genres: ${book.genres?.map(g => g.name).join(', ')}`);
    console.log(`Formats: ${Object.keys(book.formats).join(', ')}`);
  });

8. Python — Search and List Books

import requests

resp = requests.get(
    'https://wolnelektury.pl/api/books/',
    params={'search': 'miłość', 'page': 1}
)
books = resp.json()
print(f"Found {len(books)} books:")
for book in books:
    author = book['authors'][0]['name'] if book['authors'] else 'Unknown'
    print(f"  \u2022 {book['title']} — {author}")

9. Python — Download Book as Text

import requests

# Get book metadata
resp = requests.get('https://wolnelektury.pl/api/books/lalka/')
book = resp.json()

# Download plain text format
txt_url = book['formats']['txt']
resp = requests.get(txt_url)
text_content = resp.text

print(f"Downloaded {book['title']} ({len(text_content)} chars)")
# Save to file
with open('lalka.txt', 'w', encoding='utf-8') as f:
    f.write(text_content)

10. Python — List All Epochs

import requests

resp = requests.get('https://wolnelektury.pl/api/epochs/')
for epoch in resp.json():
    print(f"{epoch['name']} ({epoch.get('start_year', '?')} – {epoch.get('end_year', '?')})")
Try it: https://wolnelektury.pl/api/books/pan-tadeusz/

Frequently Asked Questions

What file formats are available for each book?
Each book is available in TXT, XML (with TEI markup), PDF, and HTML formats. Many popular works also have audiobook versions. Check the formats field in the book object for available download URLs.
What metadata is included for each work?
Title, author(s), translators, epochs (literary period), genres, kinds (poetry, prose, drama), themes, description, cover image URL, a text fragment/sample, and download links for all available formats.
Is the API available in English or only Polish?
The API responses use Polish terminology (epochs like "Romantyzm", genres like "powieść", kinds like "poezja"). However, author names and book titles are internationally recognizable, and the API structure is well-documented.
How is the collection organized and categorized?
Books are categorized by epoch (Romantyzm, Pozytywizm, Młoda Polska, Dwudziestolecie międzywojenne), genre (powieść, nowela, dramat, poemat, liryka), kind (poezja, proza, dramat), and theme (miłość, śmierć, wojna, natura, Bóg). You can filter by all these dimensions.
Can I get the full text of a book through the API?
Yes! The formats object in each book response contains URLs for downloading the full text. The TXT format is simplest for text analysis, while XML contains structural markup (chapters, paragraphs).
Are new books added regularly?
Yes, Wolne Lektury continues to add new public domain works. The collection grows regularly as new works enter the public domain and as volunteers contribute transcriptions.

What You Can Build