```yaml
product: AlterLab
title: "AI Agent That Finds Deals on eBay and Jawa | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/answers/ai-agent-marketplace-deal-finder
```

# Building an AI Agent That Finds the Best Deals on eBay and Jawa

## Short answer

### How do you build an AI agent that checks eBay and Jawa listings and reports the best deals?

Give the agent a tool that fetches public search result pages and returns structured listings: title, price, shipping, condition and URL. Compute total price in code, compare it with your target price or the median of recent listings, and let the model only rank and explain the shortlist. AlterLab can supply the fetch and extraction step.

## Step by step

1. 1
   ### Define the search
   Write down the exact product, acceptable condition and maximum total price before building anything.
2. 2
   ### Fetch structured listings
   Fetch each marketplace's public search page and extract listings into a fixed schema rather than passing raw HTML to the model.
3. 3
   ### Score deals in code
   Calculate price plus shipping and compare it with the median of comparable listings. Arithmetic belongs in code, not in the model.
4. 4
   ### Let the model summarise
   Pass the top candidates to the model to explain trade-offs and send you a short report.

## Example

Python

```
from statistics import median

def best_deals(listings: list[dict], max_total: float) -> list[dict]:
    totals = [l["price"] + l.get("shipping", 0) for l in listings]
    typical = median(totals)
    deals = [
        {**l, "total": t, "vs_median": round(t / typical, 2)}
        for l, t in zip(listings, totals)
        if t <= max_total
    ]
    return sorted(deals, key=lambda d: d["total"])[:5]
```

## Frequently Asked Questions

### Should the model read raw listing pages?

No. Extract listings into structured fields first. The model is better at explaining a short list than at parsing long pages, and structured input is cheaper.

### Can marketplaces offer an API instead?

Some do, such as eBay's Browse API. Use an official API where it covers your fields and keep page extraction for marketplaces that do not offer one.

## Read the full guide

[How to build a price comparison tool](https://alterlab.io/how-to/build-price-comparison-tool)

## Related answers

[Building an LLM Agent That Writes a Daily Social Feed Digest](https://alterlab.io/answers/llm-agent-social-feed-digest)[Saving an Article's Like and Share Counts to a Database](https://alterlab.io/answers/save-article-likes-shares-to-database)

## Try it with AlterLab

Send a URL, get the page back as HTML, markdown or JSON. Rendering, proxy rotation and retries are handled for you.

[View API docs](https://alterlab.io/docs/api/rest)

## Your first scrape. Sixty seconds.

Up to 5,000 free requests — about 5,000 direct fetch, 500 managed sessions or 250 full browser rendering requests. No credit card. 
Just a POST request.

terminal

curl -X POST https://api.alterlab.io/v1/scrape \

-H "X-API-Key: YOUR_KEY" \

-H "Content-Type: application/json" \

-d '{"url": "https://example.com", "formats": ["markdown"]}'

[Start building free](https://alterlab.io/signin)

No credit card required · Up to 5,000 free requests (about 5,000 direct fetch, 500 managed sessions or 250 full browser rendering requests) · Balance never expires