Baseball Cards Search (eBay Sold Listings)
Search eBay completed (sold) listings for baseball cards by player name. Simple, fast UI: a single centered search box and a “Search Sold” button. Results show image, title, sold price, and end time, with a click-through to the listing on eBay.
Features
- Player name search against eBay “Completed (Sold)” items
- Clean centered UI (input + button)
- Results grid with image, title, price, end time
- Click any result to open the eBay listing
Tech Stack
- Backend: Node.js + Express
- Frontend: Vanilla HTML/CSS/JS (served statically)
- External API: eBay Finding API (
findCompletedItems)
Prerequisites
- Node.js 18+ recommended
- eBay App ID (aka Client ID) from the eBay Developers Program (Production keys)
Setup
- Install dependencies:
npm install - Configure environment:
- Copy
.env.exampleto.envand set your App IDcp .env.example .env # then edit .env EBAY_APP_ID=YOUR_EBAY_APP_ID_HERE
- Copy
Run
- Start the server:
npm start - Open the app:
Usage
- Enter a player name (e.g., “Derek Jeter”) in the search box
- Click “Search Sold” (or press Enter)
- Browse results; click a card to open the listing on eBay
API
GET /api/ebay/search?player=...&page=...- Query params:
player(required): player name textpage(optional): page number (default: 1)
- Response shape:
{ "results": [ { "title": "...", "url": "https://www.ebay.com/itm/...", "image": "https://...", "price": "99.99", "currency": "USD", "ended": "2024-01-01T12:34:56.000Z" } ] }
- Query params:
Project Structure
public/
index.html # UI
styles.css # styles (centered layout)
app.js # client logic
server.js # express server + eBay route
.env.example # environment template (copy to .env)
package.json
Notes
- Ensure
EBAY_APP_IDis set; otherwise/api/ebay/searchreturns 500. - This app only surfaces limited listing metadata from eBay’s Finding API; you can expand it (conditions, set names, years, etc.) by refining keywords or adding item filters.
- For production usage, consider rate limiting, caching, and stricter keyword sanitization.
Description
Languages
JavaScript
60.9%
CSS
25.7%
HTML
13.4%