The Problem
You want to buy a book in Turkey. You check Kitapyurdu. Then Amazon. Then Trendyol. Then Hepsiburada. Then maybe nadirkitap for used copies. By the time you've compared all the prices (including cargo fees!), you've lost 30 minutes of your life.
The Solution
trbooksearch search "Suç ve Ceza"
trbooksearch searches all major Turkish bookstores simultaneously and presents the results in a beautiful, interactive terminal interface — sorted by total price, including shipping costs.
┌─────────────────────────────────────────────────────────────────────────────┐
│ Top 3 En Ucuz / Top 3 Cheapest │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. nadirkitap.com Suc ve Ceza - Dostoyevski 45.00 TL (Ikinci El) │
│ 2. kitapyurdu.com Suc ve Ceza - F. Dostoyevski 89.00 TL (Yeni) │
│ 3. trendyol.com Suc ve Ceza 92.50 TL (Yeni) │
└─────────────────────────────────────────────────────────────────────────────┘
Features
- Multi-Site Search — Query 8+ Turkish bookstores in parallel
- Price Comparison — See book price + cargo fee + total price at a glance
- Used & New Books — Separate sections for "Ikinci El" and "Yeni" kitaplar
- Interactive TUI — Filter, sort, and scroll through results with keyboard shortcuts
- ISBN Search — Search by ISBN for exact matches
- Clickable Links — Open book pages directly from your terminal (OSC 8 supported)
- Loyalty Pricing — See Amazon Prime, Hepsiburada Premium, and Trendyol Elite discounts
- Stealth Mode — Anti-bot detection measures built-in
- Cloud Scraping — Optional Firecrawl API support for additional sites
Installation
From Source
# Clone the repository
git clone https://github.com/lynicis/trbooksearch.git
cd trbooksearch
# Build
go build -o trbooksearch .
# Move to PATH (optional)
sudo mv trbooksearch /usr/local/bin/
Using Go Install
go install github.com/lynicis/trbooksearch@latest
Pre-built Binaries
Download the latest release for your platform from the Releases page.
Prerequisites
- Chrome/Chromium must be installed for headless browser scraping
- Alternatively, use
--firecrawl flag with API configuration (no browser needed)
Usage
Basic Search
# Search by book title
trbooksearch search "1984"
# Search by ISBN
trbooksearch search --isbn 9789750726439
Advanced Options
# Limit results per site (default: 10)
trbooksearch search --limit 5 "Simyaci"
# Search only specific sites
trbooksearch search --sites "kitapyurdu.com,nadirkitap.com" "Dune"
# Exclude specific sites
trbooksearch search --exclude "amazon.com.tr" "Harry Potter"
# Flat view (no grouping by Used/New)
trbooksearch search --flat "Sapiens"
# Use Firecrawl API (enables additional sites)
trbooksearch search --firecrawl "Otostopcularin Galaksi Rehberi"
Keyboard Shortcuts
| Key |
Action |
↑ ↓ |
Scroll through results |
/ |
Filter results |
1-7 |
Filter by specific column |
s |
Cycle sort column |
S |
Toggle sort direction |
Enter |
Open book URL (if terminal supports OSC 8) |
q |
Quit |
Supported Sites
New Books (Yeni Kitaplar)
Used Books (Ikinci El Kitaplar)
| Site |
Method |
Notes |
| nadirkitap.com |
Browser / Firecrawl |
Turkey's largest used book marketplace |
| letgo.com |
Firecrawl only |
Second-hand marketplace |
| dolap.com |
Firecrawl only |
Second-hand marketplace |
| gardrops.com |
Firecrawl only |
Second-hand marketplace |
Configuration
Config File Location
~/.config/trbooksearch/config.yaml
Firecrawl API Setup
To use the --firecrawl flag and access additional sites, you need a Firecrawl API key.
Quick Setup:
trbooksearch set-api-key fc-your-api-key-here
Or interactively:
trbooksearch set-api-key
# Prompts: Firecrawl API anahtarı: _
Manual Setup:
You can also create the config file manually:
# ~/.config/trbooksearch/config.yaml (Linux)
# ~/Library/Application Support/trbooksearch/config.yaml (macOS)
firecrawl:
api_key: "fc-your-api-key-here"
api_url: "https://api.firecrawl.dev" # optional, this is the default
How It Works
┌─────────────────┐
│ trbooksearch │
│ search │
└────────┬────────┘
│
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ kitapyurdu│ │ amazon │ │ nadirkitap│ ...
└─────┬────┘ └─────┬────┘ └─────┬────┘
│ │ │
└──────────────┼──────────────┘
│
▼
┌─────────────────────┐
│ Price Aggregation │
│ + Cargo Fees │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Interactive TUI │
│ (Bubble Tea) │
└─────────────────────┘
- Parallel Dispatch — All scrapers launch concurrently with staggered timing
- Stealth Scraping — Random user agents and anti-detection measures
- Price Normalization — Extracts book price, cargo fee, and calculates total
- Real-time Updates — TUI shows progress as each site completes
- Smart Sorting — Results grouped by condition, sorted by total price
Tech Stack
Terminal Compatibility
For the best experience with clickable links, use a terminal that supports OSC 8 hyperlinks:
| Terminal |
OSC 8 Support |
| iTerm2 |
Yes |
| Ghostty |
Yes |
| Windows Terminal |
Yes |
| GNOME Terminal |
Yes |
| Alacritty |
Yes |
| Kitty |
Yes |
| macOS Terminal.app |
No |
Roadmap
- Price history tracking
- Notification alerts for price drops
- Book cover image preview in TUI
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Emre Sirmali
Acknowledgments
- Bubble Tea for the beautiful TUI framework
- Rod for reliable browser automation
- Firecrawl for cloud scraping capabilities
Made with ☕ in Turkiye
If this project saved you time, consider giving it a star!