Back/Operations/Codex
IntermediateOperations

Build an AI Agent to Find Underpriced Pokémon Cards for Arbitrage

Use an AI agent with browsing capabilities to automate the tedious process of finding valuable, underpriced collectible cards on eBay, turning hours of manual search into an automated background task.

Build an AI Agent to Find Underpriced Pokémon Cards for Arbitrage

From 19:10 to 24:16, Alessio Fanelli shows Codex comparing graded Pokémon card listings with market data to find potentially underpriced cards. Clip range: 19:10 to 24:16.

Before you start

What you need

  • Reference list of graded Pokémon cards over the target value threshold
  • Initial PSA certificate number seed data
  • Custom eBay search skill with grading comparison rules
  • eBay browsing access
  • Maximum purchase budget or profit margin threshold decision

What you’ll make

A report of potentially underpriced graded Pokémon card listings with pricing comparisons and listing URLs.

Tools used

  • Codex

    OpenAI's cloud-based AI software engineering agent that can execute code, run tests, and handle complex multi-file tasks autonomously.

    VisitCodex

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

4 steps

Step01

Build an Intelligence Database

Instruct the agent to browse the web and build a target list of high-value graded cards. Provide a starting point, like an initial certificate number, and a constraint, such as a minimum price. The agent will use vision to read certificate numbers from card images and compile them into your database.

Example prompt
fill out the certificate number for every card that costs more than a thousand dollars.
Step02

Develop a Custom Search Skill

Develop a custom skill that contains the agent's search logic for eBay. This function should include rules for comparing different grading systems and a method for batching requests to avoid being blocked by the site.

Step03

Trigger the Deal-Hunting Agent

Use a prompt to activate the agent's custom eBay skill. The prompt should reference your target list and instruct the agent to start searching for underpriced cards on eBay.

Example prompt
use the eBay PSA premium. Let's find some underpriced cards from our premium list.
Step04

Analyze and Report Findings

The agent autonomously navigates eBay, scraping prices for cards on its target list. It compares these prices against your reference data and flags significantly underpriced listings in a report. You make the final purchasing decision based on the agent's findings.

Example prompt
For each underpriced card you identified, create a summary. The output should be a markdown table with columns for Card Name, Grade, eBay Listing URL, Current Price, and Estimated Market Value. Add a final column calculating the percentage difference between the current price and market value.

Here is the data you collected:
[paste collected data]

What good looks like

  • Report includes card name, grade, listing URL, current price, and estimated market value
  • Listings are matched to certificate numbers or grading details
  • Percentage difference calculations are included for each listing
  • human review is required before any purchase action

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

eBay listings contain mismatched grading details or fake certificate numbers
Cross-check certificate numbers against PSA records and listing photos
Search requests trigger marketplace rate limits
Batch requests with throttling and rotate query timing
Market value estimates rely on outdated sales data
Refresh comparisons using recent completed sales from the same grading tier

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready