If you're building a two-sided marketplace, your results page has two jobs.
The first is showing buyers listings they actually want. The second is making money, usually by letting sellers pay to get seen.
Most teams treat these as two separate problems. One system ranks listings, another serves promoted listings, and somewhere in the middle there's a pile of code that merges the two. I've seen this setup at a lot of teams, and it's one of the main reasons we started Gortex.
In this post I'll cover why marketplace ranking is harder than it looks, what a good ranking API for a marketplace should do, and how we approached it.
Why ranking a marketplace is harder than ranking a store
A normal online store has one side. You rank products, people buy them, done.
A marketplace has buyers on one side and sellers on the other, and your ranking has to work for both. That creates a few problems that show up early.
1. The popularity loop. If you rank by past clicks or sales, popular listings get more visibility, which gets them more clicks, which makes them more popular. New sellers never get a fair shot, and eventually they leave.
2. One feed for everyone. "Sort by most popular" shows every buyer the same list. Two people with completely different needs see identical results.
3. Ads vs. trust. Sellers want promoted listings, and that's real revenue. But every time a buyer sees a paid listing that doesn't fit what they searched for, they trust your results a little less.
4. Two systems, one page. Ranking and ads usually live in separate services. That means more network calls, more latency, and merge logic someone has to own.
What the merge code usually looks like
Here's a simplified version of what I mean. Rank organic results, fetch ads, then interleave them:
const organic = await rankingService.rank(userId, candidates);
const ads = await adService.getSponsored(userId, { slots: 3 });
// Put an ad every 4th position, whether it fits or not
const results = [];
let adIndex = 0;
organic.forEach((item, i) => {
if (i > 0 && i % 4 === 0 && adIndex < ads.length) {
results.push({ ...ads[adIndex++], sponsored: true });
}
results.push(item);
});
It works. But look at what's missing:
- The ad in slot 4 has no idea what organic listing it's replacing.
- A weak ad can push down a much better organic result.
- You've made two calls, so you're paying latency twice.
- When a seller asks "why am I ranked here?", the answer is spread across two systems.
What to look for in a marketplace ranking API
If you're evaluating a ranking API for a marketplace, here's the checklist I'd use:
- Per-user ranking. Results should be ordered for the person looking at them, not one global list.
- Sponsored listings in the same decision. Ads should be weighed against organic results, not bolted on afterwards.
- Paid listings only where they fit. A slot should go to a paid listing only when it makes sense to show it there.
- Low latency. Ranking sits in the critical path of every page load. It can't be the slow part.
- Explainability. You need to trace why any item landed where it did, for debugging and for seller support.
- Developer-friendly setup. You should be able to try it with an API call, not a six-month integration project.
How Gortex approaches it
Gortex does ranking and sponsored placement in one API call.
You send the user, the surface (your search results page or home feed), and the candidate listings. You get back the listings ranked for that user, with your sponsored slots already filled.
Here's a simplified example of the shape of a request:
curl -X POST https://api.gortex.ai/v1/decide \
-H "Authorization: Bearer $GORTEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipient": { "id": "user_123" },
"surface": "search_results",
"candidates": [
{ "id": "listing_1" },
{ "id": "listing_2" },
{ "id": "listing_3", "sponsored": true }
]
}'
And the response gives you one ordered list, with paid listings already placed:
{
"decision_id": "dec_abc123",
"trace_id": "trc_xyz789",
"results": [
{ "id": "listing_2", "position": 1 },
{ "id": "listing_3", "position": 2, "sponsored": true },
{ "id": "listing_1", "position": 3 }
]
}
A few things that matter for marketplaces:
Sponsored slots are priced against the organic order. A paid listing only takes a slot when the placement fits. So you can grow ad revenue without turning your results page into a wall of ads.
Every buyer gets their own order. Two people browsing the same category can see different results based on what's relevant to them.
It's fast. Responses come back in under 200ms at p99, so ranking never becomes the bottleneck on your page.
Every decision is traceable. Each response includes a decision ID and a trace ID. When a seller asks why they're ranked on page 3, your team can look it up and give a real answer.
When you don't need a ranking API yet
Being honest here: if you have a few hundred listings and no plans to sell promoted placements, "sort by newest" plus a couple of filters is probably fine for now.
A ranking API starts paying off when:
- Your catalog is big enough that buyers can't scroll through everything
- You're seeing the same few sellers dominate results
- You want to launch promoted listings without hurting relevance
- Your team is spending real time tuning ranking weights by hand
Try it
Gortex is in invite-only private beta. We built it for engineering and product teams at marketplaces, social apps, creator apps, dating apps, and job boards.
- Learn more: Marketplace Ranking API
- Email me directly at h@gortex.ai. I'm happy to look at your ranking setup and share what I'd do.
How are you ranking listings in your marketplace today? I'd love to hear about it in the comments.
Top comments (0)