Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessWeaponized Intelligence - Palo Alto NetworksGNews AI cybersecurityEmerald AI Raises $25 Million to Align Data Center Energy Use with Grid Capacity - ESG TodayGNews AI energyHugging Face TRL v1.0 Turns LLM Fine-Tuning From Art Into Engineering - startupfortune.comGNews AI fine-tuningFirst-Time Payees, Payouts, and Why Clean Transactions Still Turn Into Fraud LossesDEV CommunityHandling Extreme Class Imbalance in Fraud DetectionDEV CommunityZhipu Stock Rockets 35% as Revenue Doubles in Debut Earnings - The Tech BuzzGNews AI AlibabaAntropic's Claude Code leaked and Axios NPM InflitrationDEV CommunityCSU students widely use AI tools, but mistrust results and fear job impact - EdSourceGNews AI educationCalifornia middle schools are ground zero for testing AI in classrooms - EdSourceGNews AI educationReal-Time Fraud Scoring Latency: What 47ms Actually MeansDEV CommunityPause, Save, Resume: The Definitive Guide to StashingDEV CommunitySouth Korean trade data: chip shipments hit a record-high value of $32.83B in March 2026, up 151.4% YoY, pushing total exports to a record $86.13B, up 48.3% YoY (Steven Borowiec/Nikkei Asia)TechmemeBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessWeaponized Intelligence - Palo Alto NetworksGNews AI cybersecurityEmerald AI Raises $25 Million to Align Data Center Energy Use with Grid Capacity - ESG TodayGNews AI energyHugging Face TRL v1.0 Turns LLM Fine-Tuning From Art Into Engineering - startupfortune.comGNews AI fine-tuningFirst-Time Payees, Payouts, and Why Clean Transactions Still Turn Into Fraud LossesDEV CommunityHandling Extreme Class Imbalance in Fraud DetectionDEV CommunityZhipu Stock Rockets 35% as Revenue Doubles in Debut Earnings - The Tech BuzzGNews AI AlibabaAntropic's Claude Code leaked and Axios NPM InflitrationDEV CommunityCSU students widely use AI tools, but mistrust results and fear job impact - EdSourceGNews AI educationCalifornia middle schools are ground zero for testing AI in classrooms - EdSourceGNews AI educationReal-Time Fraud Scoring Latency: What 47ms Actually MeansDEV CommunityPause, Save, Resume: The Definitive Guide to StashingDEV CommunitySouth Korean trade data: chip shipments hit a record-high value of $32.83B in March 2026, up 151.4% YoY, pushing total exports to a record $86.13B, up 48.3% YoY (Steven Borowiec/Nikkei Asia)Techmeme

Build a Price Comparison Tool in 15 Minutes with the Marketplace Price API

DEV Communityby lulzasaurApril 1, 20267 min read0 views
Source Quiz

<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 -y

Enter 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 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.

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by AI News Hub · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

availableproductmarket

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Build a Pri…availableproductmarketanalysistrendinterfaceDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 94 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Products