Book Finder
Find and download books as PDF or EPUB files.
When to Use
- User asks to "download [book]", "find [book]", "get me [book]"
- User shares a book title and wants the file
How It Works
Step 1 — Search for the book
Use web search to find PDF links across these sources (in priority order):
- Libgen — scrape search results from
libgen.lifor MD5 hashes, then try download vialibgen.li/ads.php?md5=HASH-> parse theget.phplink from the page. If libgen.li times out, try libgen.rs and libgen.is. - Anna's Archive — from libgen results, try
https://en.annas-archive.gl/md5/HASHor search directly onannas-archive.org - University servers — search
"book title" author site:edu filetype:pdf - Research libraries — search
"book title" author filetype:pdf(iuc.hr, fit.edu, mit.edu, stanford.edu, etc.) - Archive.org — search
"book title" author site:archive.org - Bookey CDN — try
https://cdn.bookey.app/files/pdf/book/en/[slug].pdf(slug = title lowercase, spaces to hyphens) - General PDF search — search
"book title" author PDF download
Libgen scraping method
# Step 1: Search libgen
curl -s -L --max-time 20 -H "User-Agent: Mozilla/5.0" "https://libgen.li/index.php?req=QUERY&columns%5B%5D=t&columns%5B%5D=a&objects%5B%5D=f&topics%5B%5D=l&res=25&gmode=on&filesuns=all" | grep -oiP 'ads\.php\?md5=[a-f0-9]+' | head -5
# Step 2: Get download link from ads page
curl -s -L --max-time 20 -H "User-Agent: Mozilla/5.0" "https://libgen.li/ads.php?md5=HASH" | grep -oiP 'get\.php\?md5=[^"]+' | head -1
# Step 3: Download
curl -s -L --max-time 30 -H "User-Agent: Mozilla/5.0" -H "Referer: https://libgen.li/" -o /tmp/book.pdf "https://libgen.li/get.php?md5=HASH&key=KEY"
Note: libgen mirrors are often blocked or return 503. If all libgen/anna's archive attempts fail, fall through to university servers and other sources.
Step 2 — Download and verify
Once you find a URL:
curl -s -L --max-time 30 -H "User-Agent: Mozilla/5.0" -o /tmp/book-name.pdf "URL" -w "\n%{http_code} %{size_download}"
Then verify it's a real file:
head -c 5 /tmp/book-name.pdf
%PDF-= valid PDFPK= valid EPUB/ZIP- Anything else = HTML page or garbage, try another URL
Minimum file size: 50KB (anything smaller is likely an error page)
Step 3 — Deliver to user
Send the verified file back to the user (attach it, save it to their working folder, or reply with it via whatever channel the request came in on).
Tips
- Older books (pre-2015): Usually findable on .edu servers, archive.org, or open repositories
- Recent books (last 1-2 years): Much harder. Check bookey CDN, then tell user it's too new
- Textbooks: Often on university course pages — search
"book title" syllabus filetype:pdf - Bookey CDN pattern:
cdn.bookey.app/files/pdf/book/en/[title-slug].pdf— slug is the title in lowercase with hyphens. Works for many popular books - If all sources fail: Tell user the book is too new or too niche, give purchase links instead
Common failure modes
- URL returns HTML instead of PDF -> check
head -c 5output - File too small (<50KB) -> it's an error/redirect page
- 403/timeout -> try a different source
- Book too new -> no free copies exist yet, give Amazon/Kindle link
What this skill does NOT do
- Generate or create books
- Bypass paywalls on publisher sites