Build a Price Comparison Tool in 15 Minutes with the Marketplace Price API
<p>Ever tried to find the best price for something across multiple marketplaces? You'd need to open OfferUp, Poshmark, Reverb, TCGPlayer — each with different search interfaces and no way to compare side by side.</p> <p>The <strong>Marketplace Price API</strong> solves this with a single unified <code>/search</code> endpoint that queries multiple marketplaces simultaneously and returns normalized results.</p> <p>In this tutorial, we'll build a CLI price comparison tool in under 15 minutes.</p> <h2> What We're Building </h2> <p>A Node.js script that:</p> <ol> <li>Takes a search query as input</li> <li>Searches across 4 marketplaces in parallel</li> <li>Shows a sorted comparison table with the best prices</li> </ol> <h2> Prerequisites </h2> <ul> <li>Node.js 18+</li> <li>A free RapidAPI accou
Ever tried to find the best price for something across multiple marketplaces? You'd need to open OfferUp, Poshmark, Reverb, TCGPlayer — each with different search interfaces and no way to compare side by side.
The Marketplace Price API solves this with a single unified /search endpoint that queries multiple marketplaces simultaneously and returns normalized results.
In this tutorial, we'll build a CLI price comparison tool in under 15 minutes.
What We're Building
A Node.js script that:
-
Takes a search query as input
-
Searches across 4 marketplaces in parallel
-
Shows a sorted comparison table with the best prices
Prerequisites
-
Node.js 18+
-
A free RapidAPI account (sign up here)
Step 1: Get Your API Key
Subscribe to the Marketplace Price Tracker API on RapidAPI. The free tier gives you 500 requests/month — plenty for this tutorial.
Copy your X-RapidAPI-Key from the API dashboard.
Step 2: Set Up the Project
mkdir price-compare && cd price-compare npm init -ymkdir price-compare && cd price-compare npm init -yEnter fullscreen mode
Exit fullscreen mode
Create a .env file:
RAPIDAPI_KEY=your_key_here
Enter fullscreen mode
Exit fullscreen mode
Step 3: Build the Comparison Tool
Create compare.mjs:
const API_KEY = process.env.RAPIDAPI_KEY; const BASE = "https://marketplace-price-tracker.p.rapidapi.com"; const HEADERS = { "X-RapidAPI-Key": API_KEY, "X-RapidAPI-Host": "marketplace-price-tracker.p.rapidapi.com", };const API_KEY = process.env.RAPIDAPI_KEY; const BASE = "https://marketplace-price-tracker.p.rapidapi.com"; const HEADERS = { "X-RapidAPI-Key": API_KEY, "X-RapidAPI-Host": "marketplace-price-tracker.p.rapidapi.com", };const query = process.argv[2]; if (!query) { console.error("Usage: node compare.mjs "); process.exit(1); }
console.log(\nSearching for "${query}" across 4 marketplaces...\n);
// Search all marketplaces in parallel
const endpoints = [
{ name: "Reverb", path: /reverb/search?query=${encodeURIComponent(query)}&limit=5 },
{ name: "TCGPlayer", path: /tcg/search?query=${encodeURIComponent(query)}&limit=5 },
{ name: "OfferUp", path: /offerup/search?query=${encodeURIComponent(query)}&limit=5 },
{ name: "Poshmark", path: /poshmark/search?query=${encodeURIComponent(query)}&limit=5 },
];
const results = await Promise.allSettled(
endpoints.map(async ({ name, path }) => {
const res = await fetch(${BASE}${path}, { headers: HEADERS });
if (!res.ok) return { name, items: [] };
const data = await res.json();
const items = (data.results || data.listings || []).map((item) => ({
marketplace: name,
title: item.title || item.productName || item.name,
price: parseFloat(item.price || item.marketPrice || item.lowestPrice || 0),
condition: item.condition || "N/A",
url: item.url || "#",
}));
return { name, items };
})
);
// Flatten and sort by price const allItems = results .filter((r) => r.status === "fulfilled") .flatMap((r) => r.value.items) .filter((item) => item.price > 0) .sort((a, b) => a.price - b.price);
if (allItems.length === 0) { console.log("No results found. Try a different search term."); process.exit(0); }
// Display results console.log("Price".padEnd(10) + "Marketplace".padEnd(14) + "Condition".padEnd(12) + "Title"); console.log("-".repeat(80));
for (const item of allItems.slice(0, 20)) {
const price = $${item.price.toFixed(2)}.padEnd(10);
const mp = item.marketplace.padEnd(14);
const cond = (item.condition || "N/A").slice(0, 10).padEnd(12);
const title = item.title?.slice(0, 44) || "—";
console.log(${price}${mp}${cond}${title});
}
console.log(\nFound ${allItems.length} results across ${results.filter((r) => r.status === "fulfilled").length} marketplaces);`
Enter fullscreen mode
Exit fullscreen mode
Step 4: Run It
RAPIDAPI_KEY=your_key_here node compare.mjs "fender stratocaster"
Enter fullscreen mode
Exit fullscreen mode
Output:
Searching for "fender stratocaster" across 4 marketplaces...
Price Marketplace Condition Title
$149.99 OfferUp Good Fender Squier Stratocaster Electric Gui $225.00 Poshmark N/A Fender Player Stratocaster HSS Buttercr $349.00 Reverb Excellent Fender Player Stratocaster 2019 3-Color $425.00 Reverb Very Good Fender American Stratocaster Sunburst $599.99 Reverb Excellent Fender American Pro II Stratocaster ...
Found 18 results across 4 marketplaces`
Enter fullscreen mode
Exit fullscreen mode
Available Endpoints
Endpoint Description
GET /reverb/search
Reverb music gear listings
GET /reverb/price-history
Historical price data for Reverb items
GET /tcg/search
TCGPlayer card listings
GET /tcg/price
TCGPlayer card price lookup
GET /offerup/search
OfferUp local marketplace listings
GET /poshmark/search
Poshmark fashion resale listings
Use Cases
-
Resellers: Find arbitrage opportunities across marketplaces
-
Collectors: Track TCG card prices, find the best deals on vintage gear
-
Shoppers: Compare prices before buying
-
Discord Bots: Power price-check commands with real-time data
-
Price Tracking Apps: Build dashboards with historical pricing
What's Next?
-
Add a simple web UI with React or Svelte
-
Store historical prices in SQLite for trend analysis
-
Set up a cron job to check prices daily
-
Build a Discord bot with /price-check commands
The Marketplace Price Tracker API free tier includes 500 requests/month — enough to build and test any of these.
DEV Community
https://dev.to/lulzasaur/build-a-price-comparison-tool-in-15-minutes-with-the-marketplace-price-api-149kSign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
availableproductmarketEthical AI and Data Privacy (AI TRiSM) Market: The Shield for the Autonomous Enterprise - openPR.com
<a href="https://news.google.com/rss/articles/CBMimgFBVV95cUxOWk94WVFMbXI5Q2RZRkJ1MzVqTmxxS2JlZFRKYkxWUVVBQW05aXFFdVRjY1JUV2dHWWZpbURwS1ZxUXVZTmNZaHk3QTh5UTlYSTZVdGtjS3RSWlI3XzRGdkQ4NC1KZUItaVBTQVlvN3pKU3UtY2piSFZRNlZ6ZlVnWjFrbWhpeFc5NVNqUVhRMnNMeGtyUk95NTNB?oc=5" target="_blank">Ethical AI and Data Privacy (AI TRiSM) Market: The Shield for the Autonomous Enterprise</a> <font color="#6f6f6f">openPR.com</font>
Seekr Technologies Tapped as AI Partner for EU Mid-Market Compliance Use Cases - TipRanks
<a href="https://news.google.com/rss/articles/CBMixAFBVV95cUxNTFBvT0pnS2FtcUMxNllpc2lFX1hjRGJSUW9ucnM3cUhvQllCSkhzVXBlZ2VWUm9VTTdERVplaWUxR1RGQ1BHaExESFFGdi14dklCeW1wLU9MZ0VoRTlYZW9BaXhfbnFFNUh2REhzdUVEWTM2R0lXRkk1Rm9QS1JKODhzYWFEaTcya3hOSV96akxmWURiT1R3cWo2bTZXV3NIRVdwbEpab3RDNG9jNU9iYk91bWlham4zLU1nS1p1S09tMXNm?oc=5" target="_blank">Seekr Technologies Tapped as AI Partner for EU Mid-Market Compliance Use Cases</a> <font color="#6f6f6f">TipRanks</font>
Eli Lilly, InSilico Strike AI Drug Discovery Deal - WSJ
<ol><li><a href="https://news.google.com/rss/articles/CBMimwNBVV95cUxOXzNEMmxoWTZ3UUFGNHdwNHFPS1hqT0xvTGMwcWFPaGdwcmVmLS0xemU1ZGl3YWUzZXlXQVBRUi1lN0pNa2hyVXh1ZHliVHVxVXotVW1Ua1BtMTRIZGFPeDduVExnWG1ub19QMW5XbEpRQlY4czF0R3pheW50U05pc2RJUmJHRFZFLUprSWhQeEpYbUozTS1rMFF3R1VBRmFCQVJ0RFJRZm5HQnhqeXZYSUNqcjU4aHh6WXJvcGFpcDVnYXJQZkpSWjc1Vm1TN0dqaTlpRnlrX19wTXNPLW5LTGZza2tIRlNHMW51dmkzYVBxZzhkc1hiWUdFUkVNdWFINnEtaC10UWE4bVBqcU5TMXRFOWJtUTIyQVhKcnBkdnk5cjZtX21hMURMcFBQdWR0VXJ4NlJzeHZGbkNVcE16cmNKb2xvVVIxQVgzcWxXcGlVWUg4cDFqUnRsYVlDeGVJOFh4QU9PbDVkbzladnAzdEIzZl9QOHBINFhmQ3NXS1FqT1ptNzExd1YyVzVOak9qbVZfLVJNdzRyem8?oc=5" target="_blank">Eli Lilly, InSilico Strike AI Drug Discovery Deal</a> <font color="#6f6f6f">WSJ</font></li><li><a href="https://news.google.com/rss/articles/CBMipwFBVV95cUxOVWhMUDZXUGw
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Products
The Unstoppable Rise of Generative AI in Financial Services - FinTech Magazine
<a href="https://news.google.com/rss/articles/CBMilwFBVV95cUxOeDlZWXB6LUE4ZzZUaUo3ZVdTeHB6ZFQ2M05YZXBHQ3RvQ2pXSDRoWm1JZm9ORnBQODFvNVlYOHN6bXd1UjJlaGZqWDItdFEzbEtQWDEyVm1MeDZ1elpieEJBWTJ1T1NKbDdrV0o5dUlqX182cDZiZTNnUXBhSmhVWG42RVZMS05yTHhmWDJuWENtdUYtVFZv?oc=5" target="_blank">The Unstoppable Rise of Generative AI in Financial Services</a> <font color="#6f6f6f">FinTech Magazine</font>
Starling: How Can AI Assistants Help UK Financial Literacy? - FinTech Magazine
<a href="https://news.google.com/rss/articles/CBMilAFBVV95cUxQVUxBejAxMzlaNFdOOS1MZjNSTWY1ZDR5WHFoeEpyMHRxcTJnTi1yQ3pVX0l0UEZMU19PUWdBUGI0dVNzVXI4OEM4dDJmc2ZEU1RTRXh0RHpudktJTm5kdkFLMXRGbUdZTDBrSnBCR0VvRWppN0RTcjJzMEFfYXYxS296RDhhbEhwemFOM0M1RTQ1OU9S?oc=5" target="_blank">Starling: How Can AI Assistants Help UK Financial Literacy?</a> <font color="#6f6f6f">FinTech Magazine</font>
Air France returns to London Gatwick with Paris service - Travel Wires
<a href="https://news.google.com/rss/articles/CBMiiwFBVV95cUxQcDlQckdZM0pZNktQUld0bEowdzhRbHhyZzNpR25ReWRoRV9ZSUlIUEhfRC1TM3Q3SjQyU2hkQkdsZDNDMlBrNWdhamtFbUQyZmRUSXMzWDd5dmRWT29INGJ2VW9yVlA2RHpFbWVLNVhGZ1RDRXl1T0c3dGlZZF9RQ01VVTRJWG5RUlNN?oc=5" target="_blank">Air France returns to London Gatwick with Paris service</a> <font color="#6f6f6f">Travel Wires</font>
Microsoft Seeks More Coherence in AI Efforts With Copilot Reorganization - WSJ
<a href="https://news.google.com/rss/articles/CBMiswNBVV95cUxNOS15LUxLMDcwOFFsTXgwUENMd1daVHMzZzRxZlYwTXRocFQ5UC1waGZvZHR0WmJkQnI2c3VXNlZkMnJyRnlSenJ1Vk1yMTRaUFUtRFNvbEtiUm13bE1MTGVtR0JRTW1iVTdRUlYzdW9scXZjUDZoVk9lcVBQV0s3U3hhVVZ4TzVUNy1mQ3BGbG9sclRuVVhLTFd2WE9GTTdXVDE3SXg0Y0dOYUFjV0Q4TUpPREp6OWFfZnc3OFNYVlNFZjhJeThuMXZUankyZXc2SlVtTFZUNTJkTEtvbVh6NTlDbnpiS3JXRkpyWWh5bE5RTEhNbDEzVE5LTE5rakFPRl9XNFJUQmdSTlhfZ1A0UmZVNXY1RDV4Mk1kWExRVkdadHBuYzNXdnhGQzdtckVhM2xRQ3JZNXJFVVRlbUhlTUdWTHJka1RFMUZKQTY2aDNfSFRjYU54QlF0T0dmdzhLRXpLQVlHRFh0TkZEdE85YkZ3eC1saFdJdndvSnZXZFZQc3Z3azdTVEJtREs4QlI4WTR5UGlJWGRZQ056SkFWWEZ1X1FJRGp4Y0ZiMFNPOHZTNEE?oc=5" target="_blank">Microsoft Seeks More Coherence in AI Efforts With Copilot Reorganization</a> <font color="#6f6f6f">WSJ</font>
Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!