Skip to content

Repository files navigation

🛒 wallapop-cli

Unofficial CLI tool for searching and browsing Wallapop listings from your terminal.

License: MIT Node.js TypeScript

⚠️ Disclaimer

This project is not affiliated with, endorsed by, or associated with Wallapop in any way. It uses Wallapop's public-facing API endpoints for educational and personal use. The API may change without notice, which could break functionality. Use at your own risk.

✨ Features

  • 🔍 Search listings with keyword, price, and location filters
  • 📦 View item details — full description, images, seller info
  • 👤 Look up user profiles — ratings, type, location
  • 📂 Browse categories — list all available categories
  • 🎨 Pretty terminal output with colors and tables
  • 📋 JSON mode for scripting and piping

📦 Installation

# Clone and install
git clone https://github.com/your-username/wallapop-cli.git
cd wallapop-cli
npm install
npm run build

# Link globally (optional)
npm link

Or install directly:

npm install -g wallapop-cli

🚀 Usage

Search listings

wallapop search "iphone 15"
wallapop search "bicicleta" --min-price 50 --max-price 300
wallapop search "ps5" --lat 41.3879 --lng 2.1699  # Barcelona
wallapop search "nike" --category 12465 --limit 10

Get item details

wallapop item abc123

View user profile

wallapop user user123

List categories

wallapop categories

JSON output (for scripting)

wallapop --json search "laptop" | jq '.results[0].price'
wallapop --json item abc123 > item.json

⚙️ Configuration

Default Location

By default, searches use Madrid (40.4168, -3.7038). Override with:

# Via flags
wallapop search "sofa" --lat 41.3879 --lng 2.1699

# Via environment variables
export WALLAPOP_LAT=41.3879
export WALLAPOP_LNG=2.1699
wallapop search "sofa"

Optional Access Token

Search now uses /api/v3/search and works without authentication. If you have a token, you can still set it for other endpoints:

export WALLAPOP_ACCESS_TOKEN="<token>"

🏗️ Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Type check
npm run lint

# Run directly
node dist/index.js search "test"

📂 Project Structure

wallapop-cli/
├── src/
│   ├── index.ts              # CLI entry point
│   ├── client.ts             # Wallapop API client
│   ├── types.ts              # TypeScript interfaces
│   ├── utils.ts              # Formatting & helpers
│   └── commands/
│       ├── search.ts         # Search command
│       ├── item.ts           # Item detail command
│       ├── user.ts           # User profile command
│       └── categories.ts    # Categories command
├── API_REFERENCE.md          # Reverse-engineered API docs
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── LICENSE

🔌 API Endpoints Used

Endpoint Purpose
GET /api/v3/search Search listings
GET /api/v3/items/{id} Item details
GET /api/v3/users/{id} User profile
GET /api/v3/categories Category list

See API_REFERENCE.md for full documentation.

📝 License

MIT © Wallapop CLI Contributors

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md before submitting a PR.

About

Unofficial Wallapop CLI for searching listings, item details, users, and categories.

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages